[clang] boot2 fails to build with DEBUG_FLAGS?
Pan Tsu
inyaoo at gmail.com
Sat May 28 00:05:27 UTC 2011
While compiling boot blocks with debug symbols may not be very useful
having DEBUG_FLAGS in make.conf is not uncommon.
$ make CC=clang DEBUG_FLAGS=-g
[...]
objcopy -S -O binary boot2.out boot2.bin
btxld -v -E 0x2000 -f bin -b /usr/obj/usr/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr -o boot2.ld -P 1 boot2.bin
kernel: ver=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1
client: fmt=bin size=16ed text=0 data=0 bss=0 entry=0
output: fmt=bin size=1f7d text=200 data=1d7d org=0 entry=0
-381 bytes available
*** Error code 1
$ make CC=clang
[...]
objcopy -S -O binary boot2.out boot2.bin
btxld -v -E 0x2000 -f bin -b /usr/obj/usr/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr -o boot2.ld -P 1 boot2.bin
kernel: ver=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1
client: fmt=bin size=1505 text=0 data=0 bss=0 entry=0
output: fmt=bin size=1d95 text=200 data=1b95 org=0 entry=0
107 bytes available
[...]
$ make CC=gcc DEBUG_FLAGS=-g
[...]
objcopy -S -O binary boot2.out boot2.bin
btxld -v -E 0x2000 -f bin -b /usr/obj/usr/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr -o boot2.ld -P 1 boot2.bin
kernel: ver=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1
client: fmt=bin size=13bd text=0 data=0 bss=0 entry=0
output: fmt=bin size=1c4d text=200 data=1a4d org=0 entry=0
435 bytes available
[...]
$ make CC=gcc
[...]
objcopy -S -O binary boot2.out boot2.bin
btxld -v -E 0x2000 -f bin -b /usr/obj/usr/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr -o boot2.ld -P 1 boot2.bin
kernel: ver=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1
client: fmt=bin size=13bd text=0 data=0 bss=0 entry=0
output: fmt=bin size=1c4d text=200 data=1a4d org=0 entry=0
435 bytes available
[...]
--
FreeBSD 9.0-CURRENT #0 r222354M amd64
More information about the freebsd-toolchain
mailing list