f5bb5f006e
(Fixes linker issue, ld: memtest_shared: not enough room for program headers) Don't create multiple definitions. Remove workarounds for old GCC/NetBSD. boots in QEMU, but reboots (crashes) very quickly. Bump PKGREVISION
43 lines
1.3 KiB
Text
43 lines
1.3 KiB
Text
$NetBSD: patch-aa,v 1.8 2019/02/09 09:13:24 maya Exp $
|
|
|
|
--- Makefile.orig 2013-08-10 02:01:58.000000000 +0000
|
|
+++ Makefile
|
|
@@ -7,12 +7,12 @@
|
|
#
|
|
# Path for the floppy disk device
|
|
#
|
|
-FDISK=/dev/fd0
|
|
+FDISK=/dev/fd0a
|
|
|
|
AS=as -32
|
|
CC=gcc
|
|
|
|
-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
|
|
+CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
|
|
-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
|
|
|
|
OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
|
|
@@ -20,8 +20,7 @@ OBJS= head.o reloc.o main.o test.o init.
|
|
smp.o vmem.o random.o
|
|
|
|
|
|
-all: clean memtest.bin memtest
|
|
- scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus
|
|
+all: memtest.bin memtest
|
|
|
|
# Link it statically once so I know I don't have undefined
|
|
# symbols and then link it dynamically so I have full
|
|
@@ -34,8 +33,11 @@ memtest_shared: $(OBJS) memtest_shared.l
|
|
memtest_shared.bin: memtest_shared
|
|
objcopy -O binary $< memtest_shared.bin
|
|
|
|
-memtest: memtest_shared.bin memtest.lds
|
|
- $(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@
|
|
+nbstart.s: nbstart.S config.h defs.h
|
|
+ $(CC) -E -traditional $< -o $@
|
|
+
|
|
+memtest: memtest_shared.bin memtest.lds nbstart.o
|
|
+ $(LD) -T memtest.lds -z max-page-size=0x1000 nbstart.o -b binary memtest_shared.bin -o $@
|
|
|
|
head.s: head.S config.h defs.h test.h
|
|
$(CC) -E -traditional $< -o $@
|