summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-03 22:16:19 +0200
committerKay Sievers <kay@vrfy.org>2012-07-03 22:16:19 +0200
commit5b8125c2146e4b963592ccae192a7b76a7a72106 (patch)
tree00d2d51468efca1993b28a829f881570b1c66824
parent9c5dce74cebd36f81f3b01683e74067e16cdff08 (diff)
Makefile: add libgcc
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 130342d..ba7c5af 100644
--- a/Makefile
+++ b/Makefile
@@ -11,13 +11,13 @@ CPPFLAGS = \
CFLAGS = \
-DVERSION=$(VERSION) \
-Wall \
- -g -O0 \
+ -ggdb -O0 \
-fpic \
-fshort-wchar \
- -ffreestanding \
- -nostdlib \
-nostdinc \
+ -ffreestanding \
-fno-stack-protector
+# -mno-red-zone
ifeq ($(ARCH),x86_64)
CFLAGS += \
@@ -30,7 +30,8 @@ LDFLAGS = -T $(LIBDIR)/gnuefi/elf_$(ARCH)_efi.lds \
-nostdlib \
-znocombreloc \
-L $(LIBDIR) \
- $(LIBDIR)/gnuefi/crt0-efi-$(ARCH).o
+ $(LIBDIR)/gnuefi/crt0-efi-$(ARCH).o \
+ $(shell $(CC) -print-libgcc-file-name)
%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@