[Differential] [Request, 37 lines] D2187: Ensure cross assembler, linker and objcopy are used for the build32 stage
dim (Dimitry Andric)
phabric-noreply at FreeBSD.org
Tue Mar 31 20:54:13 UTC 2015
dim created this revision.
dim added reviewers: imp, bapt, rodrigc.
dim added a subscriber: freebsd-toolchain.
Herald added a subscriber: imp.
REVISION SUMMARY
When I tried replicating Craig Rodrigues's efforts at building head
with the amd64-xtoolchain-gcc package, I noticed that during the build32
stage it still uses the base system ld and objcopy:
[...]
--- lib/csu/i386-elf__L ---
ld -m elf_i386_fbsd -Y P,/usr/obj/home/dim/head/lib32/usr/lib32 -o crt1.o -r crt1_s.o crt1_c.o
[...]
--- lib/csu/i386-elf__L ---
objcopy --localize-symbol _start1 crt1.o
[...]
--- lib/csu/i386-elf__L ---
ld -m elf_i386_fbsd -Y P,/usr/obj/home/dim/head/lib32/usr/lib32 -o Scrt1.o -r crt1_s.o Scrt1_c.o
[...]
--- lib/csu/i386-elf__L ---
objcopy --localize-symbol _start1 Scrt1.o
And a bunch more of those. I went through the various Makefiles I could
find, replacing literal 'objcopy' with ${OBJCOPY}, which fixes the case
for objcopy.
Also, I changed LD=${LD} and AS=${AS} to use their X variants in the
definition of LIB32WMAKEFLAGS in Makefile.inc1, and added
OBJCOPY=${XOBJCOPY} to the list.
Together, these changes should ensure that the cross tools are always
used instead of the base system tools.
TEST PLAN
A make universe is probably required, at least.
BRANCH
/head
REVISION DETAIL
https://reviews.freebsd.org/D2187
AFFECTED FILES
Makefile.inc1
lib/csu/i386-elf/Makefile
sys/boot/i386/boot2/Makefile
sys/boot/i386/gptboot/Makefile
sys/boot/i386/gptzfsboot/Makefile
sys/boot/i386/zfsboot/Makefile
sys/boot/mips/beri/boot2/Makefile
sys/boot/pc98/boot0.5/Makefile
sys/boot/pc98/boot0/Makefile
sys/boot/pc98/boot2/Makefile
To: dim, imp, bapt, rodrigc
Cc: imp, freebsd-toolchain
More information about the freebsd-toolchain
mailing list