From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSpZd-0006Tu-DN for qemu-devel@nongnu.org; Tue, 22 Nov 2011 07:35:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSpZZ-0002Q7-HW for qemu-devel@nongnu.org; Tue, 22 Nov 2011 07:35:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSpZZ-0002Pu-2p for qemu-devel@nongnu.org; Tue, 22 Nov 2011 07:35:37 -0500 From: Avi Kivity Date: Tue, 22 Nov 2011 14:35:25 +0200 Message-Id: <1321965325-32050-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH v2 1.0] configure: tighten pie toolchain support test for tls variables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel@nongnu.org Cc: Paolo Bonzini , Gerd Hoffmann 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 --- v2: give tls_var a type; avoids invisible warning configure | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 75e1f10..6158b8f 100755 --- a/configure +++ b/configure @@ -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" -- 1.7.7.1