pkgsrc/sysutils/memtestplus/patches/patch-aa
maya ac904311ab memtestplus: revert previous, disable optimization.
Hack to fix PR pkg/52962. Now memtestplus functions correctly for sure.
Inspired by opensuse package.
2018-01-29 14:23:26 +00:00

50 lines
1.7 KiB
Text

$NetBSD: patch-aa,v 1.7 2018/01/29 14:23:26 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,22 +20,24 @@ 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
# relocation information
memtest_shared: $(OBJS) memtest_shared.lds Makefile
- $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \
+ $(LD) --allow-multiple-definition --warn-constructors --warn-common -static -T memtest_shared.lds \
-o $@ $(OBJS) && \
- $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
+ $(LD) --allow-multiple-definition -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
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 $@