Browse files

Use ctfmerge/convert to get proper debug info

  • Loading branch information...
1 parent c7f9ded commit 74d05a21c0285fc0340ea53cb8fd120c98bd6318 @xl0 xl0 committed Aug 25, 2011
Showing with 19 additions and 1 deletion.
  1. +8 −1 virtio/Makefile
  2. +5 −0 virtio_blk/Makefile
  3. +6 −0 virtio_net/Makefile
View
9 virtio/Makefile
@@ -2,9 +2,13 @@
#CFLAGS=-D_KERNEL -DDEBUG -m64 -xarch=sse2a -xmodel=kernel -g
CFLAGS= -D_KERNEL -DDEBUG -m64 -mcmodel=kernel -mno-red-zone -ffreestanding -nodefaultlibs -Wall -g
-
LDFLAGS=-r
+ONDIR=/opt/onbld/bin/i386
+CTFMERGE=$(ONDIR)/ctfmerge
+CTFCONVERT=$(ONDIR)/ctfconvert
+
+
#CC=/opt/SUNWspro/bin/cc
CC=gcc
LD=/usr/ccs/bin/ld
@@ -13,8 +17,11 @@ all: virtio
virtio: virtio.c virtiovar.h virtioreg.h
$(CC) $(CFLAGS) -c virtio.c -o virtio.o
+ $(CTFCONVERT) -i -L VERSION virtio.o
$(CC) $(CFLAGS) -c util.c -o util.o
+ $(CTFCONVERT) -i -L VERSION util.o
$(LD) $(LDFLAGS) virtio.o util.o -o virtio
+ $(CTFMERGE) -L VERSION -o virtio virtio.o util.o
clean:
rm -f virtio virtio.o util.o
View
5 virtio_blk/Makefile
@@ -3,14 +3,19 @@
CFLAGS= -DDEBUG -D_KERNEL -m64 -mcmodel=kernel -mno-red-zone -ffreestanding -nodefaultlibs -I../virtio -Wall -g
LDFLAGS=-r -dy -N misc/mac -N misc/virtio -N drv/blkdev
+ONDIR=/opt/onbld/bin/i386
+CTFMERGE=$(ONDIR)/ctfmerge
+CTFCONVERT=$(ONDIR)/ctfconvert
#CC=/opt/SUNWspro/bin/cc
CC=gcc
LD=/usr/ccs/bin/ld
all: vioblk
vioblk: vioblk.c ../virtio/virtiovar.h
$(CC) $(CFLAGS) -c vioblk.c -o vioblk.o
+ $(CTFCONVERT) -i -L VERSION vioblk.o
$(LD) $(LDFLAGS) vioblk.o -o vioblk
+ $(CTFMERGE) -L VERSION -o vioblk vioblk.o
clean:
rm -f vioblk vioblk.o
View
6 virtio_net/Makefile
@@ -3,6 +3,10 @@
CFLAGS= -D_KERNEL -DDEBUG -m64 -mcmodel=kernel -mno-red-zone -ffreestanding -nodefaultlibs -I../virtio -Wall -g
LDFLAGS=-r -dy -N misc/mac -N misc/virtio
+ONDIR=/opt/onbld/bin/i386
+CTFMERGE=$(ONDIR)/ctfmerge
+CTFCONVERT=$(ONDIR)/ctfconvert
+
#CC=/opt/SUNWspro/bin/cc
CC=gcc
LD=/usr/ccs/bin/ld
@@ -11,7 +15,9 @@ all: vioif
vioif: vioif.c ../virtio/virtiovar.h
$(CC) $(CFLAGS) -c vioif.c -o vioif.o
+ $(CTFCONVERT) -i -L VERSION vioif.o
$(LD) $(LDFLAGS) vioif.o -o vioif
+ $(CTFMERGE) -L VERSION -o vioif vioif.o
clean:
rm -f vioif vioif.o

0 comments on commit 74d05a2

Please sign in to comment.