public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] resolv: Fix tst-resolv tests for 2.35 ABIs and later
@ 2022-02-11 23:42 Stafford Horne
  2022-02-19  7:55 ` Stafford Horne
  2022-02-21 18:24 ` Adhemerval Zanella
  0 siblings, 2 replies; 4+ messages in thread
From: Stafford Horne @ 2022-02-11 23:42 UTC (permalink / raw)
  To: GLIBC patches; +Cc: Florian Weimer, Stafford Horne

The commit 737e873b30 ("resolv: Do not build libanl.so for ABIs starting
at 2.35") disabled building libanl for ports supporting only 2.35 and
later like OpenRISC.

However, the if statement was not updated quite correctly and the change
ends up disabling many tst-resolv* tests.  This was not supposed to be
done and it causes test dependency errors like:

     make: Entering directory 'gnu-home/glibc/resolv'
     make: *** No rule to make target 'gnu-home/build-glibc/resolv/tst-resolv-res_ninit.out', needed by 'gnu-home/build-glibc/resolv/mtrace-tst-resolv-res_ninit.out'. Stop.
     make: Leaving directory 'gnu-home/glibc/resolv'

This patch move the extra-libs += libanl definition and condition down
to be closer to other libanl definitions.  The $(have-GLIBC_2.34)
condition now includes libanl-routines and libanl-shared-only-routines as
well.

Also, I have added a comment to endif of $(have-thread-library) to help
show the bondary of the have-thread-library definitions.
---
Notes:
 - I also moved libanl-shared-only-routines into the have-GLIBC_2.34 condition,
   Florian didn't mention this in his mail but it seems correct.
 - I documented the boundary of the have-thread-library condition.  I think this
   highlights that for non have-thread-library builds the tst-resolv-res_ninit
   will still be broken, because tst-resolv-res_ninit is outside the
   have-thread-library condition.

 resolv/Makefile | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/resolv/Makefile b/resolv/Makefile
index c465479e8b..438672786f 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -79,11 +79,6 @@ generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
 extra-libs := libresolv libnss_dns
 ifeq ($(have-thread-library),yes)
 routines += gai_sigqueue
-endif
-
-ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
-# Empty compatibility library for old binaries.
-extra-libs += libanl
 
 tests += \
   tst-bug18665 \
@@ -144,7 +139,8 @@ xtests += tst-resolv-qtypes
 
 # This test has dropped packet tests and runs for a long time.
 xtests += tst-resolv-rotate
-endif
+endif # $(have-thread-library)
+
 extra-libs-others = $(extra-libs)
 libresolv-routines := \
   base64 \
@@ -168,6 +164,13 @@ libresolv-routines := \
   resolv-deprecated \
   # libresolv-routines
 
+ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
+# Empty compatibility library for old binaries.
+extra-libs += libanl
+libanl-routines += libanl-compat
+libanl-shared-only-routines += libanl-compat
+endif
+
 $(libanl-routines-var) += \
   gai_cancel \
   gai_error \
@@ -177,9 +180,6 @@ $(libanl-routines-var) += \
   getaddrinfo_a \
   # $(libanl-routines-var)
 
-libanl-routines += libanl-compat
-libanl-shared-only-routines += libanl-compat
-
 # Pretend that libanl.so is a linker script, so that the symbolic link
 # is not installed.
 install-lib-ldscripts = libanl.so
-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] resolv: Fix tst-resolv tests for 2.35 ABIs and later
  2022-02-11 23:42 [PATCH] resolv: Fix tst-resolv tests for 2.35 ABIs and later Stafford Horne
@ 2022-02-19  7:55 ` Stafford Horne
  2022-02-21 18:24 ` Adhemerval Zanella
  1 sibling, 0 replies; 4+ messages in thread
From: Stafford Horne @ 2022-02-19  7:55 UTC (permalink / raw)
  To: GLIBC patches; +Cc: Florian Weimer

