Fix compile-time error macro when building with -fPIE
authorGabor Ballabas <gaborb@inf.u-szeged.hu>
Tue, 19 Jun 2012 11:24:43 +0000 (13:24 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 20 Jun 2012 01:18:13 +0000 (03:18 +0200)
This macro causes a compile-time error using LLVM with Clang
when the target that includes qglobal.h is built with -fPIE.

Change-Id: I2e82e1a8feed9009c814f187b06501b26ea3b3b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/global/qglobal.h

index 38655f1..93bdd3c 100644 (file)
@@ -1193,7 +1193,7 @@ Q_CORE_EXPORT int qrand();
 #  define Q_OF_ELF
 #endif
 
-#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && !defined(__PIC__)
+#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__)
 #  error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
          "Compile your code with -fPIC or -fPIE."
 #endif