From fb6ac163adc48a20be9d0a8de4c691b73431d3dd Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 13 Jan 2022 12:51:12 +1030 Subject: testsuite supports_dt_relr Tidy, and fix "FAIL: Build dt-relr-glibc-1b.so" on all non-x86 linux targets. binutils/ * binutils-common.exp (supports_dt_relr): New proc. ld/ * testsuite/config/default.exp (DT_RELR_LDFLAGS, NO_DT_RELR_LDFLAGS), (DT_RELR_CC_LDFLAGS, NO_DT_RELR_CC_LDFLAGS): Use supports_dt_relr. * testsuite/ld-elf/dt-relr.exp: Don't run unless supports_dt_relr. * testsuite/ld-elf/dt-relr-1a.d: Likewise. * testsuite/ld-elf/dt-relr-1b.d: Likewise. * testsuite/ld-elf/dt-relr-1c.d: Likewise. * testsuite/ld-elf/dt-relr-2a.d: Likewise. * testsuite/ld-elf/dt-relr-2b.d: Likewise. * testsuite/ld-elf/dt-relr-2c.d: Likewise. * testsuite/ld-elf/dt-relr-2d.d: Likewise. * testsuite/ld-elf/dt-relr-2e.d: Likewise. * testsuite/ld-elf/dt-relr-2f.d: Likewise. * testsuite/ld-elf/dt-relr-2g.d: Likewise. * testsuite/ld-elf/dt-relr-2h.d: Likewise. * testsuite/ld-elf/dt-relr-3a.d: Likewise. * testsuite/ld-elf/dt-relr-3b.d: Likewise. --- binutils/testsuite/lib/binutils-common.exp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'binutils/testsuite') diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index 88fdc1a..93603b0 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -427,6 +427,16 @@ proc supports_persistent_section {} { return 0; } +# Whether a target support DT_RELR sections. +proc supports_dt_relr {} { + if { ([istarget x86_64-*-*] || [istarget i?86-*-*]) + && ([istarget *-*-linux*] + || [istarget *-*-gnu*]) } { + return 1 + } + return 0 +} + # Compare two files line-by-line. FILE_1 is the actual output and FILE_2 # is the expected output. Ignore blank lines in either file. # -- cgit v1.1