move ELF output file support check to qplugin header

Q_OF_ELF is internal, generalize by checking only if __ELF__ is defined
while at it

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2020-05-23 13:41:55 +00:00
parent f2954b3e2c
commit c62ed2a35e
2 changed files with 1 additions and 7 deletions

View file

@ -1195,12 +1195,6 @@ inline int qIntCast(float f) { return int(f); }
Q_CORE_EXPORT void qsrand(uint seed); Q_CORE_EXPORT void qsrand(uint seed);
Q_CORE_EXPORT int qrand(); Q_CORE_EXPORT int qrand();
#if defined (__ELF__)
# if defined (Q_OS_LINUX) || defined (Q_OS_SOLARIS) || defined (Q_OS_FREEBSD) || defined (Q_OS_OPENBSD)
# define Q_OF_ELF
# endif
#endif
QT_END_NAMESPACE QT_END_NAMESPACE
QT_END_HEADER QT_END_HEADER

View file

@ -54,7 +54,7 @@ typedef QObject *(*QtPluginInstanceFunction)();
#define Q_EXPORT_PLUGIN(PLUGIN) \ #define Q_EXPORT_PLUGIN(PLUGIN) \
Q_EXPORT_PLUGIN2(PLUGIN, PLUGIN) Q_EXPORT_PLUGIN2(PLUGIN, PLUGIN)
#if defined(Q_OF_ELF) && (defined(Q_CC_GNU) || defined(Q_CC_CLANG)) #if defined(__ELF__) && (defined(Q_CC_GNU) || defined(Q_CC_CLANG))
# define Q_PLUGIN_VERIFICATION_SECTION \ # define Q_PLUGIN_VERIFICATION_SECTION \
__attribute__ ((section (".ktplugin"))) __attribute__((used)) __attribute__ ((section (".ktplugin"))) __attribute__((used))
#else #else