From d7a90d3b5c73e2f5698d1635812164c0cfee32dc Mon Sep 17 00:00:00 2001 From: nelhage Date: Wed, 19 Sep 2007 23:49:52 +0000 Subject: [PATCH] This should fix building on FreeBSD --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8caac2c..15fe43e 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,8 @@ OBJDUMP = $(TOOLPREFIX)objdump CFLAGS = -fno-builtin -O2 -Wall -MD -ggdb -m32 CFLAGS += $(shell $(CC) -fno-stack-protector -E -x c /dev/null >/dev/null 2>&1 && echo -fno-stack-protector) ASFLAGS = -m32 -LDFLAGS = -m elf_i386 +# FreeBSD ld wants ``elf_i386_fbsd'' +LDFLAGS += -m $(shell $(LD) -V | grep elf_i386 2>/dev/null) xv6.img: bootblock kernel fs.img dd if=/dev/zero of=xv6.img count=10000