Segher Boessenkool wrote:
Building a cross-compilation toolchain on a fast machine takes about 10 minutes, while building LinuxBIOS should take about 2 seconds.
Sure, but it can also take weeks to figure out that your toolchain is actually at fault
Or a 30-second post to the mailing list, or to search the archives. Perhaps we should add this to the wiki as a known issue?
I completely agree (and yes, I'm sure I agree this time). The machine I usually build on is a 1ghz P3, and LB takes long enough to build as it is (a couple minutes, usually), I don't really care for it to be any longer, especially if I'm just randomly poking around to see if I get things to work.
Could we perhaps parse the output of "gcc -v" before compiling, looking for "ubuntu" or "fedora" (or whatever those fedora guys add onto the version name)? Then offer a warning that the compiler may be broken with respect to linuxbios.
BTW, if you still want/need it, here's the error log compiled under Ubuntu 6.10 x64, with ubuntu's gcc 4.1.2:
gcc -m32 -nostdlib -nostartfiles -static -o linuxbios_ram -T /home/amp/LinuxBIOSv2/src/config/linuxbios_ram.ld linuxbios_ram.o linuxbios_ram.o: In function `number': vtxprintf.c:(.text+0x547e): undefined reference to `__stack_chk_fail' linuxbios_ram.o: In function `report_resource_stored': (.text+0x66e6): undefined reference to `__stack_chk_fail' linuxbios_ram.o: In function `init_processor_name': (.text+0x77fe): undefined reference to `__stack_chk_fail' linuxbios_ram.o: In function `amdk8_set_resources': northbridge.c:(.text+0xa965): undefined reference to `__stack_chk_fail' linuxbios_ram.o: In function `cpu_initialize': (.text+0x14c3b): undefined reference to `__stack_chk_fail' collect2: ld returned 1 exit status make[1]: *** [linuxbios_ram] Error 1 make[1]: Leaving directory `/home/amp/LinuxBIOSv2/targets/tyan/s2892/s2892/normal'
with 3.3.6, also from the repos, it's a bit different: gcc -m32 -nostdlib -nostartfiles -static -o linuxbios_ram -T /home/amp/LinuxBIOSv2/src/config/linuxbios_ram.ld linuxbios_ram.o linuxbios_ram.o: In function `idiv_long': (.text+0x11cb7): undefined reference to `__divdi3' linuxbios_ram.o: In function `idiv_long': (.text+0x11ccd): undefined reference to `__moddi3' linuxbios_ram.o: In function `div_long': (.text+0x11e1c): undefined reference to `__udivdi3' linuxbios_ram.o: In function `div_long': (.text+0x11e32): undefined reference to `__umoddi3' collect2: ld returned 1 exit status
I don't know if 64 bit could be causing any additional errors, but this seems very similar to what I get on my 32-bit laptop.
-Corey