* [gentoo-commits] repo/gentoo:master commit in: sys-boot/aboot/, sys-boot/aboot/files/
@ 2017-10-18 14:08 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2017-10-18 14:08 UTC (permalink / raw
To: gentoo-commits
commit: be93c5b3dd8972e46578c6d3532d3e50e4b1283f
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 18 14:08:30 2017 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 14:08:38 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be93c5b3
sys-boot/aboot: add basic cross-compilation support
Package-Manager: Portage-2.3.11, Repoman-2.3.3
sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild | 7 ++++---
sys-boot/aboot/files/aboot-respect-AR.patch | 13 +++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild b/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild
index 9fcd14b1d0f..ba13f7c301b 100644
--- a/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild
+++ b/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-inherit eutils
+inherit eutils toolchain-funcs
KERN_VER="2.6.22"
@@ -33,6 +33,7 @@ src_unpack() {
epatch "${FILESDIR}/aboot-pt_note.patch"
# Bug 364697
epatch "${FILESDIR}/aboot-define_stat_only_in_userspace.patch"
+ epatch "${FILESDIR}"/aboot-respect-AR.patch
# Modified patch from Debian to add netboot support
epatch "${WORKDIR}"/aboot_gentoo.diff
@@ -40,7 +41,7 @@ src_unpack() {
src_compile() {
# too many problems with parallel building
- emake -j1 || die "emake failed"
+ emake -j1 AR=$(tc-getAR) CC=$(tc-getCC) LD=$(tc-getLD) || die "emake failed"
}
src_install() {
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 00000000000..44e4a2a5206
--- /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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/aboot/, sys-boot/aboot/files/
@ 2017-10-18 14:36 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2017-10-18 14:36 UTC (permalink / raw
To: gentoo-commits
commit: d534bffc051980f5bca96ae8fbad3f7f1a70297c
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 18 14:36:06 2017 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 14:36:06 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d534bffc
sys-boot/aboot: fix link failure on recent gcc (force gnu90)
Package-Manager: Portage-2.3.11, Repoman-2.3.3
sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild | 1 +
sys-boot/aboot/files/aboot-gnu90.patch | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild b/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild
index d02ceb0724b..2fd4afa8a92 100644
--- a/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild
+++ b/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild
@@ -34,6 +34,7 @@ src_unpack() {
# Bug 364697
epatch "${FILESDIR}/aboot-define_stat_only_in_userspace.patch"
epatch "${FILESDIR}"/aboot-respect-AR.patch
+ epatch "${FILESDIR}"/aboot-gnu90.patch
# Modified patch from Debian to add netboot support
epatch "${WORKDIR}"/aboot_gentoo.diff
diff --git a/sys-boot/aboot/files/aboot-gnu90.patch b/sys-boot/aboot/files/aboot-gnu90.patch
new file mode 100644
index 00000000000..2fb4b87f6b2
--- /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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-18 14:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 14:08 [gentoo-commits] repo/gentoo:master commit in: sys-boot/aboot/, sys-boot/aboot/files/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2017-10-18 14:36 Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox