From 04e8169f1d0397b1ffc77fbb49f4344f1ae53a82 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 26 Oct 2021 10:58:50 -0300 Subject: Check if linker also support -mtls-dialect=gnu2 Since some linkers (for instance lld for i386) does not support it for all architectures. Checked on i686-linux-gnu. Reviewed-by: Fangrui Song --- configure | 4 ++-- configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 367db1c1ac..2f9adca064 100755 --- a/configure +++ b/configure @@ -6312,8 +6312,8 @@ void foo (void) i = 10; } EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -fPIC -mtls-dialect=gnu2 - conftest.c 1>&5' +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles + conftest.c -o conftest 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? diff --git a/configure.ac b/configure.ac index 00f49f09f7..7eb4239359 100644 --- a/configure.ac +++ b/configure.ac @@ -1493,8 +1493,8 @@ void foo (void) i = 10; } EOF -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -fPIC -mtls-dialect=gnu2 - conftest.c 1>&AS_MESSAGE_LOG_FD]) +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles + conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD]) then libc_cv_mtls_dialect_gnu2=yes else -- cgit 1.4.1