FS#70871 - [binutils] testsuite improvements
Attached to Project:
Arch Linux
Opened by Toolybird (Toolybird) - Friday, 14 May 2021, 23:39 GMT
Last edited by freswa (frederik) - Thursday, 10 February 2022, 19:01 GMT
Opened by Toolybird (Toolybird) - Friday, 14 May 2021, 23:39 GMT
Last edited by freswa (frederik) - Thursday, 10 February 2022, 19:01 GMT
|
Details
The binutils testsuite can be made to pass (including gold)
with just a few tweaks. There are multiple issues:
- PKGBUILD is missing checkdep on dejagnu (obviously due to the "manual" method of Arch toolchain bootstrap as documented here[1]). Fix this in the interest of correctness. - the linker testsuites (both ld and gold) are sensitive to `-fno-plt'. Filter this out. NOTE *just for the running of the testuite - not when building the binaries to be installed* - 3 ld tests need `-g'. Add this appropriately. - 1 gold test needs `dc'. Add bc to checkdeps. - gold testsuite is sensitive to Arch GCC default of `--enable-default-pie'. Negate this by adding `-no-pie' to FLAGS where appropriate. Note that -fpie also turns on PIC. Also add `-fno-PIC' where needed. Again, these tweaks are applied only to testsuite! - glibc-2.33 caused some bogus failures in ld tests wrt CPU ISA levels. Fixed upstream in binutils-2_36-branch. Add patch. - gcc-11 now defaults to DWARF 5 debugging format. gold support for DWARF 5 is missing in binutils-2.36. Fixed in upstream binutils git mainline. Add patch. I've attached a diff with all of the above included (tested with gcc-11 toolchain in testing). Also included are some minor tweaks which are hopefully not controversial but feel free to drop: - elfutils is a split package in Arch these days. The actual hard dep is on libelf. elfutils is needed for debuginfod which could be considered optional (but is needed in the testsuite). Reflect this in tweaks to deps. - `make configure-host' is a relic from the dark ages and is redundant. Once upon a time it was utilised to get cleaner log output for parallel make jobs. This is easily solved these days by calling `make -O'. Fix. Hopefully all of the above helps to improve confidence in the Arch toolchain. [1]: https://wiki.archlinux.org/title/DeveloperWiki:Toolchain_maintenance |
This task depends upon
Closed by freswa (frederik)
Thursday, 10 February 2022, 19:01 GMT
Reason for closing: Implemented
Additional comments about closing: r436887
Thursday, 10 February 2022, 19:01 GMT
Reason for closing: Implemented
Additional comments about closing: r436887
That's certainly an option. You may have seen my latest comment in the upstream bug report[1].
Your suggestion would nicely work around the bug.
libiberty is weird. It would be wonderful if the gcc and binutils versions stayed in perfect sync (I have seen some mumblings about git submodules...)
[1]: https://sourceware.org/bugzilla/show_bug.cgi?id=27360#c17
Best to move it to binutils again and align with the other major distros.
- remove patches already applied upstream
- Arch has split elfutils even further -> debuginfod now a separate pkg
- re-enable `--enable-shared'
- improved comments for testsuite
- (optional) add proper configure switches for if/when using a git checkout
1 new test failure has appeared but upstream are aware of it.
make -k -O CFLAGS_FOR_TARGET="-O2 -g" \
CXXFLAGS="-O2 -no-pie -fno-PIC" \
CFLAGS="-O2 -no-pie" \
LDFLAGS="" \
check || true
Still the 1 test suite failure.