[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] ld: don't hardcode "-melf_i386"



On FreeBSD, the name of the emulation is "-melf_i386_fbsd", so allow
SeaBIOS to fetch the emulation to use from the environment variables.

This allows SeaBIOS to compile on FreeBSD with gcc.

Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 Makefile |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 759bbbb..6a51305 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@ STRIP=strip
 PYTHON=python
 CPP=cpp
 IASL:=iasl
+LD32BIT_FLAG:=-melf_i386
 
 # Default targets
 -include $(KCONFIG_CONFIG)
@@ -143,8 +144,8 @@ $(OUT)romlayout16.lds: $(OUT)ccode32flat.o 
$(OUT)code32seg.o $(OUT)ccode16.o $(O
        @echo "  Building ld scripts"
        $(Q)./tools/buildversion.sh $(OUT)version.c
        $(Q)$(CC) $(CFLAGS32FLAT) -c $(OUT)version.c -o $(OUT)version.o
-       $(Q)$(LD) -melf_i386 -r $(OUT)ccode32flat.o $(OUT)version.o -o 
$(OUT)code32flat.o
-       $(Q)$(LD) -melf_i386 -r $(OUT)ccode16.o $(OUT)romlayout.o -o 
$(OUT)code16.o
+       $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o 
$(OUT)code32flat.o
+       $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o 
$(OUT)code16.o
        $(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump
        $(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump
        $(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.