configure: tighten pie toolchain support test for tls variables
PATCH v2 1/1 configure: tighten pie toolchain support test for tls variables
Some toolchains don't support pie properly when tls variables are in use. Disallow pie when such toolchains are detected.
Signed-off-by Avi Kivity <[email protected]>
---
v2: give tls_var a type; avoids invisible warning
configure | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
configure +4 -1
@@ -1120,7 +1120,10 @@ fi if test "$pie" != "no" ; then cat > $TMPC << EOF -int main(void) { return 0; } + +static __thread int tls_var; + +int main(void) { return tls_var; } EOF if compile_prog "-fPIE -DPIE" "-pie"; then QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
Signature · 1 line
1.7.7.1
Quoted 7 lines · Avi Kivity
Some toolchains don't support pie properly when tls variables are in use. Disallow pie when such toolchains are detected.
Signed-off-by Avi Kivity<[email protected]>---
v2: give
tls_vara type; avoids invisible warning
This breaks the PIE check on OpenBSD since there is no TLS support and the issue trying to be detected doesn't affect OpenBSD.
Signature · 3 lines
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.