Clarify warning message about PIC/PIE

As noted in discussion at https://dev.gnupg.org/T4982#135524, when
there is a mismatch between position-independence of the Qt library
and other compilations, the warning produced by Qt is confusing.

It should say explicitly that -fPIE should not be passed.

Change-Id: I66394f86230a6598ac383bfd7bb14ab8cbbf6245
Pick-to: 5.15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Daniel Kahn Gillmor 2020-07-01 17:15:12 -04:00 committed by Dmitry Shachnev
parent a7f9d5a7fa
commit 7f400522c3

View File

@ -1283,7 +1283,7 @@ Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") int q
#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && \
(!defined(__PIC__) || (defined(__PIE__) && defined(Q_CC_GNU) && Q_CC_GNU >= 500))
# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
"Compile your code with -fPIC (-fPIE is not enough)."
"Compile your code with -fPIC (and not with -fPIE)."
#endif
namespace QtPrivate {