From 28c1390cb1a5d881d4a4f9176dac470d2849e8e7 Mon Sep 17 00:00:00 2001 From: Michael Januszewski Date: Sat, 27 Jan 2007 14:44:43 +0000 Subject: Fix the linker script so that it handles the .gnu.hash section (thanks to Vapier for the patch) and remove hardcoded AS/CC settings (bug #163855). (Portage version: 2.1.2-r4) --- .../files/memtest86+-1.70-gnu_hash.patch | 11 ++++ .../files/memtest86+-1.70-hardcoded_cc.patch | 61 ++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch create mode 100644 sys-apps/memtest86+/files/memtest86+-1.70-hardcoded_cc.patch (limited to 'sys-apps/memtest86+/files') diff --git a/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch b/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch new file mode 100644 index 000000000000..5a9e06dc06d7 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-1.70-gnu_hash.patch @@ -0,0 +1,11 @@ +diff -Naurp memtest86+-1.70-orig/memtest_shared.lds memtest86+-1.70/memtest_shared.lds +--- memtest86+-1.70-orig/memtest_shared.lds 2007-01-27 13:34:16.000000000 +0100 ++++ memtest86+-1.70/memtest_shared.lds 2007-01-27 13:41:30.000000000 +0100 +@@ -18,6 +18,7 @@ SECTIONS { + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .hash : { *(.hash) } ++ .gnu.hash : { *(.gnu.hash) } + .dynamic : { *(.dynamic) } + + .rel.text : { *(.rel.text .rel.text.*) } diff --git a/sys-apps/memtest86+/files/memtest86+-1.70-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-1.70-hardcoded_cc.patch new file mode 100644 index 000000000000..aa6c9c373c9f --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-1.70-hardcoded_cc.patch @@ -0,0 +1,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 -- cgit v1.2.3-65-gdbad