-# 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"
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
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() {
--- /dev/null
+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