summaryrefslogtreecommitdiffstats
path: root/gnu-efi-3.0/Make.defaults
diff options
context:
space:
mode:
Diffstat (limited to 'gnu-efi-3.0/Make.defaults')
-rw-r--r--gnu-efi-3.0/Make.defaults8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu-efi-3.0/Make.defaults b/gnu-efi-3.0/Make.defaults
index 38da180..0585915 100644
--- a/gnu-efi-3.0/Make.defaults
+++ b/gnu-efi-3.0/Make.defaults
@@ -46,6 +46,10 @@ TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
HOSTARCH = $(shell uname -m | sed s,i[3456789]86,ia32,)
ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,)
+# FreeBSD (and possibly others) reports amd64 instead of x86_64
+ifeq ($(ARCH), amd64)
+ARCH = x86_64
+endif
OS = $(shell uname -s)
INCDIR = -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) -I$(TOPDIR)/inc/protocol
GCCVERSION := $(shell gcc -dumpversion | cut -f1 -d.)
@@ -56,9 +60,9 @@ CPPFLAGS = -DCONFIG_$(ARCH)
ifeq ($(GCCNEWENOUGH),1)
CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
endif
-CFLAGS = $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants
+CFLAGS = $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check
ASFLAGS = $(ARCH3264)
-LDFLAGS = -nostdlib
+LDFLAGS = -nostdlib --no-undefined
INSTALL = install
prefix = /usr/bin/