summaryrefslogtreecommitdiff
path: root/sys-boot/aboot/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-19 17:57:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-19 17:57:29 +0100
commitd473a706836012853193afc7000922601e4ada61 (patch)
tree01c43bd6b2121d90bc97ead47dd7654d9402ea1d /sys-boot/aboot/files
parent420eeee727d39d869d864caddb04a80dafda7160 (diff)
gentoo resync : 19.10.2017
Diffstat (limited to 'sys-boot/aboot/files')
-rw-r--r--sys-boot/aboot/files/aboot-gnu90.patch26
-rw-r--r--sys-boot/aboot/files/aboot-respect-AR.patch13
2 files changed, 39 insertions, 0 deletions
diff --git a/sys-boot/aboot/files/aboot-gnu90.patch b/sys-boot/aboot/files/aboot-gnu90.patch
new file mode 100644
index 000000000000..2fb4b87f6b2c
--- /dev/null
+++ b/sys-boot/aboot/files/aboot-gnu90.patch
@@ -0,0 +1,26 @@
+This patch fixes multiple definitions of 'extern inline' functions.
+
+c99 and gnu90 have slightly different semantics
+WRT symbol definition: http://www.greenend.org.uk/rjk/tech/inline.html
+
+gcc-4 defaults to gnu90 and works, gcc-6 defaults to gnu-99
+and fails to link aboot as:
+ alpha-unknown-linux-gnu-ld: Disabling relaxation: it will not work with multiple definitions
+ lib/libaboot.a(isolib.o): In function `prefetchw':
+ (.text+0x60): multiple definition of `prefetchw'
+ fs/ext2.o:(.text+0xe68): first defined here
+
+The change is to force gnu90 explicitly.
+diff --git a/Makefile b/Makefile
+index b4245af..634ac87 100644
+--- a/Makefile
++++ b/Makefile
+@@ -40,6 +40,6 @@ ifeq ($(TESTING),)
+ CPPFLAGS = $(CFGDEFS) -I$(TOP)/include -I$(KSRC)/include
+-CFLAGS = $(CPPFLAGS) -D__KERNEL__ -Os -Wall -fno-builtin -mno-fp-regs
++CFLAGS = $(CPPFLAGS) -std=gnu90 -D__KERNEL__ -Os -Wall -fno-builtin -mno-fp-regs
+ else
+ CPPFLAGS = -DTESTING $(CFGDEFS) -I$(TOP)/include -I$(KSRC)/include
+-CFLAGS = $(CPPFLAGS) -O -g3 -Wall -D__KERNEL__ -ffixed-8
++CFLAGS = $(CPPFLAGS) -std=gnu90 -O -g3 -Wall -D__KERNEL__ -ffixed-8
+ endif
diff --git a/sys-boot/aboot/files/aboot-respect-AR.patch b/sys-boot/aboot/files/aboot-respect-AR.patch
new file mode 100644
index 000000000000..44e4a2a52063
--- /dev/null
+++ b/sys-boot/aboot/files/aboot-respect-AR.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/Makefile b/lib/Makefile
+index e3a2247..c137b53 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -13,6 +13,6 @@ libaboot.a: vsprintf.o memcpy.o memset.o string.o _setjmp.o \
+ __remlu.o
+- ar cru $@ $?
++ $(AR) cru $@ $?
+ else
+ libaboot.a: isolib.o
+- ar cru $@ $?
++ $(AR) cru $@ $?
+ endif