Ping?

On Sat, Feb 12, 2022 at 08:42:39AM +0900, Stafford Horne wrote:
> The commit 737e873b30 ("resolv: Do not build libanl.so for ABIs starting
> at 2.35") disabled building libanl for ports supporting only 2.35 and
> later like OpenRISC.
> 
> However, the if statement was not updated quite correctly and the change
> ends up disabling many tst-resolv* tests.  This was not supposed to be
> done and it causes test dependency errors like:
> 
>      make: Entering directory 'gnu-home/glibc/resolv'
>      make: *** No rule to make target 'gnu-home/build-glibc/resolv/tst-resolv-res_ninit.out', needed by 'gnu-home/build-glibc/resolv/mtrace-tst-resolv-res_ninit.out'. Stop.
>      make: Leaving directory 'gnu-home/glibc/resolv'
> 
> This patch move the extra-libs += libanl definition and condition down
> to be closer to other libanl definitions.  The $(have-GLIBC_2.34)
> condition now includes libanl-routines and libanl-shared-only-routines as
> well.
> 
> Also, I have added a comment to endif of $(have-thread-library) to help
> show the bondary of the have-thread-library definitions.
> ---
> Notes:
>  - I also moved libanl-shared-only-routines into the have-GLIBC_2.34 condition,
>    Florian didn't mention this in his mail but it seems correct.
>  - I documented the boundary of the have-thread-library condition.  I think this
>    highlights that for non have-thread-library builds the tst-resolv-res_ninit
>    will still be broken, because tst-resolv-res_ninit is outside the
>    have-thread-library condition.
> 
>  resolv/Makefile | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/resolv/Makefile b/resolv/Makefile
> index c465479e8b..438672786f 100644
> --- a/resolv/Makefile
> +++ b/resolv/Makefile
> @@ -79,11 +79,6 @@ generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
>  extra-libs := libresolv libnss_dns
>  ifeq ($(have-thread-library),yes)
>  routines += gai_sigqueue
> -endif
> -
> -ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
> -# Empty compatibility library for old binaries.
> -extra-libs += libanl
>  
>  tests += \
>    tst-bug18665 \
> @@ -144,7 +139,8 @@ xtests += tst-resolv-qtypes
>  
>  # This test has dropped packet tests and runs for a long time.
>  xtests += tst-resolv-rotate
> -endif
> +endif # $(have-thread-library)
> +
>  extra-libs-others = $(extra-libs)
>  libresolv-routines := \
>    base64 \
> @@ -168,6 +164,13 @@ libresolv-routines := \
>    resolv-deprecated \
>    # libresolv-routines
>  
> +ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
> +# Empty compatibility library for old binaries.
> +extra-libs += libanl
> +libanl-routines += libanl-compat
> +libanl-shared-only-routines += libanl-compat
> +endif
> +
>  $(libanl-routines-var) += \
>    gai_cancel \
>    gai_error \
> @@ -177,9 +180,6 @@ $(libanl-routines-var) += \
>    getaddrinfo_a \
>    # $(libanl-routines-var)
>  
> -libanl-routines += libanl-compat
> -libanl-shared-only-routines += libanl-compat
> -
>  # Pretend that libanl.so is a linker script, so that the symbolic link
>  # is not installed.
>  install-lib-ldscripts = libanl.so
> -- 
> 2.31.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] resolv: Fix tst-resolv tests for 2.35 ABIs and later
  2022-02-11 23:42 [PATCH] resolv: Fix tst-resolv tests for 2.35 ABIs and later Stafford Horne
  2022-02-19  7:55 ` Stafford Horne
@ 2022-02-21 18:24 ` Adhemerval Zanella
  2022-02-21 21:14   ` Stafford Horne
  1 sibling, 1 reply; 4+ messages in thread
From: Adhemerval Zanella @ 2022-02-21 18:24 UTC (permalink / raw)
  To: Stafford Horne, GLIBC patches; +Cc: Florian Weimer



On 11/02/2022 20:42, Stafford Horne via Libc-alpha wrote:
> The commit 737e873b30 ("resolv: Do not build libanl.so for ABIs starting
> at 2.35") disabled building libanl for ports supporting only 2.35 and
> later like OpenRISC.
> 
> However, the if statement was not updated quite correctly and the change
> ends up disabling many tst-resolv* tests.  This was not supposed to be
> done and it causes test dependency errors like:
> 
>      make: Entering directory 'gnu-home/glibc/resolv'
>      make: *** No rule to make target 'gnu-home/build-glibc/resolv/tst-resolv-res_ninit.out', needed by 'gnu-home/build-glibc/resolv/mtrace-tst-resolv-res_ninit.out'. Stop.
>      make: Leaving directory 'gnu-home/glibc/resolv'
> 
> This patch move the extra-libs += libanl definition and condition down
> to be closer to other libanl definitions.  The $(have-GLIBC_2.34)
> condition now includes libanl-routines and libanl-shared-only-routines as
> well.
> 
> Also, I have added a comment to endif of $(have-thread-library) to help
> show the bondary of the have-thread-library definitions.
> ---
> Notes:
>  - I also moved libanl-shared-only-routines into the have-GLIBC_2.34 condition,
>    Florian didn't mention this in his mail but it seems correct.
>  - I documented the boundary of the have-thread-library condition.  I think this
>    highlights that for non have-thread-library builds the tst-resolv-res_ninit
>    will still be broken, because tst-resolv-res_ninit is outside the
>    have-thread-library condition.


LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> 
>  resolv/Makefile | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/resolv/Makefile b/resolv/Makefile
> index c465479e8b..438672786f 100644
> --- a/resolv/Makefile
> +++ b/resolv/Makefile
> @@ -79,11 +79,6 @@ generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
>  extra-libs := libresolv libnss_dns
>  ifeq ($(have-thread-library),yes)
>  routines += gai_sigqueue
> -endif
> -
> -ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
> -# Empty compatibility library for old binaries.
> -extra-libs += libanl
>  
>  tests += \
>    tst-bug18665 \
> @@ -144,7 +139,8 @@ xtests += tst-resolv-qtypes
>  
>  # This test has dropped packet tests and runs for a long time.
>  xtests += tst-resolv-rotate
> -endif
> +endif # $(have-thread-library)
> +
>  extra-libs-others = $(extra-libs)
>  libresolv-routines := \
>    base64 \
> @@ -168,6 +164,13 @@ libresolv-routines := \
>    resolv-deprecated \
>    # libresolv-routines
>  
> +ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
> +# Empty compatibility library for old binaries.
> +extra-libs += libanl
> +libanl-routines += libanl-compat
> +libanl-shared-only-routines += libanl-compat
> +endif
> +
>  $(libanl-routines-var) += \
>    gai_cancel \
>    gai_error \
> @@ -177,9 +180,6 @@ $(libanl-routines-var) += \
>    getaddrinfo_a \
>    # $(libanl-routines-var)
>  
> -libanl-routines += libanl-compat
> -libanl-shared-only-routines += libanl-compat
> -
>  # Pretend that libanl.so is a linker script, so that the symbolic link
>  # is not installed.
>  install-lib-ldscripts = libanl.so

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] resolv: Fix tst-resolv tests for 2.35 ABIs and later
  2022-02-21 18:24 ` Adhemerval Zanella
