> 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.
It's just as easy to add the -fno-stack-protector flag if the compiler supports it. > 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' That's the failure at hand yes. > 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 That's different, [i]div_long is asking for a 64-bit division, which isn't a native instruction but implemented by the GCC support lib (libgcc), and you're explicitly building without it. Segher -- linuxbios mailing list linuxbios@linuxbios.org http://www.openbios.org/mailman/listinfo/linuxbios