aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ctf
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-08-19 04:59:10 -0700
committerH.J. Lu <hjl.tools@gmail.com>2025-08-20 13:33:15 -0700
commitcf03cf4e8879bbfe6b90160ff3fda63feb2a898f (patch)
tree618b3e78f7361f102bc5d05c3fd28793f5b8c27d /ld/testsuite/ld-ctf
parent46373d8d659e049f0a4c73a2654911b4c4b8010c (diff)
downloadbinutils-cf03cf4e8879bbfe6b90160ff3fda63feb2a898f.zip
binutils-cf03cf4e8879bbfe6b90160ff3fda63feb2a898f.tar.gz
binutils-cf03cf4e8879bbfe6b90160ff3fda63feb2a898f.tar.bz2
ld: Compile some tests with -mdirect-extern-access
When GCC enables -mno-direct-extern-access by default, some tests fail without -mdirect-extern-access. Define DIRECT_EXTERN_ACCESS_CFLAGS to compile these tests with -mdirect-extern-access. Also pass "-z noindirect-extern-access" to linker to support the C library compiled with -mno-direct-extern-access. PR ld/33267 * testsuite/config/default.exp (DIRECT_EXTERN_ACCESS_CFLAGS): New. * testsuite/ld-elf/linux-x86.exp: Compile some tests with $DIRECT_EXTERN_ACCESS_CFLAGS. * testsuite/ld-elfvers/vers.exp (need_direct_extern_access): New for i?86. Compile tests with $need_direct_extern_access. * testsuite/ld-i386/i386.exp: Compile some tests with $DIRECT_EXTERN_ACCESS_CFLAGS. * testsuite/ld-ifunc/ifunc.exp (need_direct_extern_access): New for i?86. Compile tests with $need_direct_extern_access. * testsuite/ld-shared/shared.exp (need_direct_extern_access): New for i?86. Compile tests with $need_direct_extern_access. * testsuite/ld-srec/srec.exp (CFLAGS_FOR_TARGET_TEST): Add $DIRECT_EXTERN_ACCESS_CFLAGS. (CXXFLAGS_FOR_TARGET_TEST): Likewise. * testsuite/ld-vsb/vsb.exp (need_direct_extern_access): New for i?86. Compile tests with $need_direct_extern_access. * testsuite/ld-x86-64/x86-64.exp: Compile some tests with $DIRECT_EXTERN_ACCESS_CFLAGS and link some tests with "-Wl,-z,noindirect-extern-access". Co-Authored-By: Sam James <sam@gentoo.org> Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'ld/testsuite/ld-ctf')
0 files changed, 0 insertions, 0 deletions