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

H.J. Lu hjl.tools@gmail.com
Tue Mar 5 20:22:06 GMT 2024


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.

-- 
H.J.


More information about the Libc-alpha mailing list