diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-27 17:10:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-27 17:10:14 +0200 |
commit | 3c88df3e5d02710eadcfc5130640239bdecd72a8 (patch) | |
tree | b8941728d10ec704ed1fb3a4fbf1479b5baafd79 | |
parent | 5ea91859f1673d044874e3b84aa014f152436164 (diff) |
Define __PIC__ instead of __PIE__ to make later Qt5 versions happy
-rw-r--r-- | odb/qt/details/config.hxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/odb/qt/details/config.hxx b/odb/qt/details/config.hxx index c145038..e4d7708 100644 --- a/odb/qt/details/config.hxx +++ b/odb/qt/details/config.hxx @@ -9,21 +9,21 @@ #ifdef _MSC_VER #elif defined(ODB_COMPILER) -// Qt5 may complain if we are building without -fPIC or -fPIE. Instead of -// asking the user to pass one of these options to the ODB compiler (which -// can, BTW, be done with -x -fPIE, for example, if one is not using the -// Qt profile), we are going to define __PIE__ ourselves just to silence -// Qt. We also want to try to minimize this to cases where it is actually -// necessary. To achieve this, we need to include the Qt config file without -// including <QtGlobal>, which is where the test for PIC/PIE is. While -// newer versions of Qt (from 4.7) have <QtConfig>, to support older -// versions we will include qconfig.h directly. This file appears to be -// present in all the versions starting with Qt 4.0. +// Qt5 may complain if we are building without -fPIC. Instead of asking the +// user to pass one of these options to the ODB compiler (which can, BTW, be +// done with -x -fPIC, for example, if one is not using the Qt profile), we +// are going to define __PIC__ ourselves just to silence Qt. We also want to +// try to minimize this to cases where it is actually necessary. To achieve +// this, we need to include the Qt config file without including <QtGlobal>, +// which is where the test for PIE is. While newer versions of Qt (from 4.7) +// have <QtConfig>, to support older versions we will include qconfig.h +// directly. This file appears to be present in all the versions starting with +// Qt 4.0. // -# if defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__) +# if defined(__ELF__) && !defined(__PIC__) # include <QtCore/qconfig.h> // QT_REDUCE_RELOCATIONS # ifdef QT_REDUCE_RELOCATIONS -# define __PIE__ +# define __PIC__ # endif # endif # define LIBODB_QT_STATIC_LIB |