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