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