Move the check for -fPIC compile flag to qcompilerdetection.h
Task-number: QTBUG-99313 Change-Id: I9072b73a75599381f5f2be0799bca5bf149122de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
ff8de321e2
commit
349e74c06c
@ -1203,4 +1203,11 @@ static_assert(!std::is_convertible_v<std::nullptr_t, bool>,
|
|||||||
"On MSVC you must pass the /permissive- option to the compiler.");
|
"On MSVC you must pass the /permissive- option to the compiler.");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(QT_BOOTSTRAPPED) || defined(QT_USE_PROTECTED_VISIBILITY) || !defined(__ELF__) || defined(__PIC__)
|
||||||
|
// this is fine
|
||||||
|
#elif defined(QT_REDUCE_RELOCATIONS)
|
||||||
|
# error "You must build your code with position independent code if Qt was configured with -reduce-relocations. "\
|
||||||
|
"Compile your code with -fPIC (and not with -fPIE)."
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // QCOMPILERDETECTION_H
|
#endif // QCOMPILERDETECTION_H
|
||||||
|
@ -1227,13 +1227,6 @@ Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nu
|
|||||||
|
|
||||||
#define QT_MODULE(x)
|
#define QT_MODULE(x)
|
||||||
|
|
||||||
#if defined(QT_BOOTSTRAPPED) || defined(QT_USE_PROTECTED_VISIBILITY) || !defined(__ELF__) || defined(__PIC__)
|
|
||||||
// this is fine
|
|
||||||
#elif defined(QT_REDUCE_RELOCATIONS)
|
|
||||||
# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
|
|
||||||
"Compile your code with -fPIC (and not with -fPIE)."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// This macro can be used to calculate member offsets for types with a non standard layout.
|
// This macro can be used to calculate member offsets for types with a non standard layout.
|
||||||
// It uses the fact that offsetof() is allowed to support those types since C++17 as an optional
|
// It uses the fact that offsetof() is allowed to support those types since C++17 as an optional
|
||||||
// feature. All our compilers do support this, but some issue a warning, so we wrap the offsetof()
|
// feature. All our compilers do support this, but some issue a warning, so we wrap the offsetof()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user