summaryrefslogtreecommitdiff
blob: bff0f4c6527005b6dfa682848d2370a3e83a9190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From eb869303b0c140e806f81f022211648e42290d6d Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@gmx.de>
Date: Wed, 18 Feb 2015 21:26:43 +0100
Subject: Add -fno-delete-null-pointer-checks compiler option

Otherwise gcc-4.9 will miscompile the IPL bootloader since it
will optimize out accesses to PAGE0
---
 ipl/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ipl/Makefile b/ipl/Makefile
index 7695ea5..6b8e105 100644
--- a/ipl/Makefile
+++ b/ipl/Makefile
@@ -38,7 +38,7 @@ endif
 # Source sharing with palo
 VPATH=../lib:.
 
-CFLAGS	= -DIPL_LOADER -I. -I../lib -I../include -O2 -mdisable-fpregs -Wall
+CFLAGS	= -DIPL_LOADER -I. -I../lib -I../include -O2 -mdisable-fpregs -Wall -fno-delete-null-pointer-checks
 LDFLAGS  = -N --section-start .init=0x60000 -e '$$START$$'
 
 all:	iplelf
@@ -61,8 +61,6 @@ distclean: clean
 .S.o:
 	$(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c -o $*.o $<
 
-###############}
-
 byteio.o \
 ext2.o \
 fileio.o \
-- 
cgit v0.12