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>
This commit is contained in:
Adhemerval Zanella 2021-10-26 10:58:50 -03:00
parent 3d5ecb6246
commit 04e8169f1d
2 changed files with 4 additions and 4 deletions

4
configure vendored
View File

@ -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=$?

View File

@ -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