Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 May 2011 03:40:12 +0400
From:      Pan Tsu <inyaoo@gmail.com>
To:        freebsd-toolchain@freebsd.org
Subject:   [clang] boot2 fails to build with DEBUG_FLAGS?
Message-ID:  <86zkm74srn.fsf@gmail.com>

next in thread | raw e-mail | index | archive | help
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



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