[3/3] Check if linker also support -mtls-dialect=gnu2
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
dj/TryBot-32bit |
success
|
Build for i686
|
Commit Message
Since some linkers (for instance lld for i386) does not support it
for all architectures.
Checked on i686-linux-gnu.
---
configure | 4 ++--
configure.ac | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Comments
On Tue, Oct 26, 2021 at 1:03 PM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> Since some linkers (for instance lld for i386) does not support it
> for all architectures.
>
> Checked on i686-linux-gnu.
> ---
> configure | 4 ++--
> configure.ac | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/configure b/configure
> index 2a28c58cd6..c66082232e 100755
> --- a/configure
> +++ b/configure
> @@ -6324,8 +6324,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
> --
> 2.32.0
>
Looks good to me.
I'll add R_386_TLS_DESC support to LLD with https://reviews.llvm.org/D112582
On Tue, Oct 26, 2021 at 7:04 PM Fāng-ruì Sòng <maskray@google.com> wrote:
>
> On Tue, Oct 26, 2021 at 1:03 PM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
> >
> > Since some linkers (for instance lld for i386) does not support it
> > for all architectures.
> >
> > Checked on i686-linux-gnu.
> > ---
> > configure | 4 ++--
> > configure.ac | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/configure b/configure
> > index 2a28c58cd6..c66082232e 100755
> > --- a/configure
> > +++ b/configure
> > @@ -6324,8 +6324,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
> > --
> > 2.32.0
> >
>
> Looks good to me.
>
> I'll add R_386_TLS_DESC support to LLD with https://reviews.llvm.org/D112582
Reviewed-by: Fangrui Song <maskray@google.com>
I pushed https://reviews.llvm.org/D112582 as a maintainer of lld/ELF.
You can say that LLD before 14 did not support x86-32 TLSDESC.
@@ -6324,8 +6324,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=$?
@@ -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