Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 9b6866b106eb3ad11115bd591a23e65a68dd847d Mon Sep 17 00:00:00 2001 |
| 2 | From: Andrea Adami <andrea.adami@gmail.com> |
| 3 | Date: Tue, 21 Aug 2018 16:31:44 +0200 |
| 4 | Subject: [PATCH 11/11] purgatory Makefile: adapt to klcc |
| 5 | |
| 6 | Upstream-Status: Inappropriate [klibc specific] |
| 7 | Signed-off-by: Andrea Adami <andrea.adami@gmail.com> |
| 8 | --- |
| 9 | purgatory/Makefile | 6 +++--- |
| 10 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 11 | |
| 12 | diff --git a/purgatory/Makefile b/purgatory/Makefile |
| 13 | index 49ce80a..72eefaa 100644 |
| 14 | --- a/purgatory/Makefile |
| 15 | +++ b/purgatory/Makefile |
| 16 | @@ -47,7 +47,7 @@ purgatory/sha256.o: $(srcdir)/util_lib/sha256.c |
| 17 | $(PURGATORY): CC=$(TARGET_CC) |
| 18 | $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \ |
| 19 | $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ |
| 20 | - -Os -fno-builtin -ffreestanding \ |
| 21 | + -Os -fno-builtin -ffreestanding -nostdinc \ |
| 22 | -fno-zero-initialized-in-bss \ |
| 23 | -fno-PIC -fno-PIE -fno-stack-protector |
| 24 | |
| 25 | @@ -59,8 +59,8 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ |
| 26 | -Iinclude \ |
| 27 | -I$(shell $(CC) -print-file-name=include) |
| 28 | $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ |
| 29 | - -Wl,--no-undefined -nostartfiles -nostdlib \ |
| 30 | - -nodefaultlibs -e purgatory_start -r \ |
| 31 | + -Wl,--no-undefined -Wl,-no-pie -Wl,-nostartfiles -Wl,-nostdlib \ |
| 32 | + -Wl,-nodefaultlibs -Wl,--entry=purgatory_start -Wl,-r \ |
| 33 | -Wl,-Map=$(PURGATORY_MAP) |
| 34 | |
| 35 | $(PURGATORY): $(PURGATORY_OBJS) |
| 36 | -- |
| 37 | 2.7.4 |
| 38 | |