core: move "-g -F stabs" to NASMOPT
authorH. Peter Anvin <hpa@zytor.com>
Sun, 17 May 2009 05:12:41 +0000 (22:12 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sun, 17 May 2009 05:12:41 +0000 (22:12 -0700)
Move -g -F stabs to NASMOPT.  Eventually we might need to disable them
for older versions of NASM, since the linker seems to get unhappy
about mixing older NASM stabs with gcc stabs.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/Makefile

index 8c2f772..57d1dcb 100644 (file)
@@ -51,6 +51,8 @@ LIB    = libcore.a
 LIBS    = $(LIB) $(com32)/lib/libcom32.a $(LIBGCC)
 LIBOBJS         = $(COBJ)
 
+NASMOPT += -g -F stabs
+
 # The DATE is set on the make command line when building binaries for
 # official release.  Otherwise, substitute a hex string that is pretty much
 # guaranteed to be unique to be unique from build to build.
@@ -78,8 +80,9 @@ iso%.bin: iso%.elf checksumiso.pl
        $(OBJCOPY) -O binary $< $@
 
 %.o: %.asm kwdhash.gen ../version.gen
-       ( $(NASM) -M -DDEPEND $(NINCLUDE) -o $@ $< ; echo '' ) > .$@.d; true
-       $(NASM) $(NASMOPT) -f elf -g -F stabs -DDATE_STR="'$(DATE)'" \
+       ( $(NASM) -f elf $(NASMOPT) -M -DDEPEND $(NINCLUDE) \
+         -o $@ $< ; echo '' ) > .$@.d; true
+       $(NASM) -f elf $(NASMOPT) -DDATE_STR="'$(DATE)'" \
                -DHEXDATE="$(HEXDATE)" \
                -l $(@:.o=.lsr) -o $@ $<