aboutsummaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2008-10-17 18:24:04 +0100
committerMichael Brown <mcb30@etherboot.org>2008-10-17 18:24:04 +0100
commitd9c38d14d678a6aba6d6d52cb4ba079c38fe3a96 (patch)
treec132cd2a06f0f0b868168c3cbf3a36bb918915dc /src/arch
parent5600955bdd20d95d6509617457cfa9d0d7b464b7 (diff)
downloadipxe-d9c38d14d678a6aba6d6d52cb4ba079c38fe3a96.tar.gz
[build] Fix building on FreeBSD
FreeBSD requires the object format to be specified as elf_i386_fbsd, rather than elf_i386. Based on a patch from Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/i386/Makefile b/src/arch/i386/Makefile
index dac534932..7d3e76399 100644
--- a/src/arch/i386/Makefile
+++ b/src/arch/i386/Makefile
@@ -38,8 +38,12 @@ CFLAGS += -freg-struct-return
# Force 32-bit code even on an x86-64 machine
#
CFLAGS += -m32
-ASFLAGS += --32
-LDFLAGS += -m elf_i386
+ASFLAGS += --32
+ifeq ($(HOST_OS),FreeBSD)
+LDFLAGS += -m elf_i386_fbsd
+else
+LDFLAGS += -m elf_i386
+endif
# EFI requires -fshort-wchar, and nothing else currently uses wchar_t
#