OSDN Git Service

move ELF output file support check to qplugin header
authorIvailo Monev <xakepa10@laimg.moc>
Sat, 23 May 2020 13:41:55 +0000 (13:41 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sat, 23 May 2020 13:41:55 +0000 (13:41 +0000)
Q_OF_ELF is internal, generalize by checking only if __ELF__ is defined
while at it

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/global/qglobal.h.cmake
src/core/plugin/qplugin.h

index 96dedab..455e98b 100644 (file)
@@ -1195,12 +1195,6 @@ inline int qIntCast(float f) { return int(f); }
 Q_CORE_EXPORT void qsrand(uint seed);
 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_HEADER
 
index c9de734..d08fad3 100644 (file)
@@ -54,7 +54,7 @@ typedef QObject *(*QtPluginInstanceFunction)();
 #define Q_EXPORT_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 \
      __attribute__ ((section (".ktplugin"))) __attribute__((used))
 #else