summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIcenowy Zheng <[email protected]>2016-04-09 09:38:40 +0800
committerFrans Kaashoek <[email protected]>2016-09-26 08:25:17 -0400
commit91fd3470b0c48b93f14b9f941ee3ffd753b7441c (patch)
tree1406f559bd3802007e531b06309f820dedcbef9e /Makefile
parent907f23a5bbf17972becc5c84b4378c9ff4aa437a (diff)
downloadxv6-labs-91fd3470b0c48b93f14b9f941ee3ffd753b7441c.tar.gz
xv6-labs-91fd3470b0c48b93f14b9f941ee3ffd753b7441c.tar.bz2
xv6-labs-91fd3470b0c48b93f14b9f941ee3ffd753b7441c.zip
Fixed broken build on newer gold linker with NaCl support
On platforms with NaCl support, ld.gold -V will return a "elf_i386_nacl" in addition to "elf_i386", which will make the build fail.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 84faa48..93d525a 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,7 @@ CFLAGS = -fno-pic -static -fno-builtin -fno-strict-aliasing -O2 -Wall -MD -ggdb
CFLAGS += $(shell $(CC) -fno-stack-protector -E -x c /dev/null >/dev/null 2>&1 && echo -fno-stack-protector)
ASFLAGS = -m32 -gdwarf-2 -Wa,-divide
# FreeBSD ld wants ``elf_i386_fbsd''
-LDFLAGS += -m $(shell $(LD) -V | grep elf_i386 2>/dev/null)
+LDFLAGS += -m $(shell $(LD) -V | grep elf_i386 2>/dev/null | head -n 1)
xv6.img: bootblock kernel fs.img
dd if=/dev/zero of=xv6.img count=10000