Bug 213454 - mips64 BERI boot components fail to build with CROSS_TOOLCHAIN=mips64-gcc
Summary: mips64 BERI boot components fail to build with CROSS_TOOLCHAIN=mips64-gcc
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: mips Any
: --- Affects Only Me
Assignee: freebsd-mips (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-10-13 15:52 UTC by Ed Maste
Modified: 2022-07-18 13:55 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2016-10-13 15:52:12 UTC
buildworld fails with:

===> sys/boot/mips/beri/boot2 (all)
/usr/local/mips64-freebsd/bin/ld -nostdlib -static -N -G0 -L/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2 -nostdlib -T /tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/flashboot.ldscript -o flashboot.elf         relocate.o start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a
/usr/local/mips64-freebsd/bin/ld: relocate.o: ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file relocate.o
/usr/local/mips64-freebsd/bin/ld: start.o: ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file start.o
/usr/local/mips64-freebsd/bin/ld: boot2.o: ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file boot2.o
/usr/local/mips64-freebsd/bin/ld: altera_jtag_uart.o: ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file altera_jtag_uart.o
/usr/local/mips64-freebsd/bin/ld: cfi.o: ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file cfi.o
/usr/local/mips64-freebsd/bin/ld: sdcard.o: ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file sdcard.o
/usr/local/mips64-freebsd/bin/ld: /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(strsep.o): ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(strsep.o)
/usr/local/mips64-freebsd/bin/ld: /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(memcpy.o): ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(memcpy.o)
/usr/local/mips64-freebsd/bin/ld: /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(strcmp.o): ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(strcmp.o)
/usr/local/mips64-freebsd/bin/ld: /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(printf.o): ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(printf.o)
/usr/local/mips64-freebsd/bin/ld: /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(strlen.o): ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(strlen.o)
/usr/local/mips64-freebsd/bin/ld: /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(bcd.o): ABI is incompatible with that of the selected emulation
/usr/local/mips64-freebsd/bin/ld: failed to merge target specific data of file /tank/emaste/obj/mips.mips64/tank/emaste/src/freebsd/sys/boot/mips/beri/boot2/../../../../../lib/libstand/libstand.a(bcd.o)
*** Error code 1 (ignored)
/usr/local/mips64-freebsd/bin/objcopy -S -O binary flashboot.elf flashboot
/usr/local/mips64-freebsd/bin/objcopy: 'flashboot.elf': No such file
*** Error code 1 (ignored)

(jtagboot and beri/loader fail with the same errors)
Comment 1 Brooks Davis freebsd_committer freebsd_triage 2016-10-13 23:05:16 UTC
This diff allowed it to build when I tried a couple weeks ago at EuroBSDCon.  I didn't attempt to test it:

Index: sys/boot/mips/beri/common/common.ldscript
===================================================================
--- sys/boot/mips/beri/common/common.ldscript   (revision 306227)
+++ sys/boot/mips/beri/common/common.ldscript   (working copy)
@@ -73,5 +73,5 @@
 __kernel_base__ = 0x100000;
 __kernel_vaddr__ = __mips64_xkphys_cached__ + __kernel_base__;
 
-OUTPUT_FORMAT("elf64-tradbigmips");
+OUTPUT_FORMAT("elf64-tradbigmips-freebsd");
 OUTPUT_ARCH(mips)
Comment 2 Ed Maste freebsd_committer freebsd_triage 2016-10-14 19:07:45 UTC
> This diff allowed it to build when I tried a couple weeks ago at EuroBSDCon.

It looks like that fixes the build with external tool chain, but breaks it with in-tree ld?
Comment 3 Ed Maste freebsd_committer freebsd_triage 2022-07-18 13:55:23 UTC
MIPS removed from main