Link x86-64 mark-plt-1.so with --no-as-needed

Message ID ZcHZbTFf/DLnqZAX@squeak.grove.modra.org
State New
Headers
Series Link x86-64 mark-plt-1.so with --no-as-needed |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 warning Patch is already merged

Commit Message

Alan Modra Feb. 6, 2024, 7:02 a.m. UTC
  Fixes
FAIL: Build mark-plt-1.so
where gcc is built with default --as-needed.

	* testsuite/ld-x86-64/x86-64.exp (Build mark-plt-1.so): Pass
	--no-as-needed.
  

Patch

diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index a1a0422cea2..e370f393a7a 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -2263,7 +2263,7 @@  if { [check_compiler_available] } {
     run_cc_link_tests [list \
 	[list \
 	    "Build mark-plt-1.so" \
-	    "-shared -Wl,-z,mark-plt,-z,pack-relative-relocs" \
+	    "-shared -Wl,--no-as-needed,-z,mark-plt,-z,pack-relative-relocs" \
 	    "-fPIC" \
 	    { mark-plt-1.s } \
 	    {{readelf {-W --version-info} mark-plt-1a.rd} \