Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fail to build libgcc_s for 060



/*
 * Background: netbsd is hideously slow on 68060, and takes well over six
 * minutes to boot to a login prompt. When I first tried to investigate it
 * on 8.0_BETA on my A4000/060 the other year, it seemed to spend
 * disproportionate amounts of time taking emultraps, so I want to build
 * a fully 68060-tuned netbsd for comparison.
 */

In my (low intensity) quest to build a (w)hol(l)y 68060 tuned netbsd release, I've had problems getting both kernels and userland built for 060, but I think I've got that part sorted out - in theory at least:

* First, I built all kernels (only) with "build.sh ... tools kernels" letting the kernel config(s) do the work to get the compiler flags right, and this works a charm afaict.

* Then I returned to build the userland ("build.sh -u ... release"), pointing $MAKECONF to a file containing only "CPUFLAGS=-m68060". This used to work fine for userland, but cause problems when I tried to build all in one go, because it would invariably spill into kernel builds and break the asm files - but now I got all kernels built beforehand.

However, with yesterday's -current source, this latter step now appears to break userland, while building the target libgcc:

#     build  libgcc_s/libgcc_s.so.1.0
rm -f libgcc_s.so.1.0
/storage/NetBSD/builds/amiga060/tools/bin/m68k--netbsdelf-gcc -nodefaultlibs -shared -Wl,-soname,libgcc_s.so.1 -Wl,--warn-shared-textrel -Wl,-Map=libgcc_s.so.1.map --sysroot=/storage/NetBSD/builds/amiga060/obj/usr/src/destdir.amiga -nodefaultlibs -Wl,-z -Wl,nodelete -Wl,--version-script=/storage/NetBSD/builds/amiga060/obj/usr/src/external/gpl3/gcc/lib/libgcc/libgcc_s/libgcc.map -o libgcc_s.so.1.0.tmp -Wl,-rpath,/lib -L=/lib -Wl,-x -Wl,--whole-archive libgcc_s_pic.a -Wl,--no-whole-archive/storage/NetBSD/builds/amiga060/tools/lib/gcc/m68k--netbsdelf/7.4.0/../../../../m68k--netbsdelf/bin/ld: libgcc_s_pic.a(_float.pico):(.text+0x8): relocation truncated to fit: R_68K_PLT16 against symbol `$_exception_handler' defined in .text section in libgcc_s_pic.a(_floatex.pico)
/storage/NetBSD/builds/amiga060/tools/lib/gcc/m68k--netbsdelf/7.4.0/../../../../m68k--netbsdelf/bin/ld: libgcc_s_pic.a(_float.pico):(.text+0x18): relocation truncated to fit: R_68K_PLT16 against symbol `$_exception_handler' defined in .text section in libgcc_s_pic.a(_floatex.pico)
/storage/NetBSD/builds/amiga060/tools/lib/gcc/m68k--netbsdelf/7.4.0/../../../../m68k--netbsdelf/bin/ld: libgcc_s_pic.a(_float.pico):(.text+0x22): relocation truncated to fit: R_68K_PLT16 against symbol `$_exception_handler' defined in .text section in libgcc_s_pic.a(_floatex.pico)
/storage/NetBSD/builds/amiga060/tools/lib/gcc/m68k--netbsdelf/7.4.0/../../../../m68k--netbsdelf/bin/ld: libgcc_s_pic.a(_float.pico):(.text+0x2c): relocation truncated to fit: R_68K_PLT16 against symbol `$_exception_handler' defined in .text section in libgcc_s_pic.a(_floatex.pico)
/storage/NetBSD/builds/amiga060/tools/lib/gcc/m68k--netbsdelf/7.4.0/../../../../m68k--netbsdelf/bin/ld: libgcc_s_pic.a(_float.pico):(.text+0x3c): relocation truncated to fit: R_68K_PLT16 against symbol `$_exception_handler' defined in .text section in libgcc_s_pic.a(_floatex.pico)
collect2: error: ld returned 1 exit status

*** Failed target:  libgcc_s.so.1.0
*** Failed command: /storage/NetBSD/builds/amiga060/tools/bin/m68k--netbsdelf-gcc -nodefaultlibs -shared -Wl,-soname,libgcc_s.so.1 -Wl,--warn-shared-textrel -Wl,-Map=libgcc_s.so.1.map --sysroot=/storage/NetBSD/builds/amiga060/obj/usr/src/destdir.amiga -nodefaultlibs -Wl,-z -Wl,nodelete -Wl,--version-script=/storage/NetBSD/builds/amiga060/obj/usr/src/external/gpl3/gcc/lib/libgcc/libgcc_s/libgcc.map -o libgcc_s.so.1.0.tmp -Wl,-rpath,/lib -L=/lib -Wl,-x -Wl,--whole-archive libgcc_s_pic.a -Wl,--no-whole-archive
*** Error code 1

Stop.
nbmake[8]: stopped in /usr/src/external/gpl3/gcc/lib/libgcc/libgcc_s

*** Failed target:  dependall
*** Failed command: cd "/usr/src/external/gpl3/gcc/lib/libgcc/libgcc_s"; /storage/NetBSD/builds/amiga060/tools/bin/nbmake realall

It seems strange that libgcc would not build for 68060, but -m68060 is really the only thing I've manipulated here; looking at the compile flags for the (generated asm) floatex.pico, it looks like:

#   compile  libgcc_s/_floatex.pico
/storage/NetBSD/builds/amiga060/tools/bin/m68k--netbsdelf-gcc -m68060 -fPIE --sysroot=/storage/NetBSD/builds/amiga060/obj/usr/src/destdir.amiga -I/usr/src/external/gpl3/gcc/lib/libgcc/libgcc_s -I/usr/src/external/gpl3/gcc/lib/libgcc/arch/m68k -I/usr/src/external/gpl3/gcc/usr.bin/gcc/arch/m68k -DIN_GCC -DIN_LIBGCC2 -I/usr/src/external/gpl3/gcc/dist/libgcc -I/usr/src/external/gpl3/gcc/dist/libgcc/. -I/usr/src/external/gpl3/gcc/dist/libgcc/../gcc -I/usr/src/external/gpl3/gcc/dist/libgcc/../include -fPIC -fbuilding-libgcc -fno-stack-protector -I/usr/src/external/gpl3/gcc/dist/gcc/config/m68k -I/usr/src/external/gpl3/gcc/dist/gcc/ginclude -I/usr/src/external/gpl3/gcc/dist/libgcc -I/usr/src/external/gpl3/gcc/dist/libgcc/config -I/usr/src/external/gpl3/gcc/dist/libgcc/config/m68k -I/usr/src/external/gpl3/gcc/dist/gcc -I/usr/src/external/gpl3/gcc/dist/include -I. -DHAVE_CC_TLS -I/storage/NetBSD/builds/amiga060/obj/usr/src/external/gpl3/gcc/usr.bin/backend -x assembler-with-cpp -c -fPIC _floatex.S -o _floatex.pico

..and there's indeed nothing else funky going on with the compiler flags.

This whole build machinery is pretty opaque to me, so I'm not sure how to proceed. Surely it must be possible to build the target gcc specifically for 68060?

(CPUFLAGS spilling into the libgcc build would indicate that the target system's gcc might become unable to build anything but 68060 binaries, but that's fine for now)

Best regards,
Ali:)


Home | Main Index | Thread Index | Old Index