about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-26 10:58:50 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-29 09:21:37 -0300
commit04e8169f1d0397b1ffc77fbb49f4344f1ae53a82 (patch)
tree5d92901bd10cba04c8d35046dadabeb69c57a1c5
parent3d5ecb624638627869e6965410f558b15db6946e (diff)
downloadglibc-04e8169f1d0397b1ffc77fbb49f4344f1ae53a82.tar.gz
glibc-04e8169f1d0397b1ffc77fbb49f4344f1ae53a82.tar.xz
glibc-04e8169f1d0397b1ffc77fbb49f4344f1ae53a82.zip
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 <maskray@google.com>
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac4
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