[Debian-lego-team] Bug#1015360: Bug#1015360: Bug#1015360: binutils-h8300-hms: ftbfs with LTO (link time optimization) enabled
Matthew Sheets
ms.github at outlook.com
Sat Nov 1 20:51:19 GMT 2025
I added '-flo' to both CFLAGS and LDFLAGS on the GitHub project I referenced earlier:
* https://github.com/BrickBot/GNU-Legacy-Toolchain/
When the GitHub Actions ran, both binutils-2.16.1 and gdb-5.3 built successfully,
but builds attempting to compile gcc-3.4.6 or gcc-4.4.7 failed on both the
Ubuntu-latest and Windows-latest (Cygwin) runners.
* https://github.com/BrickBot/GNU-Legacy-Toolchain/actions/runs/19001870329/job/54269729899
* https://github.com/BrickBot/GNU-Legacy-Toolchain/actions/runs/19001870329/job/54269729899#step:10:46431
Log snippet:
gcc -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -o cc1plus \
cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-lang.o cp/name-lookup.o cp/cxx-pretty-print.o attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o c-dump.o c-pretty-print.o c-opts.o c-pch.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o main.o libbackend.a libcpp.a ../libiberty/libiberty.a
/usr/bin/ld: cp/except.o: in function `nothrow_libfn_p':
except.c:(.text+0x1767): undefined reference to `libc_name_p'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/runner/work/GNU-Legacy-Toolchain/GNU-Legacy-Toolchain/sym-combined/gcc3/gcc/cp/Make-lang.in:90: cc1plus] Error 1
make[2]: Leaving directory '/home/runner/work/GNU-Legacy-Toolchain/GNU-Legacy-Toolchain/build/gcc3/gcc'
make[1]: *** [Makefile:23658: all-gcc] Error 2
make[1]: Leaving directory '/home/runner/work/GNU-Legacy-Toolchain/GNU-Legacy-Toolchain/build/gcc3'
make: *** [Makefile:38: all-gcc3] Error 2
Error: Process completed with exit code 2.
- c.f. https://github.com/BrickBot/GNU-Legacy-Toolchain/actions/runs/19001870329/job/54269729899#step:10:46431
As reference, sys/pstat.h is detected as being unavailable:
checking for sys/pstat.h... no
- c.f. https://github.com/BrickBot/GNU-Legacy-Toolchain/actions/runs/19001870329/job/54269729899#step:10:862
In short, with the codebase on GitHub, link-time optimization does not appear to be an
obstacle to building binutils 2.16.1 but outstanding issues do appear to exist in GCC.
I have created an "link-time-optimization" branch on GitHub, along with an issue for
tracking tracking resolution of the GCC builds.
* https://github.com/BrickBot/GNU-Legacy-Toolchain/issues/13
Thank you,
Matthew
More information about the Debian-lego-team
mailing list