Skip to content

Restore ld_bfd finding libgcc to link with it, fix bootstrap build for linux-armhf#33

Open
illwieckz wants to merge 1 commit into
masterfrom
illwieckz/ldbfd-libgcc
Open

Restore ld_bfd finding libgcc to link with it, fix bootstrap build for linux-armhf#33
illwieckz wants to merge 1 commit into
masterfrom
illwieckz/ldbfd-libgcc

Conversation

@illwieckz

@illwieckz illwieckz commented Jul 3, 2026

Copy link
Copy Markdown
Member

Restore ld_bfd finding libgcc to link with it, fix bootstrap build for linux-armhf.

Fixup for:

Fixes:

arm-linux-gnueabihf-ld.bfd: nacl_bootstrap.dir/nacl_bootstrap.c.o: in function `iov_int_string':
nacl_bootstrap.c:118: undefined reference to `__aeabi_idivmod'

@illwieckz illwieckz requested a review from slipher July 3, 2026 05:05
@illwieckz illwieckz mentioned this pull request Jul 3, 2026
@illwieckz illwieckz changed the title ld_bfd: link with libgcc Restore ld_bfd finding libgcc to link with it, fix bootstrap build for linux-armhf Jul 3, 2026
@slipher

slipher commented Jul 3, 2026

Copy link
Copy Markdown
Member

How are you using it? It works for me in the Scons build for both GCC and Clang. With Clang (scons --mode=opt-host,nacl saigo=1 werror=0 platform=arm all_programs -j9) the command issued is:

env CXX='/usr/bin/clang++' /usr/bin/python3 /unv/nacl/src/trusted/service_runtime/linux/ld_bfd.py --compiler arm-linux-gnueabihf-g++ -m armelf_linux_eabi --build-id -static -z max-page-size=0x1000 --orphan-handling=discard --defsym RESERVE_TOP=0x40002000 --script /unv/nacl/src/trusted/service_runtime/linux/nacl_bootstrap.x -o scons-out/opt-linux-arm/obj/src/trusted/service_runtime/nacl_bootstrap_raw scons-out/opt-linux-arm/obj/src/trusted/service_runtime/linux/nacl_bootstrap.o

With GCC (scons --mode=opt-host,nacl saigo=1 werror=0 platform=arm all_programs -j9 --no-clang) the command issued is:

env CXX='arm-linux-gnueabihf-g++' /usr/bin/python3 /unv/nacl/src/trusted/service_runtime/linux/ld_bfd.py --compiler arm-linux-gnueabihf-g++ -m armelf_linux_eabi --build-id -static -z max-page-size=0x1000 --orphan-handling=discard --defsym RESERVE_TOP=0x40002000 --script /unv/nacl/src/trusted/service_runtime/linux/nacl_bootstrap.x -o scons-out/opt-linux-arm/obj/src/trusted/service_runtime/nacl_bootstrap_raw scons-out/opt-linux-arm/obj/src/trusted/service_runtime/linux/nacl_bootstrap.o

Anyway surely you don't need this junk? It was described as only being needed to avoid using gold but that hardly exists any more. I would have gotten rid of it but didn't feel like untangling everything at the moment. For a new build surely you could just set it in the toolchain file or whatever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants