0009-Set-up-toolchain-and-scripts-for-i386.patch (1448B)
1 From 5087af9c6a9708c53f7455d33ed1c0a54a034119 Mon Sep 17 00:00:00 2001 2 From: zerous Naveen Narayanan <zerous@nocebo.space> 3 Date: Fri, 1 Nov 2019 20:43:25 +0100 4 Subject: [PATCH 09/11] Set up toolchain and scripts for i386 5 6 --- 7 config/toolchain/gnu.mk | 9 ++++----- 8 scripts/rules.mk | 7 ++++--- 9 2 files changed, 8 insertions(+), 8 deletions(-) 10 11 diff --git a/config/toolchain/gnu.mk b/config/toolchain/gnu.mk 12 index 8f193c6e..6d157df0 100644 13 --- a/config/toolchain/gnu.mk 14 +++ b/config/toolchain/gnu.mk 15 @@ -1,5 +1,3 @@ 16 -TOOLCFLAGS = -std=c99 17 - 18 COMP = gcc 19 ASM = as 20 LINKER = ld 21 @@ -7,6 +5,7 @@ RANLIB = ranlib 22 ARCHIVE = ar 23 24 ARCHIVEFLAGS = -U 25 -NOPIE_CFLAGS = -nopie 26 -NOPIE_LDFLAGS = -nopie 27 -TOOLCFLAGS = -std=c99 28 +NOPIE_CFLAGS = -no-pie 29 +NOPIE_LDFLAGS = -no-pie 30 +TOOLCFLAGS = -std=c99 -fno-stack-protector -no-pie 31 + 32 diff --git a/scripts/rules.mk b/scripts/rules.mk 33 index 29c71446..99cef334 100644 34 --- a/scripts/rules.mk 35 +++ b/scripts/rules.mk 36 @@ -1,5 +1,5 @@ 37 -CONF=amd64-linux 38 -TOOL=unix 39 +CONF=i386-linux 40 +TOOL=gnu 41 HOST=unix 42 include $(PROJECTDIR)/config/config/$(CONF).mk 43 include $(PROJECTDIR)/config/toolchain/$(TOOL).mk 44 @@ -31,6 +31,7 @@ SCC_CFLAGS =\ 45 $(SYSCFLAGS)\ 46 $(INCLUDE)\ 47 -g\ 48 + -O0\ 49 $(CFLAGS) 50 51 SCC_LDFLAGS =\ 52 @@ -64,7 +65,7 @@ FORALL = +@set -e ;\ 53 $(CC) $(SCC_LDFLAGS) -o $@ $< $(LIBS) 54 55 .s.o: 56 - $(AS) $(SCC_ASFLAGS) $< -o $@ 57 + $(AS) $(SCC_ASFLAGS) -g $< -o $@ 58 59 .c.o: 60 $(CC) $(SCC_CFLAGS) -o $@ -c $< 61 -- 62 2.23.0 63