From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7919) id 2BD843857BA2; Wed, 20 Dec 2023 02:38:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BD843857BA2 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sam James To: bfd-cvs@sourceware.org Subject: [binutils-gdb/binutils-2_41-branch] Fix ld/x86: reduce testsuite dependency on system object files X-Act-Checkin: binutils-gdb X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/binutils-2_41-branch X-Git-Oldrev: b3e64983c42c9b943b5c5aaee27c252ea4ae3533 X-Git-Newrev: 64707a2e11d16bb2ddddcf3a90e486d89d96ea3d Message-Id: <20231220023831.2BD843857BA2@sourceware.org> Date: Wed, 20 Dec 2023 02:38:31 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2023 02:38:31 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D64707a2e11d1= 6bb2ddddcf3a90e486d89d96ea3d commit 64707a2e11d16bb2ddddcf3a90e486d89d96ea3d Author: H.J. Lu Date: Fri Dec 1 09:13:08 2023 -0800 Fix ld/x86: reduce testsuite dependency on system object files =20 commit eab996435fe65a421541f59557c5f1fd427573a3 Author: Jan Beulich Date: Tue Nov 7 13:58:32 2023 +0100 =20 ld/x86: reduce testsuite dependency on system object files =20 changed some C compiler tests to assembler/linker tests which introduced 2 problems: =20 1. It broke x32 binutils tests since --64 was passed to assembler, but -m elf_x86_64 wasn't passed to linker. 2. -nostdlib was passed to C compiler driver to exclude standard run-ti= me files which should be avoided with -r option for linker tests. =20 Fix them by passing -m elf_x86_64 to linker and removing -nostdlib for linker tests with -r. =20 PR ld/30722 * testsuite/ld-x86-64/x86-64.exp: Pass -m elf_x86_64 to linker for tests with --64. Remove -nostdlib for tests with -r. =20 (cherry picked from commit 260aa570edcf120332daefb4a102a08c90e4d9b4) Diff: --- ld/testsuite/ld-x86-64/x86-64.exp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86= -64.exp index 123152df5b0..bc736696cd0 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -2100,7 +2100,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 3" \ - "" \ + "-m elf_x86_64" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-stk.s property-x86-1.s} \ @@ -2109,7 +2109,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 3 (.o)" \ - "-r -nostdlib" \ + "-m elf_x86_64 -r" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-x86-1.s property-stk.s} \ @@ -2118,7 +2118,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 3 (.so)" \ - "-shared" \ + "-m elf_x86_64 -shared" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-x86-1.s property-stk.s} \ @@ -2127,7 +2127,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 4" \ - "" \ + "-m elf_x86_64" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-stk.s property-x86-1.s property-x86-2.s} \ @@ -2136,7 +2136,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 4 (.o)" \ - "-r -nostdlib" \ + "-m elf_x86_64 -r" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-x86-2.s property-x86-1.s property-stk.s} \ @@ -2145,7 +2145,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 4 (.so)" \ - "-shared" \ + "-m elf_x86_64 -shared" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-x86-2.s property-x86-1.s property-stk.s} \ @@ -2154,7 +2154,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 4 (-z stack-size=3D0)" \ - "-z stack-size=3D0" \ + "-m elf_x86_64 -z stack-size=3D0" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-stk.s property-x86-1.s property-x86-2.s} \ @@ -2163,7 +2163,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 5" \ - "-z stack-size=3D0x900000" \ + "-m elf_x86_64 -z stack-size=3D0x900000" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-stk.s property-x86-1.s property-x86-2.s} \ @@ -2172,7 +2172,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 5 (.o)" \ - "-r -nostdlib -z stack-size=3D0x900000" \ + "-m elf_x86_64 -r -z stack-size=3D0x900000" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-x86-2.s property-x86-1.s property-stk.s} \ @@ -2181,7 +2181,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build property 5 (.so)" \ - "-shared -z stack-size=3D0x900000" \ + "-m elf_x86_64 -shared -z stack-size=3D0x900000" \ "" \ "--64 -defsym __64_bit__=3D1 -mx86-used-note=3Dyes" \ {property-x86-2.s property-x86-1.s property-stk.s} \