From: Avi Kivity Date: Wed, 23 Nov 2011 09:24:25 +0000 (+0200) Subject: configure: tighten pie toolchain support test for tls variables X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~17^2~1325 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21d4a791da47cf35956102d0b96208e3e595b617;p=sdk%2Femulator%2Fqemu.git 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 Signed-off-by: Anthony Liguori --- diff --git a/configure b/configure index f033438210..a7caf1e190 100755 --- a/configure +++ b/configure @@ -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"