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 <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
c1b71a1df6
commit
21d4a791da
12
configure
vendored
12
configure
vendored
@ -1120,7 +1120,17 @@ fi
|
||||
|
||||
if test "$pie" != "no" ; then
|
||||
cat > $TMPC << EOF
|
||||
int main(void) { return 0; }
|
||||
|
||||
#ifdef __linux__
|
||||
# define THREAD __thread
|
||||
#else
|
||||
# define THREAD
|
||||
#endif
|
||||
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user