aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@linux.intel.com>2011-06-07 20:53:08 +0100
committerMatt Fleming <matt.fleming@linux.intel.com>2011-07-21 11:35:10 +0100
commit251a008c666b3961fafbc83291173bd82aedf5de (patch)
treeb46e3ef4f7a10c8dc0cb09bb962e24aa27ead410
parentbb7abe6ad361fc68f18d215811b0d7470b093027 (diff)
downloadefilinux-251a008c666b3961fafbc83291173bd82aedf5de.tar.gz
Makefile: Build in a -ffreestanding environment
Tell GCC that we're compiling in a freestanding environment, e.g. one in which standard libraries do not exist and in which GCC should not use builtin functions. This allows us to reuse some of the common function names, such as exit(), but with our own implementation. Turning off builtin functions also stops warnings like the following from being emitted, efilinux.h:187:1: warning: conflicting types for built-in function ‘exit’ Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cd8306c..59fc760 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@ CRT0=$(LIBDIR)/gnuefi/crt0-efi-$(ARCH).o
LDSCRIPT=$(LIBDIR)/gnuefi/elf_$(ARCH)_efi.lds
CFLAGS=-I. -I/usr/include/efi -I/usr/include/efi/$(ARCH) \
- -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar
+ -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding
LDFLAGS=-T $(LDSCRIPT) -Bsymbolic -shared -nostdlib -L$(LIBDIR) $(CRT0)
IMAGE=efilinux.efi