summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/binutils/APKBUILD42
-rw-r--r--system/binutils/ar-deterministic-tests.patch67
-rw-r--r--system/binutils/binutils-ld-fix-static-linking.patch6
-rw-r--r--system/binutils/disable-ifunc-tests.patch2
-rw-r--r--system/binutils/disable-mbind2b.patch2
-rw-r--r--system/binutils/disable-pr26580-test.patch2
-rw-r--r--system/binutils/disable-preinit-array-tests.patch6
-rw-r--r--system/binutils/disable-relr-glibc-tests.patch2
-rw-r--r--system/binutils/disable-textrel-test.patch43
-rw-r--r--system/binutils/fix-pr28158-test.patch30
-rw-r--r--system/binutils/musl-preinit-array.patch2
-rw-r--r--system/binutils/musl-versioned-syms.patch2
-rw-r--r--system/binutils/ppc32-pic-required.patch23
-rw-r--r--system/binutils/ppc64-abiv2-addr2line.patch15
-rw-r--r--system/binutils/remove-pr19719-test.patch2
-rw-r--r--system/binutils/remove-pr2404-tests.patch8
-rw-r--r--system/binutils/skip-thumb-plt-musl.patch28
-rw-r--r--system/binutils/vers-tests-eabi.patch33
-rw-r--r--system/binutils/x86_64-missing-test.patch91
19 files changed, 192 insertions, 214 deletions
diff --git a/system/binutils/APKBUILD b/system/binutils/APKBUILD
index 017f080e3..1eb4617b3 100644
--- a/system/binutils/APKBUILD
+++ b/system/binutils/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
pkgname=binutils
-pkgver=2.41
-pkgrel=1
+pkgver=2.42
+pkgrel=0
pkgdesc="Tools necessary to build programs"
url="https://www.gnu.org/software/binutils/"
arch="all"
@@ -13,6 +13,7 @@ makedepends="$makedepends_build $makedepends_host"
checkdepends="dejagnu"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-libs"
source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
+ ar-deterministic-tests.patch
binutils-ld-fix-static-linking.patch
disable-ifunc-tests.patch
disable-mbind2b.patch
@@ -20,21 +21,16 @@ source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
disable-preinit-array-tests.patch
disable-relr-glibc-tests.patch
disable-sframe-tests.patch
- disable-textrel-test.patch
- fix-pr28158-test.patch
libctf-32bit-test.patch
musl-preinit-array.patch
musl-versioned-syms.patch
- ppc32-pic-required.patch
- ppc64-abiv2-addr2line.patch
pr25749-test-size.patch
remove-pr2404-tests.patch
remove-pr19719-test.patch
remove-pr19553c-test.patch
- skip-thumb-plt-musl.patch
- vers-tests-eabi.patch
visibility-musl.patch
vsb-hammer.patch
+ x86_64-missing-test.patch
BTS-170.patch
BTS-196.patch
fix-deprecated-egrep-usage.patch
@@ -145,29 +141,25 @@ libs() {
mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/
}
-sha512sums="5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 binutils-2.41.tar.xz
-ced667e95bfec8909e20802cd3d734b0b179bfc9d995dd68827a471ab9a4fdc38397f3d947dcae1bf2368a73480be3f18d4ec6b757ac7fdb9ee358693cc0670f binutils-ld-fix-static-linking.patch
-ae54a3728b6e674febf130979a434f525b77f93103eef9c023647a68eaf5b607dfe264ab553d2132f46e93956959d1adf71bbd176e80a42a33329e62f6f55c3e disable-ifunc-tests.patch
-de3f50afe2b0962d1f52f154871285e9c6d7b5599b745365a8f14fd237c7b1d6a066d0d081ce67ad1317b37bae2875f27adfea52f3853d7e30003e74a84075c2 disable-mbind2b.patch
-cbbb9d62f53b1f93bb7d5728e0fe7ef0ebb18f388bc228b396e4df8ce5dd1079e0d7ca0afb2928f6f1beba30475e7f68fe345daffab3cb3ef607ca5bdd87915d disable-pr26580-test.patch
-4c8098df5c01579d1c53c0344bf5e0f1c3b11bc119da077d83e87f7d103ed958e78083f94e71b12521c5f0cb83b3dda509efadc4124bcc28b436b39245ab4603 disable-preinit-array-tests.patch
-b2d5da2705366f5919d3f8310225620493b88406b6e909ddf9bd8c9ef50f13757816ff2947eb33c1832048fd1d42c3a2593c909ee35f2fdc947f8e2df5500c7b disable-relr-glibc-tests.patch
+sha512sums="155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 binutils-2.42.tar.xz
+07a9a47c5955a1911cab5387134cfacfff82f5521066bb61f671c7e0d07ce64c31c4162a57234604b470d24f27093cb23202ad05bebc34479957c6fe64dbc8fb ar-deterministic-tests.patch
+3736ea519eab417bc05f9851954e644a4d1b44f4641fb5685ff2238bd2da775f20611edfdcd3a72eb1f2a31ba2a98e3fd97fe9d57714b7d9846553eb881a3435 binutils-ld-fix-static-linking.patch
+5eef9c29066f906fc133736efdfb9c94a897f08650bb741dc0ea8b5614563166d2afa9018c045569c853ae7cabe08ef5ec3539eb7b53df55b39b8c659a8c8b72 disable-ifunc-tests.patch
+b9f5c09aec2e6423f31fae48a26b8138f65569e63f28dc2190cb73abc2493832cc33362443ec0f24e7833bf2eb0f14ce78045d82fd8ebb4097eafd1f1a34a3fe disable-mbind2b.patch
+086f97e52c536e68b082716d054d32be50b0947cab9c62d87b1959efbf8f99423b6dc52f79da4a6dedc588a577132cb062a071928cd2b85449a107b89c3771de disable-pr26580-test.patch
+6568983766b0b9e947c21fc12f29d41b79a2a0c0c162e0d2c00120713da76bec7b6369333dbdca9d53dd0c81e2cd438c20e30076893742bfb8e14dbc89301c57 disable-preinit-array-tests.patch
+4b0089f72c676fadbbcffbd87d2715ca010a4a87392d677b0887b86ce5c2ba446fb45e079bcd4492c47d1479b91b4a2c5b2466746166081e04f4b24191239625 disable-relr-glibc-tests.patch
e8ebb984e9b13b75114c8092d1ad2d0c1b3bb59bf10e66ca250151e79844125a23f74b8c4142210c8e574785c35e0ee1df0499e0cfd6ef59e8e80d58121963e1 disable-sframe-tests.patch
-8213bc7e965b7c93e24c755e3ca47c522e3ba0d8504ec1def58fad398dd215158740164276ec8a0b48f2058c7025b5b8b6b2e16e646baf4f7dc1841d4fc5a504 disable-textrel-test.patch
-2972b86e1741866db244cd262469eaef244fc3fb0d569b58cb1ad427d31b3ffc9ccbde904e7bd78f10367a5bfe8ec7f4076253abe03edbabbb0e5894ccc20487 fix-pr28158-test.patch
4948b963906a72075873f2988289294f6c1eb60297ac2bdee5d8646ad8a23f8f16d98b3e4f048fb625d347be28028a87247241a8dca030b4847450951b7aca32 libctf-32bit-test.patch
-8ef144efc8c0cc71b48d7ed9444fa70906c9a4894058588e3f49c1826975675ab8091681912a15ecbed6772aa5bba31935c92abef0095548fc8a9ecaa5d26526 musl-preinit-array.patch
-ab4d03394073bb6dbd4a046637e9bf57f8b4dad163c551b0d9bb2202025b243161149c8622c2fae072c43082bbf19e15b667483831a58a5d1bc93b464763cdcc musl-versioned-syms.patch
-7b5ee15c9e5a3567cb000a4ac07699f9d0f11354cf5ee20fd375e483945fd45d0e1551f3f28bdb8ebb49355b3180cc90977e81ae0c3c210cdc689add504952a7 ppc32-pic-required.patch
-5456d4d6c1097f41e5c02d92ed83acf608eb05d912cf4d289e8f772e8eded9af2030c518b7a89133ef3905d084fc5354ec140e472c22fe11c6802c1e9a4237e7 ppc64-abiv2-addr2line.patch
+1f22d31b4bc1ed96d9aa1fc49c4328c6516cbb196c0d86db3f68665b948a4950911bb23d53c6f3b82703cddf9380f706355177842f12aa7fc11dd0124feadd3e musl-preinit-array.patch
+ad38c37ae67f60cf3091bf5012dbdaba0982a3e4eac5f3be400d989fb3f7400a4be2db0b8658357ec1e8be71eaddf012e9608ae8540f28fe9fa3af3d87e90fa3 musl-versioned-syms.patch
c76733b76daf5d4af17464777cb753c68063fdc6040d943962c78182ca65f46a2744d4437f6cc3b8ff5f09ff8c0f582690b7dc89eaaf4da48f9300a81b8b3803 pr25749-test-size.patch
-b97aa6fd5a0b5b71dadd7d9925a0642681ce96bb98348a01c5778e4e6570bd2e135ff0252dec6568e19df329fb1a36bcf495d332c0207573fe2e6e5842283d27 remove-pr2404-tests.patch
-ac8d30f5af82653242355d7bb0835823ea474bc6d349df4a2e6db91d90f8f80ccab1ff4ede6734af76e79da2e083a1a90cb9ae0631e3d62d89bc5f5a57c24c92 remove-pr19719-test.patch
+c54fa146dd6838c7b55441943b2ca0e344d851615574a46464e253d3f4a9ef3594ef9cf2bc69b584032a8206bf891d0aae62fb38b32873dc60c9d51874ead2ae remove-pr2404-tests.patch
+b4bd7b5d2ad3705c7db0924c73bd91d5f8ef07e73f146c250af7d794387ab219b02254b1b61060a524f2c27c04e14a401e4ce7ed50367f424f8c03874318c2c1 remove-pr19719-test.patch
06f9df891a4ae0e9f6f8b3282d3691ede7cc0f08d63bf722f942f3c94dd4d7f3907b7bb5a8087e63639569e61aed6c39b5f5da7ad6566e7ef278524aa32ada63 remove-pr19553c-test.patch
-bdfc92cdd6c31a68e09daf71e3c45900158f8222832bda14cb2f12d9d693e6f19fe00dd29a7af9850bf0a19afe6ef421a690195f1a4e96d3cc76370f1e3bd399 skip-thumb-plt-musl.patch
-52f250970ba6814a7a992f6ad4a7c8bfbc9b5f0a0c422c920edf8b6c3dfbc353d13be940483bbbce1bfc543572c2abb06015df61a68a640774b827810d0dde6b vers-tests-eabi.patch
075565f9bc85c0fc4bd36c7a848f6b876b71fbbe0f572b5c21961687ab4e2cd00c784fba09fe92b214c4b1df871ebd6409e6c93dde5a0a6c1ef6e41a30b24520 visibility-musl.patch
55bdb08f93563449b170ba8623cd7d4409c8f22abb15fca23bc87f23cc43cd580fa149e68271e65fdf2c29ddb0a15cd78d6f0de1a50332fdc026ea1b7d0ec7b8 vsb-hammer.patch
+f524acb49e7ce14133a11b237858aaadc84f4c3290b6e59335ec293fc6cc0e65c9bdd47c2b68bf75bb3a39ebe2e61df4f7bf941acec69d79968aa68915ade4d5 x86_64-missing-test.patch
c62365110dd0a550e55f1445b197f1f968849b1079439cda0d44778772964779b4ab1142ccc662ba75ebb040e09ef4b4bfc253f4632db24ed783155be2f5f3b1 BTS-170.patch
ab7d0c1fa74862bf9364d5e2228200054a2c5c4351c979dc7a9850f630d74034edffba740b468e009c5419a3cec110322364303f8af28dcdbfbe672c3c16f450 BTS-196.patch
95f2063ecb902148e53603211452ca21d4dec215c32a07c2eebc5881dbdc7cba34a7a49177fedf4db1d7d8542708af673a31930fd7d49a6a2eb00b47dbe6eeb9 fix-deprecated-egrep-usage.patch"
diff --git a/system/binutils/ar-deterministic-tests.patch b/system/binutils/ar-deterministic-tests.patch
new file mode 100644
index 000000000..f3f63b937
--- /dev/null
+++ b/system/binutils/ar-deterministic-tests.patch
@@ -0,0 +1,67 @@
+From: Stephen Kitt <steve@sk2.org>
+Date: Mon, 11 Mar 2024 07:21:47 +0000 (+0100)
+Subject: tests: force non-deterministic mode in non-deterministic tests
+X-Git-Tag: gdb-15-branchpoint~761
+X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=64e215c15bc316f673161c76db93a50bda45666a;hp=5790996072837620a8fd3756dda5138eb2f2781b
+
+tests: force non-deterministic mode in non-deterministic tests
+
+Since ar can be built defaulting to deterministic mode, tests which
+expect non-deterministic behaviour need to explicitly set the U flag.
+
+The non-deterministic member test expects SOURCE_DATE_EPOCH to not be
+set; this documents that. Unconditionally unsetting the variable
+causes issues in test infrastructure (which expects unsetenv to only
+be called on variables which are already set).
+
+Signed-off-by: Stephen Kitt <steve@sk2.org>
+---
+
+diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp
+index d4e4f64b42e..998cbe1f0a9 100644
+--- a/binutils/testsuite/binutils-all/ar.exp
++++ b/binutils/testsuite/binutils-all/ar.exp
+@@ -538,6 +538,7 @@ proc replacing_deterministic_member { } {
+ }
+
+ # Test replacing a member of a non-deterministic archive.
++# This test expects SOURCE_DATE_EPOCH to not be set in the environment.
+
+ proc replacing_non_deterministic_member { } {
+ global AR
+@@ -581,7 +582,7 @@ proc replacing_non_deterministic_member { } {
+
+ # Build the archive with the *newer* object file.
+
+- set got [binutils_run $AR "rc $archive ${newer_objfile}"]
++ set got [binutils_run $AR "rcU $archive ${newer_objfile}"]
+ if ![string match "" $got] {
+ fail "$testname: (could not build archive)"
+ return
+@@ -589,7 +590,7 @@ proc replacing_non_deterministic_member { } {
+
+ # Now try to replace the newer file with the older one. This should not work.
+
+- set got [binutils_run $AR "ru $archive $older_objfile"]
++ set got [binutils_run $AR "ruU $archive $older_objfile"]
+ if ![string match "" $got] {
+ fail "$testname: (failed to replace file)"
+ return
+@@ -651,7 +652,7 @@ proc replacing_sde_deterministic_member { } {
+ # Build the archive with the *newer* object file.
+ setenv SOURCE_DATE_EPOCH "1000"
+
+- set got [binutils_run $AR "rc $archive ${newer_objfile}"]
++ set got [binutils_run $AR "rcU $archive ${newer_objfile}"]
+ if ![string match "" $got] {
+ fail "$testname: (could not build archive)"
+ unsetenv SOURCE_DATE_EPOCH
+@@ -662,7 +663,7 @@ proc replacing_sde_deterministic_member { } {
+ # archive this will not work, but one created to be deterministic
+ # should always replace its members.
+
+- set got [binutils_run $AR "ru $archive $older_objfile"]
++ set got [binutils_run $AR "ruU $archive $older_objfile"]
+ if ![string match "" $got] {
+ fail "$testname: (failed to replace file)"
+ unsetenv SOURCE_DATE_EPOCH
diff --git a/system/binutils/binutils-ld-fix-static-linking.patch b/system/binutils/binutils-ld-fix-static-linking.patch
index fb79e3213..d1bbe41a4 100644
--- a/system/binutils/binutils-ld-fix-static-linking.patch
+++ b/system/binutils/binutils-ld-fix-static-linking.patch
@@ -3,7 +3,7 @@ diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index e8126cb..9532bfb 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
-@@ -257,8 +257,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
+@@ -269,8 +269,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
@@ -14,7 +14,7 @@ index e8126cb..9532bfb 100644
else
SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
-@@ -298,15 +298,14 @@ CTOR=".ctors ${CONSTRUCTING-0} :
+@@ -310,15 +310,14 @@ CTOR=".ctors ${CONSTRUCTING-0} :
doesn't matter which directory crtbegin.o
is in. */
@@ -32,7 +32,7 @@ index e8126cb..9532bfb 100644
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}}
-@@ -314,9 +313,8 @@ CTOR=".ctors ${CONSTRUCTING-0} :
+@@ -326,9 +325,8 @@ CTOR=".ctors ${CONSTRUCTING-0} :
DTOR=".dtors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${DTOR_START}}
diff --git a/system/binutils/disable-ifunc-tests.patch b/system/binutils/disable-ifunc-tests.patch
index 39b35d319..9f21a03fc 100644
--- a/system/binutils/disable-ifunc-tests.patch
+++ b/system/binutils/disable-ifunc-tests.patch
@@ -1,6 +1,6 @@
--- binutils-2.31.1/ld/testsuite/ld-ifunc/ifunc.exp.old 2018-06-27 07:55:16.000000000 +0000
+++ binutils-2.31.1/ld/testsuite/ld-ifunc/ifunc.exp 2018-10-12 03:23:09.240000000 +0000
-@@ -43,7 +43,8 @@
+@@ -44,7 +44,8 @@
|| [istarget sh*-*-*]
|| [istarget tic6x-*-*]
|| [istarget tile*-*-*]
diff --git a/system/binutils/disable-mbind2b.patch b/system/binutils/disable-mbind2b.patch
index 6065ba0cf..dee8690f1 100644
--- a/system/binutils/disable-mbind2b.patch
+++ b/system/binutils/disable-mbind2b.patch
@@ -2,7 +2,7 @@ XXX working upstream with musl, trying to push to other arches for testing
--- binutils-2.41/ld/testsuite/ld-elf/elf.exp.old 2023-09-22 22:22:00.860304785 -0500
+++ binutils-2.41/ld/testsuite/ld-elf/elf.exp 2023-09-22 23:43:12.163396014 -0500
-@@ -490,15 +490,6 @@
+@@ -493,15 +493,6 @@
"pass.out" \
"-O2 -I../bfd" \
] \
diff --git a/system/binutils/disable-pr26580-test.patch b/system/binutils/disable-pr26580-test.patch
index 768a7c0c0..681b8ec0c 100644
--- a/system/binutils/disable-pr26580-test.patch
+++ b/system/binutils/disable-pr26580-test.patch
@@ -7,7 +7,7 @@ Not reported upstream.
--- binutils-2.41/ld/testsuite/ld-elf/shared.exp.old 2023-09-30 00:31:20.814410396 -0500
+++ binutils-2.41/ld/testsuite/ld-elf/shared.exp 2023-09-30 01:23:23.564443008 -0500
-@@ -1121,10 +1121,6 @@
+@@ -1157,10 +1157,6 @@
"" "" \
{pr26580-a.c} "pr26580-3" "pr26580-3.out" "-fcommon" "c" "" \
"-Wl,--as-needed tmpdir/libpr26580-2.so" ] \
diff --git a/system/binutils/disable-preinit-array-tests.patch b/system/binutils/disable-preinit-array-tests.patch
index 4338fd5ec..5693d4bbd 100644
--- a/system/binutils/disable-preinit-array-tests.patch
+++ b/system/binutils/disable-preinit-array-tests.patch
@@ -1,6 +1,6 @@
--- binutils-2.29/ld/testsuite/ld-elf/elf.exp.old 2017-07-04 08:43:21.000000000 +0000
+++ binutils-2.29/ld/testsuite/ld-elf/elf.exp 2017-08-19 04:46:32.214460537 +0000
-@@ -391,8 +391,6 @@
+@@ -392,8 +392,6 @@
}
set array_tests {
@@ -9,7 +9,7 @@
{"init array" "" ""
{init.c} "init" "init.out"}
{"fini array" "" ""
-@@ -401,8 +399,6 @@
+@@ -402,8 +400,6 @@
{init-mixed.c} "init-mixed" "init-mixed.out" "-I."}
}
set array_tests_pie {
@@ -18,7 +18,7 @@
{"PIE init array" "-pie" ""
{init.c} "init" "init.out" "-fPIE"}
{"PIE fini array" "-pie" ""
-@@ -413,8 +409,6 @@
+@@ -414,8 +410,6 @@
{pr14525.c} "pr14525" "pr14525.out" "-fPIE"}
}
set array_tests_static {
diff --git a/system/binutils/disable-relr-glibc-tests.patch b/system/binutils/disable-relr-glibc-tests.patch
index afefe593a..1edf30acb 100644
--- a/system/binutils/disable-relr-glibc-tests.patch
+++ b/system/binutils/disable-relr-glibc-tests.patch
@@ -6,7 +6,7 @@ Upstream-URL: https://sourceware.org/bugzilla/show_bug.cgi?id=30917
--- binutils-2.41/ld/testsuite/ld-elf/dt-relr.exp.old 2023-07-02 18:00:00.000000000 -0500
+++ binutils-2.41/ld/testsuite/ld-elf/dt-relr.exp 2023-09-22 20:28:27.455427142 -0500
-@@ -23,6 +23,10 @@
+@@ -27,6 +27,10 @@
return
}
diff --git a/system/binutils/disable-textrel-test.patch b/system/binutils/disable-textrel-test.patch
deleted file mode 100644
index f01921996..000000000
--- a/system/binutils/disable-textrel-test.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-musl doesn't support TEXTRELs, so the pr22001-1 test will always segfault.
-
-Upstream-URL: https://sourceware.org/bugzilla/show_bug.cgi?id=30925
-
---- binutils-2.41/ld/testsuite/ld-i386/i386.exp.old 2023-07-02 23:00:00.000000000 +0000
-+++ binutils-2.41/ld/testsuite/ld-i386/i386.exp 2023-09-30 12:34:46.594675721 +0000
-@@ -1318,6 +1318,20 @@
- ] \
- ]
-
-+ if { ![istarget i?86-*-musl] } {
-+ run_ld_link_exec_tests [list \
-+ [list \
-+ "Run pr22001-1" \
-+ "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed,-z,notext tmpdir/pr22001-1.so" \
-+ "-Wa,-mx86-used-note=yes" \
-+ { pr22001-1b.c } \
-+ "pr22001-1" \
-+ "pass.out" \
-+ "$NOPIE_CFLAGS" \
-+ ] \
-+ ]
-+ }
-+
- run_ld_link_exec_tests [list \
- [list \
- "Run weakundef1 without PIE" \
-@@ -1328,15 +1342,6 @@
- "pass.out" \
- "$NOPIE_CFLAGS" \
- ] \
-- [list \
-- "Run pr22001-1" \
-- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed,-z,notext tmpdir/pr22001-1.so" \
-- "-Wa,-mx86-used-note=yes" \
-- { pr22001-1b.c } \
-- "pr22001-1" \
-- "pass.out" \
-- "$NOPIE_CFLAGS" \
-- ] \
- [list \
- "Run pr22001-1 (PIE 1)" \
- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
diff --git a/system/binutils/fix-pr28158-test.patch b/system/binutils/fix-pr28158-test.patch
deleted file mode 100644
index 2fade9593..000000000
--- a/system/binutils/fix-pr28158-test.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=30905
-
-From 221e4f9b4ac4e6d4e362fdadf7f86a8b0df94d47 Mon Sep 17 00:00:00 2001
-From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
-Date: Tue, 26 Sep 2023 00:26:06 -0500
-Subject: [PATCH] elf: Adjust PR ld/28158 tests
-
-PR ld/28158
- * testsuite/ld-elf/pr28158.rd: ensure symbol indexes containing
- the number 0 match in regex
-
-Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
----
- ld/testsuite/ld-elf/pr28158.rd | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ld/testsuite/ld-elf/pr28158.rd b/ld/testsuite/ld-elf/pr28158.rd
-index b3cfe8915cb..c2cef7a0b39 100644
---- a/ld/testsuite/ld-elf/pr28158.rd
-+++ b/ld/testsuite/ld-elf/pr28158.rd
-@@ -3,5 +3,5 @@
- #target: x86_64-*-linux* i?86-*-linux-gnu
-
- #...
-- +[0-9]+: +[0-9a-f]+ +[0-9]+ +OBJECT +GLOBAL +DEFAULT +[1-9]+ foo@VERS_2.0 \([0-9]+\)
-+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+ foo@VERS_2.0 \([0-9]+\)
- #pass
---
-2.39.2 (Apple Git-143)
-
diff --git a/system/binutils/musl-preinit-array.patch b/system/binutils/musl-preinit-array.patch
index 9932f3c7f..f06084658 100644
--- a/system/binutils/musl-preinit-array.patch
+++ b/system/binutils/musl-preinit-array.patch
@@ -2,7 +2,7 @@ musl libc currently does not run .preinit_array functions.
--- binutils-2.41/ld/testsuite/ld-elf/elf.exp.old 2023-09-22 20:55:13.894385414 -0500
+++ binutils-2.41/ld/testsuite/ld-elf/elf.exp 2023-09-22 21:31:13.354594152 -0500
-@@ -427,17 +427,21 @@
+@@ -428,17 +428,21 @@
run_ld_link_exec_tests $array_tests_pie $xfails
if { $STATIC_PIE_LDFLAGS != "" } then {
diff --git a/system/binutils/musl-versioned-syms.patch b/system/binutils/musl-versioned-syms.patch
index 3812947c3..ce7c9fb7d 100644
--- a/system/binutils/musl-versioned-syms.patch
+++ b/system/binutils/musl-versioned-syms.patch
@@ -2,7 +2,7 @@ This test will not work on musl which does not support symbol versioning.
--- binutils-2.41/ld/testsuite/ld-elfvers/vers.exp.old 2023-07-02 18:00:00.000000000 -0500
+++ binutils-2.41/ld/testsuite/ld-elfvers/vers.exp 2023-09-22 22:20:51.407688782 -0500
-@@ -888,8 +888,12 @@
+@@ -890,8 +890,12 @@
# Test that when we override a versioned symbol from the library this
# symbol appears in the dynamic symbol table of the executable.
#
diff --git a/system/binutils/ppc32-pic-required.patch b/system/binutils/ppc32-pic-required.patch
deleted file mode 100644
index c9395d945..000000000
--- a/system/binutils/ppc32-pic-required.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-On the 32-bit PowerPC target, musl does not support shared libraries without
-PIC, because secure-PLT is required.
-
-Upstream-URL: https://sourceware.org/bugzilla/show_bug.cgi?id=30918
-
---- binutils-2.41/ld/testsuite/ld-shared/shared.exp.old 2023-07-02 23:00:00.000000000 +0000
-+++ binutils-2.41/ld/testsuite/ld-shared/shared.exp 2023-09-24 08:44:39.404937347 +0000
-@@ -226,6 +226,7 @@
- setup_xfail "*-*-solaris2*"
- setup_xfail "ia64-*-linux*"
- setup_xfail "alpha*-*-linux*"
-+ setup_xfail "powerpc-*-linux-musl"
- setup_xfail "powerpc64*-*-*"
- if { ![istarget hppa*64*-*-linux*] } {
- setup_xfail "hppa*-*-linux*"
-@@ -307,6 +308,7 @@
- setup_xfail "*-*-solaris2*"
- setup_xfail "ia64-*-linux*"
- setup_xfail "alpha*-*-linux*"
-+ setup_xfail "powerpc-*-linux-musl"
- setup_xfail "powerpc64*-*-*"
- if { ![istarget hppa*64*-*-linux*] } {
- setup_xfail "hppa*-*-linux*"
diff --git a/system/binutils/ppc64-abiv2-addr2line.patch b/system/binutils/ppc64-abiv2-addr2line.patch
deleted file mode 100644
index e3cb4d73d..000000000
--- a/system/binutils/ppc64-abiv2-addr2line.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-musl libc uses the same ELFv2 ABI on both endians of PowerPC64.
-
-Upstream-URL: https://sourceware.org/bugzilla/show_bug.cgi?id=30916
-
---- binutils-2.41/binutils/testsuite/binutils-all/addr2line.exp.old 2023-07-02 18:00:00.000000000 -0500
-+++ binutils-2.41/binutils/testsuite/binutils-all/addr2line.exp 2023-09-22 20:44:37.242158767 -0500
-@@ -20,7 +20,7 @@
- set exe [exeext]
-
- # powerpc64 function symbols are on descriptors rather than code.
--if [istarget powerpc64-*-*] {
-+if { [istarget powerpc64-*-*] && ![istarget powerpc64-*-musl] } {
- set opts --synthetic
- set dot {\.}
- }
diff --git a/system/binutils/remove-pr19719-test.patch b/system/binutils/remove-pr19719-test.patch
index 09786fee6..24f44479b 100644
--- a/system/binutils/remove-pr19719-test.patch
+++ b/system/binutils/remove-pr19719-test.patch
@@ -1,7 +1,7 @@
We always use -fPIE (it's in our spec file), so it isn't possible to test this.
--- binutils-2.30/ld/testsuite/ld-elf/shared.exp.old 2018-05-25 06:28:07.252414401 +0000
+++ binutils-2.30/ld/testsuite/ld-elf/shared.exp 2018-05-25 06:51:50.637028357 +0000
-@@ -1657,5 +1657,4 @@
+@@ -1593,5 +1593,4 @@
}
}
diff --git a/system/binutils/remove-pr2404-tests.patch b/system/binutils/remove-pr2404-tests.patch
index 8dd7db65d..94ea63996 100644
--- a/system/binutils/remove-pr2404-tests.patch
+++ b/system/binutils/remove-pr2404-tests.patch
@@ -2,7 +2,7 @@ These tests fail to link correctly on musl.
--- binutils-2.41/ld/testsuite/ld-elf/shared.exp.old 2023-09-22 20:47:52.781342124 -0500
+++ binutils-2.41/ld/testsuite/ld-elf/shared.exp 2023-09-22 20:54:03.151915244 -0500
-@@ -799,30 +799,6 @@
+@@ -800,30 +800,6 @@
run_cc_link_tests [list \
[list \
@@ -33,7 +33,7 @@ These tests fail to link correctly on musl.
"Build libpr26590a.so" \
"-shared" \
"-fPIC" \
-@@ -1132,17 +1108,6 @@
+@@ -1133,17 +1107,6 @@
[list "Run relmain" \
"-Wl,--no-as-needed,-rpath=tmpdir -Ltmpdir -lrel" "" \
{relmain.c} "relmain" "relmain.out" ] \
@@ -51,7 +51,7 @@ These tests fail to link correctly on musl.
[list "Run pr18458" \
"-Wl,--no-as-needed,-z,now tmpdir/libpr18458a.so tmpdir/libpr18458b.so" "" \
{pr18458c.c} "pr18458" "pass.out" ] \
-@@ -1341,14 +1306,6 @@
+@@ -1338,14 +1303,6 @@
|| [istarget *-*-gnu*] } {
run_cc_link_tests [list \
[list \
@@ -66,7 +66,7 @@ These tests fail to link correctly on musl.
"Build pr19579a.o" \
"" "-fPIE -fcommon" \
{pr19579a.c} \
-@@ -1428,24 +1385,6 @@
+@@ -1425,24 +1382,6 @@
"-fPIE" \
] \
[list \
diff --git a/system/binutils/skip-thumb-plt-musl.patch b/system/binutils/skip-thumb-plt-musl.patch
deleted file mode 100644
index f88500de2..000000000
--- a/system/binutils/skip-thumb-plt-musl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-The file offsets are different causing this test to fail on hard-float EABI targets.
-
-Add musl target triplet alongside the glibc one.
-
-Upstream-URL: https://sourceware.org/bugzilla/show_bug.cgi?id=30923
-
---- binutils-2.41/ld/testsuite/ld-arm/thumb-plt.d.old 2023-07-02 23:00:00.000000000 +0000
-+++ binutils-2.41/ld/testsuite/ld-arm/thumb-plt.d 2023-09-30 11:03:51.611314942 +0000
-@@ -2,7 +2,7 @@
- #name: Thumb only PLT and GOT
- #ld: -shared -e0 -z max-page-size=0x10000
- #objdump: -dr
--#skip: *-*-pe *-*-wince *-*-vxworks armeb-*-* *-*-gnueabihf
-+#skip: *-*-pe *-*-wince *-*-vxworks armeb-*-* *-*-gnueabihf *-*-musleabihf
-
- .*: +file format .*arm.*
-
---- binutils-2.41/ld/testsuite/ld-arm/thumb-plt-got.d.old 2023-07-02 23:00:00.000000000 +0000
-+++ binutils-2.41/ld/testsuite/ld-arm/thumb-plt-got.d 2023-09-30 11:04:19.175314931 +0000
-@@ -2,7 +2,7 @@
- #name: Thumb only PLT and GOT LSB Symbol
- #ld: -shared -e0 -z max-page-size=0x10000
- #readelf: -rx .got
--#skip: *-*-pe *-*-wince *-*-vxworks armeb-*-* *-*-gnueabihf
-+#skip: *-*-pe *-*-wince *-*-vxworks armeb-*-* *-*-gnueabihf *-*-musleabihf
-
- Relocation section '.rel.plt' at offset 0x108 contains 1 entry:
- Offset Info Type Sym.Value Sym. Name
diff --git a/system/binutils/vers-tests-eabi.patch b/system/binutils/vers-tests-eabi.patch
deleted file mode 100644
index 2ce59cee2..000000000
--- a/system/binutils/vers-tests-eabi.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-By default, the vers4 tests use `sed` to look for `Version` lines.
-
-The problem is, on 32-bit ARM targets we have Version5 EABI. This causes
-the tests to fail, like so:
-
- objdump --private-headers tmpdir/vers4b | sed -n /Version/,\$p > tmpdir/objdump.out
- private flags = 0x5000400: [Version5 EABI] [hard-float ABI]
-
- objdump_emptyverstuff: did not expect any output from objdump
- FAIL: vers4b
-
-Take 'private flags' lines out of the output to fix this.
-
-Upstream-URL: https://sourceware.org/bugzilla/show_bug.cgi?id=30924
-
---- binutils-2.41/ld/testsuite/ld-elfvers/vers.exp.old 2023-09-30 21:51:47.304868575 -0500
-+++ binutils-2.41/ld/testsuite/ld-elfvers/vers.exp 2023-09-30 21:52:49.738253244 -0500
-@@ -215,11 +215,14 @@
- # this probably means that there is version information in libc, so we
- # can't really perform this test.
- return 1
-+ } else { if { [string match "*Version? EABI*" $exec_output] } then {
-+# there is EABI Version information in the private flags of the binary.
-+ return 1
- } else {
- verbose -log "$exec_output"
- verbose -log "objdump_emptyverstuff: did not expect any output from objdump"
- return 0
-- } }
-+ } } }
-
- }
-
diff --git a/system/binutils/x86_64-missing-test.patch b/system/binutils/x86_64-missing-test.patch
new file mode 100644
index 000000000..e6544c1a1
--- /dev/null
+++ b/system/binutils/x86_64-missing-test.patch
@@ -0,0 +1,91 @@
+From: Indu Bhagat <indu.bhagat@oracle.com>
+Date: Tue, 30 Jan 2024 08:35:04 +0000 (-0800)
+Subject: gas: scfi: add missing ginsn-cofi-1 testcase files
+X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=48942a586ebc056bd059d3f63a5eed3a2fa46ab3;hp=7586594c484bbc2a1fb472b988c7e9cbc08c8416
+
+gas: scfi: add missing ginsn-cofi-1 testcase files
+
+Previous commit a58dc5427f0 intended to bring the following two commits
+from master branch:
+
+ 91cdbed4d7b gas: scfi: untraceable control flow should be a hard error
+ 16cbeae1b27 x86: testsuite: scfi: adjust COFI testcase
+
+But missed adding the testcase files. Fix the failure by adding the
+missing files.
+
+gas/testsuite/
+ * gas/scfi/x86_64/ginsn-cofi-1.l: New test.
+ * gas/scfi/x86_64/ginsn-cofi-1.s: Likewise.
+---
+
+diff --git a/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l b/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l
+new file mode 100644
+index 00000000000..ab6b50d47e8
+--- /dev/null
++++ b/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l
+@@ -0,0 +1,38 @@
++.*: Assembler messages:
++.*:20: Error: untraceable control flow for func 'foo'
++GAS LISTING .*
++
++
++ 1 # Testcase with a variety of "change of flow instructions"
++ 2 #
++ 3 # This test does not have much going on wrt synthesis of CFI;
++ 4 # it just aims to ensure x8_64 -> ginsn decoding behaves
++ 5 # gracefully for these "change of flow instructions"
++ 6 .text
++ 7 .globl foo
++ 8 .type foo, @function
++ 8 ginsn: SYM FUNC_BEGIN
++ 9 foo:
++ 9 ginsn: SYM foo
++ 10 \?\?\?\? 4801D0 addq %rdx, %rax
++ 10 ginsn: ADD %r1, %r0, %r0
++ 11 \?\?\?\? E200 loop foo
++ 11 ginsn: JCC
++ 12 \?\?\?\? 3EFFE0 notrack jmp \*%rax
++ 12 ginsn: JMP %r0,
++ 13 \?\?\?\? 41FFD0 call \*%r8
++ 13 ginsn: CALL
++ 14 \?\?\?\? 67E305 jecxz .L179
++ 14 ginsn: JCC
++ 15 \?\?\?\? FF6730 jmp \*48\(%rdi\)
++ 15 ginsn: JMP %r5,
++ 16 \?\?\?\? 7000 jo .L179
++ 16 ginsn: JCC
++ 17 .L179:
++ 17 ginsn: SYM .L179
++ 18 \?\?\?\? C3 ret
++ 18 ginsn: RET
++ 19 .LFE0:
++ 19 ginsn: SYM .LFE0
++ 20 .size foo, .-foo
++ 20 ginsn: SYM FUNC_END
+diff --git a/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s b/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s
+new file mode 100644
+index 00000000000..0a63910e046
+--- /dev/null
++++ b/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s
+@@ -0,0 +1,20 @@
++# Testcase with a variety of "change of flow instructions"
++#
++# This test does not have much going on wrt synthesis of CFI;
++# it just aims to ensure x8_64 -> ginsn decoding behaves
++# gracefully for these "change of flow instructions"
++ .text
++ .globl foo
++ .type foo, @function
++foo:
++ addq %rdx, %rax
++ loop foo
++ notrack jmp *%rax
++ call *%r8
++ jecxz .L179
++ jmp *48(%rdi)
++ jo .L179
++.L179:
++ ret
++.LFE0:
++ .size foo, .-foo