summaryrefslogtreecommitdiff
blob: aa6c9c373c9f3a6283669abda074065dcee132ed (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff -Naurp memtest86+-1.70-orig/Makefile memtest86+-1.70/Makefile
--- memtest86+-1.70-orig/Makefile	2007-01-27 15:17:59.000000000 +0100
+++ memtest86+-1.70/Makefile	2007-01-27 15:31:43.000000000 +0100
@@ -8,23 +8,21 @@
 #
 FDISK=/dev/fd0
 
-CC=gcc
 #
 # gcc compiler options, these settings should suffice
 #
-CCFLAGS=-Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding
-
-AS=as -32
+CCFLAGS=-Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector
+ASFLAGS=-32
 
 OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o extra.o random.o dmi.o
 
 all: memtest.bin memtest
 
 reloc.o: reloc.c
-	$(CC) -c -m32 -march=i486 -fPIC -Wall -g -O2 -fno-strict-aliasing reloc.c
+	$(CC) -c -m32 -march=i486 -fPIC -Wall -g -O2 -fno-strict-aliasing -fno-stack-protector reloc.c
 
 test.o: test.c test.h defs.h config.h
-	$(CC) -c $(CCFLAGS) test.c
+	$(CC) -c $(CCFLAGS) -fno-PIC test.c
 
 main.o: main.c test.h defs.h
 	$(CC) -c $(CCFLAGS) -fPIC main.c
@@ -69,9 +67,9 @@ head.s: head.S
 	$(CC) -E -m32 -traditional $< -o $@
 
 head.o: head.s
-	$(AS) -o $@ $<
+	$(AS) $(ASFLAGS) -o $@ $<
 dmi.o:	dmi.c test.h
-	 $(CC) -c $(CCFLAGS) -fPIC dmi.c
+	$(CC) -c $(CCFLAGS) -fPIC dmi.c
 
 makedefs: makedefs.c defs.h
 	$(CC) $(CCFLAGS) makedefs.c -o $@
@@ -94,7 +92,7 @@ bootsect.s: bootsect.S defs.h
 	$(CC) -E -traditional $< -o $@
 
 bootsect.o: bootsect.s
-	$(AS) -o $@ $<
+	$(AS) $(ASFLAGS) -o $@ $<
 
 bootsect: bootsect.o
 	$(LD) -Ttext 0x00 -s --oformat binary -e _main --just-symbols=memtest_shared.o -o $@ $<
@@ -103,7 +101,7 @@ setup.s: setup.S config.h defs.h
 	$(CC) -E -traditional $< -o $@
 
 setup.o: setup.s
-	$(AS) -o $@ $<
+	$(AS) $(ASFLAGS) -o $@ $<
 
 
 memtest.bin: memtest_shared.bin bootsect.o setup.o memtest.bin.lds