Subject: add compile flags for hardening
Author: Joachim Wiedorn <ad_debian at joonet.de>
Forwarded: no
-Last-Update: 2013-06-08
+Last-Update: 2013-07-02
-To support hardening CFLAGS and LDFLAGS must be used
-by compiler executions.
+To support hardening CFLAGS and LDFLAGS must be usable
+for all compiler commands.
---
diff -urNa s10/src/Makefile s11/src/Makefile
--- s10/src/Makefile 2013-06-07 22:44:13.000000000 +0200
-+++ s11/src/Makefile 2013-06-08 13:16:36.415275904 +0200
-@@ -16,14 +16,14 @@
-
- SHELL=/bin/sh
- CC=gcc
--CPP=$(CC) -E -P -ffreestanding
-+CPP=$(CC) -E
- AS86=as86 -0 -a
- LD86=ld86 -0
- NASM=nasm
++++ s11/src/Makefile 2013-07-02 21:08:53.456876190 +0200
+@@ -23,7 +23,6 @@
G=`cat foo1 foo2 | grep version | cut -d " " -f 3`
--CFLAGS=$(OPT) -Wall $(PCONFIG)
+ CFLAGS=$(OPT) -Wall $(PCONFIG)
-LDFLAGS=#-Xlinker -qmagic
-+FREE=-P -ffreestanding
-+CFLAGS=$(FREE) $(OPT) -Wall $(PCONFIG)
LIBS=$(DEVMAPPER)
OBJS=lilo.o raid.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o \
-@@ -79,7 +79,7 @@
+@@ -79,7 +78,7 @@
echo $(MAN_DIR)
.c.o:
.s.o:
$(AS86) -w -l $*.lis -o $*.o $*.s
-@@ -91,7 +91,7 @@
+@@ -91,7 +90,7 @@
dd if=$*.img of=$*.b bs=32 skip=1
edit: $(EDIT)
loader.i: mkloader first.b second.b third.b bitmap.b mbr.b chain.b mbr2.b
./mkloader >loader.i
-@@ -100,30 +100,30 @@
+@@ -100,30 +99,30 @@
cp disk.b disk.com
disk.s: disk.S read.S bdata.h biosdata.S lilo.h Makefile
-DSIZEKRNL=`wc -c <disk.com | sed "s/ //g"` \
-DSIZEDISKB=512 -o pseudo1.s $(TMP).S
rm -f $(TMP).S
-@@ -131,7 +131,7 @@
+@@ -131,7 +130,7 @@
pseudo2.s: bootsect.S pseudo.S
$(MAKE) -C ../diagnose all
cat bootsect.S pseudo.S >$(TMP).S
-DSIZEKRNL=`wc -c <../diagnose/test4.com | sed "s/ //g"` \
-DSIZEDISKB=512 -o pseudo2.s $(TMP).S
rm -f $(TMP).S
-@@ -139,7 +139,7 @@
+@@ -139,7 +138,7 @@
pseudo3.s: bootsect.S pseudo.S
$(MAKE) -C ../diagnose all
cat bootsect.S pseudo.S >$(TMP).S
-DSIZEKRNL=`wc -c <../diagnose/test5.com | sed "s/ //g"` \
-DSIZEDISKB=512 -o pseudo3.s $(TMP).S
rm -f $(TMP).S
-@@ -176,13 +176,13 @@
+@@ -176,13 +175,13 @@
cp -p dparam.S dparam.s
lilo: $(OBJS)
bitmap.o: bitmap.s common.s
third.o: third.s common.s
-@@ -191,25 +191,25 @@
+@@ -191,25 +190,25 @@
chain.o: chain.s common.s
first.s: first.S lilo.h version.h Makefile
$(OBJS): Makefile
-@@ -254,14 +254,14 @@
+@@ -254,14 +253,14 @@
dep:
sed '/\#\#\# Dependencies/q' <Makefile >tmp_make