ld: Use run_cc_link_tests for PR ld/26391 tests

Message ID 20230117154125.601189-1-hjl.tools@gmail.com
State Accepted
Headers
Series ld: Use run_cc_link_tests for PR ld/26391 tests |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

H.J. Lu Jan. 17, 2023, 3:41 p.m. UTC
  Use run_cc_link_tests for PR ld/26391 tests to compile PR ld/26391 tests
in C.

	PR ld/30002
	* testsuite/ld-elf/elf.exp: Use run_cc_link_tests for PR ld/26391
	tests.
---
 ld/testsuite/ld-elf/elf.exp | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
  

Comments

Nick Clifton Jan. 24, 2023, 1:30 p.m. UTC | #1
Hi H.J.

> Use run_cc_link_tests for PR ld/26391 tests to compile PR ld/26391 tests
> in C.
> 
> 	PR ld/30002
> 	* testsuite/ld-elf/elf.exp: Use run_cc_link_tests for PR ld/26391
> 	tests.

Approved - please apply.

Cheers
   Nick
  
Sam James April 28, 2023, 7:14 a.m. UTC | #2
Nick Clifton via Binutils <binutils@sourceware.org> writes:

> Hi H.J.
>
>> Use run_cc_link_tests for PR ld/26391 tests to compile PR ld/26391 tests
>> in C.
>> 	PR ld/30002
>> 	* testsuite/ld-elf/elf.exp: Use run_cc_link_tests for PR ld/26391
>> 	tests.
>
> Approved - please apply.

Hi folks,

Did this one get lost? Thanks!

This should fix the tests on our sparc sourceware builder.

>
> Cheers
>   Nick
best,
sam
  

Patch

diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index a3a8994749d..1fc77183a90 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -516,31 +516,24 @@  run_cc_link_tests [list \
 	{{nm "" pr26391.nd}} \
 	"pr26391-4" \
     ] \
-]
-
-run_ld_link_tests [list \
     [list \
 	"Build pr26391-5.o" \
-	"-z unique-symbol -r" \
-	"" \
-	"" \
+	"-Wl,-z,unique-symbol -r -nostdlib -nostartfiles" \
+	"-fno-function-sections" \
 	{pr26391a.c pr26391b.c pr26391c.c pr26391d.c} \
 	[list \
 	    [list "nm" "$dep_plug_opt" "pr26391.nd"] \
 	    [list "nm" "$dep_plug_opt" "pr26391.fd"] \
 	] \
 	"pr26391-5.o" \
-	"-fno-function-sections" \
     ] \
     [list \
 	"Build pr26391-6.o" \
-	"-z unique-symbol -r" \
-	"" \
-	"" \
+	"-Wl,-z,unique-symbol -r -nostdlib -nostartfiles" \
+	"-ffunction-sections" \
 	{pr26391a.c pr26391b.c pr26391c.c pr26391d.c} \
 	{{nm "" pr26391.nd}} \
 	"pr26391-6.o" \
-	"-ffunction-sections" \
     ] \
 ]