public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PR 30082] Pass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp.
@ 2023-02-05 15:16 Romain GEISSLER
  2023-02-06  1:19 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Romain GEISSLER @ 2023-02-05 15:16 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

Hi,

I tried to build and run the test suite of binutils 2.40, and for me all the bootstrap test fail. The reason is that I have a lizstd.a library installed in a non-standard directory, which isn’t used in the ld bootstrap test. Fix this by passing $ZSTD_LIBS (and similarly $JANSSON_LIBS) to runtest and use it in the bootstrap.exp test.

Note: if accepted, would it be possible to also cherry-pick this test in the branch 2.40 as well ?

Cheers,
Romain


[-- Attachment #2: fix-bootstrap-test.patch --]
[-- Type: application/octet-stream, Size: 2169 bytes --]

commit cfd74ba219ef36bc30de3d02b56eeb85d018df56
Author: Romain Geissler <romain.geissler@amadeus.com>
Date:   Sun Feb 5 13:56:34 2023 +0000

    [PR 30082] Pass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp.

diff --git a/ld/Makefile.am b/ld/Makefile.am
index bfc24537a017..760225c5b884 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -994,6 +994,7 @@ check-DEJAGNU: site.exp
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \
 		SFRAMELIB="$(TESTSFRAMELIB)" \
+		JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \
 		LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
 		DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
 		$(RUNTESTFLAGS); \
diff --git a/ld/Makefile.in b/ld/Makefile.in
index d201a58bd723..d4dddf2f6295 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -2648,6 +2648,7 @@ check-DEJAGNU: site.exp
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \
 		SFRAMELIB="$(TESTSFRAMELIB)" \
+		JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \
 		LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
 		DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
 		$(RUNTESTFLAGS); \
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index 7e95ddd76e94..b189a0c7098b 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -162,13 +162,13 @@ foreach flags $test_flags {
     }
 
     if { [lindex [remote_exec build grep "-q \"HAVE_ZSTD 1\" config.h" ] 0] == 0 } then {
-	set extralibs "$extralibs -lzstd"
+	set extralibs "$extralibs $ZSTD_LIBS"
     }
 
     # Check if the system's jansson library is used. If so, the object files will
     # be using symbols from it, so link to it.
     if { [lindex [remote_exec build grep "-q \"HAVE_JANSSON 1\" config.h" ] 0] == 0 } then {
-	set extralibs "$extralibs -ljansson"
+	set extralibs "$extralibs $JANSSON_LIBS"
     }
 
     # Plugin support requires linking with libdl.

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

* Re: [PR 30082] Pass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp.
  2023-02-05 15:16 [PR 30082] Pass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp Romain GEISSLER
@ 2023-02-06  1:19 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2023-02-06  1:19 UTC (permalink / raw)
  To: Romain GEISSLER; +Cc: binutils

On Sun, Feb 05, 2023 at 03:16:49PM +0000, Romain GEISSLER via Binutils wrote:
> Note: if accepted, would it be possible to also cherry-pick this test in the branch 2.40 as well ?

Approved and pushed to mainline and branch.  I've also committed a bpf
fix to the branch so that bfd opcodes files can be regenerated from
cgen, and regenerated config files to pick up the version change.

-- 
Alan Modra
Australia Development Lab, IBM

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

end of thread, other threads:[~2023-02-06  1:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-05 15:16 [PR 30082] Pass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp Romain GEISSLER
2023-02-06  1:19 ` Alan Modra

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).