Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2011 18:19:05 +0200
From:      Roman Divacky <rdivacky@freebsd.org>
To:        Pan Tsu <inyaoo@gmail.com>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: [clang] boot2 fails to build with DEBUG_FLAGS?
Message-ID:  <20110530161905.GA91202@freebsd.org>
In-Reply-To: <86zkm74srn.fsf@gmail.com>
References:  <86zkm74srn.fsf@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I dont have the same environment (I am using trunk llvm/clang) but I cant
reproduce it here...

fwiw, with trunk llvm DEBUG_FLAGS dies in assembly stage because our as
does not know .cfi_section

On Sat, May 28, 2011 at 03:40:12AM +0400, Pan Tsu wrote:
> 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
> _______________________________________________
> freebsd-toolchain@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
> To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110530161905.GA91202>