@ 2022-02-21 21:14   ` Stafford Horne
  0 siblings, 0 replies; 4+ messages in thread
From: Stafford Horne @ 2022-02-21 21:14 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: GLIBC patches, Florian Weimer

On Mon, Feb 21, 2022 at 03:24:21PM -0300, Adhemerval Zanella wrote:
> 
> 
> On 11/02/2022 20:42, Stafford Horne via Libc-alpha wrote:
> > The commit 737e873b30 ("resolv: Do not build libanl.so for ABIs starting
> > at 2.35") disabled building libanl for ports supporting only 2.35 and
> > later like OpenRISC.
> > 
> > However, the if statement was not updated quite correctly and the change
> > ends up disabling many tst-resolv* tests.  This was not supposed to be
> > done and it causes test dependency errors like:
> > 
> >      make: Entering directory 'gnu-home/glibc/resolv'
> >      make: *** No rule to make target 'gnu-home/build-glibc/resolv/tst-resolv-res_ninit.out', needed by 'gnu-home/build-glibc/resolv/mtrace-tst-resolv-res_ninit.out'. Stop.
> >      make: Leaving directory 'gnu-home/glibc/resolv'
> > 
> > This patch move the extra-libs += libanl definition and condition down
> > to be closer to other libanl definitions.  The $(have-GLIBC_2.34)
> > condition now includes libanl-routines and libanl-shared-only-routines as
> > well.
> > 
> > Also, I have added a comment to endif of $(have-thread-library) to help
> > show the bondary of the have-thread-library definitions.
> > ---
> > Notes:
> >  - I also moved libanl-shared-only-routines into the have-GLIBC_2.34 condition,
> >    Florian didn't mention this in his mail but it seems correct.
> >  - I documented the boundary of the have-thread-library condition.  I think this
> >    highlights that for non have-thread-library builds the tst-resolv-res_ninit
> >    will still be broken, because tst-resolv-res_ninit is outside the
> >    have-thread-library condition.
> 
> 
> LGTM, thanks.
> 
> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Thanks, I think we should backport this to the 2.35 branch as well, I will
do that.

-Stafford

> > 
> >  resolv/Makefile | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/resolv/Makefile b/resolv/Makefile
> > index c465479e8b..438672786f 100644
> > --- a/resolv/Makefile
> > +++ b/resolv/Makefile
> > @@ -79,11 +79,6 @@ generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
> >  extra-libs := libresolv libnss_dns
> >  ifeq ($(have-thread-library),yes)
> >  routines += gai_sigqueue
> > -endif
> > -
> > -ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
> > -# Empty compatibility library for old binaries.
> > -extra-libs += libanl
> >  
> >  tests += \
> >    tst-bug18665 \
> > @@ -144,7 +139,8 @@ xtests += tst-resolv-qtypes
> >  
> >  # This test has dropped packet tests and runs for a long time.
> >  xtests += tst-resolv-rotate
> > -endif
> > +endif # $(have-thread-library)
> > +
> >  extra-libs-others = $(extra-libs)
> >  libresolv-routines := \
> >    base64 \
> > @@ -168,6 +164,13 @@ libresolv-routines := \
> >    resolv-deprecated \
> >    # libresolv-routines
> >  
> > +ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
> > +# Empty compatibility library for old binaries.
> > +extra-libs += libanl
> > +libanl-routines += libanl-compat
> > +libanl-shared-only-routines += libanl-compat
> > +endif
> > +
> >  $(libanl-routines-var) += \
> >    gai_cancel \
> >    gai_error \
> > @@ -177,9 +180,6 @@ $(libanl-routines-var) += \
> >    getaddrinfo_a \
> >    # $(libanl-routines-var)
> >  
> > -libanl-routines += libanl-compat
> > -libanl-shared-only-routines += libanl-compat
> > -
> >  # Pretend that libanl.so is a linker script, so that the symbolic link
> >  # is not installed.
> >  install-lib-ldscripts = libanl.so

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-21 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 23:42 [PATCH] resolv: Fix tst-resolv tests for 2.35 ABIs and later Stafford Horne
2022-02-19  7:55 ` Stafford Horne
2022-02-21 18:24 ` Adhemerval Zanella
2022-02-21 21:14   ` Stafford Horne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).