[PATCH 2/2] binutils: Properly run target tests

H.J. Lu hjl.tools@gmail.com
Fri Sep 26 06:17:21 GMT 2025


1. Add binutils-flags.m4 to define BINUTILS_CFLAGS_FOR_TARGET to disable
LTO and the integrated assembler for binutils tests.
2. Set LD_CLANG_PLUGIN_OPTION to the clang plugin option for linker and
pass it to default_ld_relocate so that "ld -r" works on LLVM bitcode
files.  This fixes bootstrap.exp for clang LTO build.

binutils/

PR binutils/33483
* Makefile.am (CFLAGS_FOR_TARGET_TEST): New.
(check-DEJAGNU): Set CFLAGS_FOR_TARGET to
$(CFLAGS_FOR_TARGET_TEST).
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Regenerated.
* configure.ac: AC_SUBST CFLAGS_FOR_TARGET and
CFLAGS_FOR_TARGET_TEST.

config/

PR binutils/33483
* binutils-flags.m4: New file.

ld/

PR binutils/33483
* Makefile.am (CFLAGS_FOR_TARGET_TEST): Use filter-out on
$(CFLAGS_FOR_TARGET) and add @CFLAGS_FOR_TARGET_TEST@.
(CXXFLAGS_FOR_TARGET_TEST): Use filter-out on
$(CXXFLAGS_FOR_TARGET) and add @CFLAGS_FOR_TARGET_TEST@.
(check-DEJAGNU): Set CFLAGS_FOR_TARGET to
$(CFLAGS_FOR_TARGET_TEST).  Set CXXFLAGS_FOR_TARGET to
$(CXXFLAGS_FOR_TARGET_TEST).  Pass LD_PLUGIN_OPTION.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Regenerated.
* configure.ac: AC_SUBST LD_PLUGIN_OPTION, CFLAGS_FOR_TARGET,
CXXFLAGS_FOR_TARGET and CFLAGS_FOR_TARGET_TEST.
* testsuite/config/default.exp (ld_relocate): Pass
LD_PLUGIN_OPTION to default_ld_relocate.

libctf/

PR binutils/33483
* Makefile.am (CFLAGS_FOR_TARGET_TEST): New.
(check-DEJAGNU): Set CFLAGS_FOR_TARGET to
$(CFLAGS_FOR_TARGET_TEST).  Pass $(AR_FOR_TARGET) as AR.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
* configure.ac: AC_SUBST CFLAGS_FOR_TARGET and
CFLAGS_FOR_TARGET_TEST.

OK for master?

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-binutils-Properly-run-target-tests.patch
Type: text/x-patch
Size: 32440 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250926/ea7d1f06/attachment-0001.bin>


More information about the Binutils mailing list