Skip to contentSkip to conversation

elfutils: Fix GNU_HASH QA Issue

PATCH In review Khem Raj 2 participants 3 messages Sep 2, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 elfutils: Fix GNU_HASH QA Issue

---
 .../recipes-devtools/elfutils/elfutils_0.180.bb |  1 +
 .../elfutils/files/ldflags.patch                | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 meta/recipes-devtools/elfutils/files/ldflags.patch
meta/recipes-devtools/elfutils/elfutils_0.180.bb +1 -0
index 9f8bfc24f3..d3ee750725 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
            file://run-ptest \
            file://ptest.patch \
            file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
+           file://ldflags.patch \
            "
 SRC_URI_append_libc-musl = " \
            file://0001-musl-obstack-fts.patch \
meta/recipes-devtools/elfutils/files/ldflags.patch new file +17 -0
new file mode 100644
index 0000000000..ef1d65e2c3
@@ -0,0 +1,17 @@
+Pass linker flags along to CCLD, this ensures proper linking
+w.r.t. hash_style selection during cross-compile
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -86,7 +86,7 @@ backtrace-child-biarch$(EXEEXT): backtra
+ test-nlist$(EXEEXT): test-nlist.c
+ 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ 	  $(AM_CPPFLAGS) $(CPPFLAGS) \
+-	  $(CFLAGS) $(test_nlist_LDADD) -o $@ $<
++	  $(CFLAGS) $(test_nlist_LDADD) $(LDFLAGS) -o $@ $<
+ 
+ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
+ 	update1 update2 update3 update4 \
Signature · 1 line
2.28.0
#1 lore raw
Quoted 25 lines · Khem Raj
---
  .../recipes-devtools/elfutils/elfutils_0.180.bb |  1 +
  .../elfutils/files/ldflags.patch                | 17 +++++++++++++++++
  2 files changed, 18 insertions(+)

create mode 100644 meta/recipes-devtools/elfutils/files/ldflags.patch

meta/recipes-devtools/elfutils/elfutils_0.180.bb +1 -0
index 9f8bfc24f3..d3ee750725 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
             file://run-ptest \
             file://ptest.patch \
             file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
+           file://ldflags.patch \
             "
  SRC_URI_append_libc-musl = " \
             file://0001-musl-obstack-fts.patch \
meta/recipes-devtools/elfutils/files/ldflags.patch new file +0 -0
new file mode 100644
index 0000000000..ef1d65e2c3

meta/recipes-devtools/elfutils/files/ldflags.patch line 2

Quoted 2 lines
meta/recipes-devtools/elfutils/files/ldflags.patch new file +2 -0
@@ -0,0 +1,17 @@
+Pass linker flags along to CCLD, this ensures proper linking
+w.r.t. hash_style selection during cross-compile

Did you re-run the test suite?  That binary is explicitly compiled with minimal flags, so adding the LDFLAGS might actually break the test.  For the same reason, you can set Upstream-Status to Inappropriate.

I've a fix here for the same issue that uses INSANE_SKIP instead.

Ross

author
#2 lore raw
Quoted 25 lines · Ross Burton
Quoted 23 lines · Khem Raj
---
  .../recipes-devtools/elfutils/elfutils_0.180.bb |  1 +
  .../elfutils/files/ldflags.patch                | 17 +++++++++++++++++
  2 files changed, 18 insertions(+)

create mode 100644 meta/recipes-devtools/elfutils/files/ldflags.patch

meta/recipes-devtools/elfutils/elfutils_0.180.bb +1 -0
index 9f8bfc24f3..d3ee750725 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
             file://run-ptest \
             file://ptest.patch \
             file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
+           file://ldflags.patch \
             "
  SRC_URI_append_libc-musl = " \
             file://0001-musl-obstack-fts.patch \
meta/recipes-devtools/elfutils/files/ldflags.patch new file +0 -1
new file mode 100644
index 0000000000..ef1d65e2c3
--- /dev/null
Quoted 9 lines

meta/recipes-devtools/elfutils/files/ldflags.patch line 2

Quoted 4 lines

+++ b/meta/recipes-devtools/elfutils/files/ldflags.patch

meta/recipes-devtools/elfutils/files/ldflags.patch new file +2 -0
@@ -0,0 +1,17 @@
+Pass linker flags along to CCLD, this ensures proper linking
+w.r.t. hash_style selection during cross-compile

Did you re-run the test suite? That binary is explicitly compiled with minimal flags, so adding the LDFLAGS might actually break the test. For the same reason, you can set Upstream-Status to Inappropriate.

I have executed on qemu and it worked ok.

Quoted 4 lines

I've a fix here for the same issue that uses INSANE_SKIP instead.

Ross