diff mbox series

[1/3] Ignore undefined symbols for -mtls-dialect=gnu2

Message ID 20240229194642.3398122-2-adhemerval.zanella@linaro.org
State Superseded
Headers show
Series Extending TLS testing and fixing TLS gnu2 for ARM | expand

Commit Message

Adhemerval Zanella Feb. 29, 2024, 7:46 p.m. UTC
So it is not fail for arm config that defaults to -mtp=soft (which
issues a call to __aeabi_read_tp).
---
 configure    | 2 +-
 configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

H.J. Lu March 5, 2024, 8:07 p.m. UTC | #1
On Thu, Feb 29, 2024 at 11:46 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> So it is not fail for arm config that defaults to -mtp=soft (which
> issues a call to __aeabi_read_tp).
> ---
>  configure    | 2 +-
>  configure.ac | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 59ff1e415d..ab8a10ed92 100755
> --- a/configure
> +++ b/configure
> @@ -7020,7 +7020,7 @@ void foo (void)
>  }
>  EOF
>  if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles
> -                  conftest.c -o conftest 1>&5'
> +                  -Wl,--unresolved-symbols=ignore-all 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 65799e5685..4bb9aeef95 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1297,7 +1297,7 @@ void foo (void)
>  }
>  EOF
>  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles
> -                  conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
> +                  -Wl,--unresolved-symbols=ignore-all conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
>  then

Can we use -shared instead?

>    libc_cv_mtls_dialect_gnu2=yes
>  else
> --
> 2.34.1
>
Adhemerval Zanella March 5, 2024, 8:17 p.m. UTC | #2
On 05/03/24 17:07, H.J. Lu wrote:
> On Thu, Feb 29, 2024 at 11:46 AM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>>
>> So it is not fail for arm config that defaults to -mtp=soft (which
>> issues a call to __aeabi_read_tp).
>> ---
>>  configure    | 2 +-
>>  configure.ac | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 59ff1e415d..ab8a10ed92 100755
>> --- a/configure
>> +++ b/configure
>> @@ -7020,7 +7020,7 @@ void foo (void)
>>  }
>>  EOF
>>  if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles
>> -                  conftest.c -o conftest 1>&5'
>> +                  -Wl,--unresolved-symbols=ignore-all 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 65799e5685..4bb9aeef95 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1297,7 +1297,7 @@ void foo (void)
>>  }
>>  EOF
>>  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles
>> -                  conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
>> +                  -Wl,--unresolved-symbols=ignore-all conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
>>  then
> 
> Can we use -shared instead?

It works as well, I don't have a strong preference.

> 
>>    libc_cv_mtls_dialect_gnu2=yes
>>  else
>> --
>> 2.34.1
>>
> 
>
H.J. Lu March 5, 2024, 8:22 p.m. UTC | #3
On Tue, Mar 5, 2024 at 12:17 PM Adhemerval Zanella Netto
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 05/03/24 17:07, H.J. Lu wrote:
> > On Thu, Feb 29, 2024 at 11:46 AM Adhemerval Zanella
> > <adhemerval.zanella@linaro.org> wrote:
> >>
> >> So it is not fail for arm config that defaults to -mtp=soft (which
> >> issues a call to __aeabi_read_tp).
> >> ---
> >>  configure    | 2 +-
> >>  configure.ac | 2 +-
> >>  2 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/configure b/configure
> >> index 59ff1e415d..ab8a10ed92 100755
> >> --- a/configure
> >> +++ b/configure
> >> @@ -7020,7 +7020,7 @@ void foo (void)
> >>  }
> >>  EOF
> >>  if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles
> >> -                  conftest.c -o conftest 1>&5'
> >> +                  -Wl,--unresolved-symbols=ignore-all 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 65799e5685..4bb9aeef95 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -1297,7 +1297,7 @@ void foo (void)
> >>  }
> >>  EOF
> >>  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles
> >> -                  conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
> >> +                  -Wl,--unresolved-symbols=ignore-all conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
> >>  then
> >
> > Can we use -shared instead?
>
> It works as well, I don't have a strong preference.
>

Let's use -shared.   OK with that change.

Thanks.
diff mbox series

Patch

diff --git a/configure b/configure
index 59ff1e415d..ab8a10ed92 100755
--- a/configure
+++ b/configure
@@ -7020,7 +7020,7 @@  void foo (void)
 }
 EOF
 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles
-		   conftest.c -o conftest 1>&5'
+		   -Wl,--unresolved-symbols=ignore-all 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 65799e5685..4bb9aeef95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1297,7 +1297,7 @@  void foo (void)
 }
 EOF
 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles
-		   conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
+		   -Wl,--unresolved-symbols=ignore-all conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD])
 then
   libc_cv_mtls_dialect_gnu2=yes
 else