summaryrefslogtreecommitdiff
path: root/sys-boot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-31 20:30:04 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-31 20:30:04 +0000
commit4650985dd0e898b82e0d2ec225931297d4fadccf (patch)
treeeb0e8002cf3ebf1009110b6fec47fa90f873d824 /sys-boot
parent67f76a858f1ac826bd8a550d756d9ec6e340ed4f (diff)
gentoo resync : 31.01.2018
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/Manifest.gzbin7399 -> 7395 bytes
-rw-r--r--sys-boot/elilo/Manifest1
-rw-r--r--sys-boot/elilo/elilo-3.16-r1.ebuild87
-rw-r--r--sys-boot/gnu-efi/Manifest5
-rw-r--r--sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-gnu-hash.patch149
-rw-r--r--sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-setjmp.patch163
-rw-r--r--sys-boot/gnu-efi/gnu-efi-3.0.2.ebuild8
-rw-r--r--sys-boot/gnu-efi/gnu-efi-3.0.6-r2.ebuild93
8 files changed, 503 insertions, 3 deletions
diff --git a/sys-boot/Manifest.gz b/sys-boot/Manifest.gz
index e2d13c328b6e..0d2602fbb6ab 100644
--- a/sys-boot/Manifest.gz
+++ b/sys-boot/Manifest.gz
Binary files differ
diff --git a/sys-boot/elilo/Manifest b/sys-boot/elilo/Manifest
index a1be1215101f..c992abd5fc68 100644
--- a/sys-boot/elilo/Manifest
+++ b/sys-boot/elilo/Manifest
@@ -12,6 +12,7 @@ DIST elilo_3.14-3.debian.tar.gz 32179 BLAKE2B 84f8055d3e33b99ce91079768da80a8800
DIST elilo_3.6-1.diff.gz 14944 BLAKE2B c982bce4610168408c57beaeca70f7c2be130a75e29b662f5d21ab22097374cc2c8152f24a6eef73039fd6eb365d66c3d4d63f52fe021bb5b126f1932efdaec3 SHA512 962672f516de48f88bd453248d6469a4962fb7551214de9f73125deb64121ab08d123746b2cf8c1c202177f7272aad4cb63e6970f1860c772930bae580817bee
EBUILD elilo-3.10.ebuild 1881 BLAKE2B c4fc100d3f8cf5a91a577a84aa96f0e015c006cf45bfe8d979c95dec896c11862e2d8280490fa77e7cb2ed3dc078bec6f02a058c8d13bff79529526fb6c0f4c6 SHA512 40c43228a756ed0ffe1b6ee0e7ca1a15dd4eeae4ef11533e7604f1f9bc25a3395048721403abb84bf1bbe97652da0d8b2992e80698e49e0135f8f2e3804f40c6
EBUILD elilo-3.12.ebuild 1875 BLAKE2B e3bf5b05fa281d2ecc388b3b94143f196a780bd4bc9f156055959a9076a71fe4f9b909bf212ce225b1c616883b1c127a24f5e3140d30d2c89e32f42c6f970eec SHA512 e1133533b8727e744457086550771ead877279a919676006562d38e0a6e2949f2d95eb828d1664b3f726d072a83b184ea32632785df92d20b9f5d09cb0914c57
+EBUILD elilo-3.16-r1.ebuild 2022 BLAKE2B 2b7e34a158bbb348c1468d1e79bfccf885f8479f0d209a36e1f9fff334d52fb5eadbb98082ad75b44e5cae50bc2909fb710aab42fee9f54a7c9e73be7e7faa9f SHA512 428ff3638702d11ff93a19c6b3aeca9c9dab556773a6b6a6b3632ed240ae64a3c6269e48f1466dbaf58ebc23c2eb340cbd98c50b0f7a5b45c3224a17b7ed4110
EBUILD elilo-3.16.ebuild 2032 BLAKE2B 12c7a08970bcb568944607fb6f9066d6b4bd19dda8a956f0f98480ddae577dab1cba0566b39c4214fd50b618c6df6d797957cafa7f40ccc1d70540dd7d642f3b SHA512 3eefb2956ce6cd1f5322c7ef537fb04fb9518ffb294361c0a449154adf11729ec7999167754cd034cfcbadb16616324c6866f8356e72e73e4aaf52a4e4f77398
EBUILD elilo-3.6_p20060314.ebuild 2290 BLAKE2B b47fe3063eb438f8dcf7ce47b500ecd4fcc8e79bd5f560e052c5662d127fdc640d68cb20e06250b8286285f97fac04331ad52d66e588b3baeaa2790b2464ede1 SHA512 4eb9e60abbec84dbe1a65138feb2ff0411faf54144549a4bff521aa867833cb211457589bc457cac072061714197b77abaf4267e3f21b6af591878114dd1b5ff
MISC metadata.xml 337 BLAKE2B 7c9b3e56e9680252631db0691b3acfc2a2cbfee80c42af709979085124a35bb9d184e58de3ef4f88b2f3e6cc873b4ef2bd285ce3fc2645aaa9ae869c3b729d87 SHA512 13691bef927bf7f8a4a6d0640d38dabb53fdae1d8bd986c5fe73c1643e2bdbaaac50bfe864e2185a584fa6265a3197afc5273b60b70675481cef61706dde8d87
diff --git a/sys-boot/elilo/elilo-3.16-r1.ebuild b/sys-boot/elilo/elilo-3.16-r1.ebuild
new file mode 100644
index 000000000000..96b2860daf60
--- /dev/null
+++ b/sys-boot/elilo/elilo-3.16-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="Linux boot loader for EFI-based systems such as IA-64"
+HOMEPAGE="https://sourceforge.net/projects/elilo/"
+SRC_URI="mirror://sourceforge/elilo/${P}-all.tar.gz
+ mirror://debian/pool/main/e/elilo/elilo_3.14-3.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE=""
+
+# gnu-efi contains only static libs, so there's no run-time dep on it
+DEPEND=">=sys-boot/gnu-efi-3.0g
+ dev-util/patchutils"
+# dosfstools[compat] to enable 'dosfsck' symlink
+RDEPEND="sys-boot/efibootmgr
+ sys-fs/dosfstools[compat]"
+
+S="${WORKDIR}/${P}-source"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.16-elilo-loop.patch #299665
+)
+
+src_unpack() {
+ unpack ${A} ./${P}-source.tar.gz
+ mv debian "${S}"/ || die
+}
+
+src_prepare() {
+ default
+
+ case $(tc-arch) in
+ ia64) iarch=ia64 ;;
+ x86) iarch=ia32 ;;
+ amd64) iarch=x86_64 ;;
+ *) die "unknown architecture: $(tc-arch)" ;;
+ esac
+
+ # Now Gentooize it.
+ sed -i \
+ -e '1s:/bin/sh:/bin/bash:' \
+ -e "s:##VERSION##:${PV}:" \
+ -e 's:Debian GNU/:Gentoo :g' \
+ -e 's:Debian:Gentoo:g' \
+ -e 's:debian:gentoo:g' \
+ -e "s:dpkg --print-architecture:echo ${iarch}:" \
+ debian/elilo.sh || die
+}
+
+src_compile() {
+ # "prefix" on the next line specifies where to find gcc, as, ld,
+ # etc. It's not the usual meaning of "prefix". By blanking it we
+ # allow PATH to be searched.
+ local libdir="${SYSROOT}${EPREFIX}/usr/$(get_libdir)"
+ emake -j1 \
+ prefix= \
+ AS="$(tc-getAS)" \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ HOSTARCH=${iarch} \
+ ARCH=${iarch} \
+ EFIINC="${SYSROOT}${EPREFIX}/usr/include/efi" \
+ GNUEFILIB="${libdir}" \
+ EFILIB="${libdir}" \
+ EFICRT0="${libdir}"
+}
+
+src_install() {
+ exeinto /usr/lib/elilo
+ doexe elilo.efi
+
+ newsbin debian/elilo.sh elilo
+ dosbin tools/eliloalt
+
+ insinto /etc
+ newins "${FILESDIR}"/elilo.conf.sample elilo.conf
+
+ dodoc docs/* "${FILESDIR}"/elilo.conf.sample
+ doman debian/*.[0-9]
+}
diff --git a/sys-boot/gnu-efi/Manifest b/sys-boot/gnu-efi/Manifest
index cf1ba90d6413..b3a19de25302 100644
--- a/sys-boot/gnu-efi/Manifest
+++ b/sys-boot/gnu-efi/Manifest
@@ -1,7 +1,10 @@
+AUX gnu-efi-3.0.6-ia64-gnu-hash.patch 4635 BLAKE2B b7e39832239e2a1be389fd6fa9e412804779d0a82a78ca50a21b139757f71973c418e7086cd89c2bbc457f1cbadf15e801152f85f27ec15164558f1bd6550cd1 SHA512 5cd62b5b114956fa37a3998fa79d9ddd4495a3621078d2d6972b2a784dfc69893fd42bbb096e253388baf49c84b0c16ae461c7eee61dd4b172207f48ca1ceb89
+AUX gnu-efi-3.0.6-ia64-setjmp.patch 3964 BLAKE2B 1475a5f188e86837303e1b91de3c37e06d95f67e8a67b8ddbc3d542df49791d9433601ca21f23c43fb57be98f68294385b2c2b0db67ce5f2b71eef55eee0adfe SHA512 146002da1ccb3a8d9b7430e52cafbf67c33691e0cbad443ef59ea6b7f604d04c82796c977977f64227c13d40d071eff8e0cb89f1d7d88d498fcc16871757b778
DIST gnu-efi-3.0.2.tar.bz2 136134 BLAKE2B ccdbd1f14c938a89fcf6d43f139ce644b562fd882a6f3ce2ce7ce703fd95c02870016da252a3f75c7117838c23a8ac8527d4ca919c125b639f86734a0ee2c8f6 SHA512 960dc0374dd63dea5eb25e2bf6670d3f7474ebeca2090514c2895b28ff6e058a852958d028eadbe156df4645bd04d1a93ffaae1153861fce6e7da72f8f9dbeec
DIST gnu-efi-3.0.3.tar.bz2 142229 BLAKE2B 5230e99358fc2c1a85fd56840a9ddbd4d1cb42d15a8c37dd44e87037e45a1033f1014c953b5a4d2bb565c4be5aa67a3982ca64e575aaae9c1ae64ce27659b642 SHA512 0b0582e22344ea8a544aba540b56dc36364febfeb5bb655e87277e638fd4e549214a0cd2079a852d15ee376cd51c33794f65a7efb23be9a7a929e889cd616c8c
DIST gnu-efi-3.0.6.tar.bz2 152088 BLAKE2B 2cb1d72f6972a86e913fba28a86e95a1b0baf15251d8fa3d4c335a13e5fd929b61f8f421330acbddbc640efd63594713180b7fc3e623fda2397947538a25b795 SHA512 f1b17766d8ae000c0177ea2126d87883f254ab01ac020e4bfaa9ad2d3d60a66d07b6237d9842e5989c4da3fd23152b5c592ef863fdc9806901f43c43582a2258
-EBUILD gnu-efi-3.0.2.ebuild 1167 BLAKE2B def6ab91b48ec482bb497cb72ac4e051b02475c55f551f9e625854a27e7c00c6ac0ef357f4ed098b80728af10f61157b7284cca62735f0b4fb990fc9595ec662 SHA512 0e5eebcd16fafef41cef71911650184470e504d2a623aebe281a1ffabcdb0eb24a37441bacf89c9d1daf9ac70463f6996aa545e6732576aba93b4296dc680195
+EBUILD gnu-efi-3.0.2.ebuild 1206 BLAKE2B 90f30e8c0f759f8c16b9de7aade85fa2aa013a8a248d98e29df54139c3411cc332a3538734101f349ed31055491709db23f168e0cf2472af6bfa55dbd5d15895 SHA512 56d8c2c21694eeeb36d994c9bdc5a37e4342f44d0842adc748c86a00db25dc238314126b5ae6425de0bb251a21d1a753b89632df4c326365ca44e68f05f0fa70
EBUILD gnu-efi-3.0.3.ebuild 1732 BLAKE2B 9c453d8e28059d16832adaee14ba34baf6e1b6caaa54c279a91c48798ad00cc8da6ee4b6fb2aa02f06c0773d8c8ad17ed93e65168965e637d85a3f5251fbb31c SHA512 2b4cdc3cc522ed6d9c6a716756fec4009d52af85369c2be1c81cf6afd03dc78b7e836adb351427a0cd0656de8f5e19a287e093d985a68e15726721d58c2fb6ef
EBUILD gnu-efi-3.0.6-r1.ebuild 1952 BLAKE2B 4a3d25ffb976a44fcec62c4a3aa5e80930d3abd9e486f81e74be27fbc92ad77fe27f24af4851747a80bccf586aa4353b857dba765394b7c7ca53e061b499ed54 SHA512 6e85f076b29bb3ae7a528a3d0a406ea9c26d87a481bcf9285bab0db11ffa24922d04eaec23ddaaeec577492794e7b8c01a55a4aaa406996f309809540150140f
+EBUILD gnu-efi-3.0.6-r2.ebuild 1960 BLAKE2B 8f5080d597e681fa91d0132bd30492e640a01256791eca3fa8b95e89efc48d4f7ec2e8169ebbbb9c2aa700b6bdf18231e70f08fddd50a53d3b21ed45a18f1c05 SHA512 24f8ed5312b2e0ed29397cca7f64c2fc446f07c89c471eab9088e15d0ca7bd1b2e86e407cbce2984f598412413199a16c962642f2195dbdf578950db87276635
MISC metadata.xml 446 BLAKE2B ed77ce0b04fab42aad08921e9365b866a3d64d5192a569ad161e0415a2bbe1e9b374a48e1b2357331cf9743fc082a22c6b68081bddaa6b783e5cc78c4df394c2 SHA512 114721b7dc26234a2bce0ab65f2513f5bdd4749fd8fc5beb9619dc449bde13c82c88716d3e9b94a192d4298019255fff1aa32beaa15b643490fdbc25e75d83f8
diff --git a/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-gnu-hash.patch b/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-gnu-hash.patch
new file mode 100644
index 000000000000..9487ba4c6731
--- /dev/null
+++ b/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-gnu-hash.patch
@@ -0,0 +1,149 @@
+https://sourceforge.net/p/gnu-efi/code/merge-requests/1/
+
+From 2cc0b085fb82e80d43cc08c8376dff9f9532a72d Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat, 27 Jan 2018 20:29:05 +0000
+Subject: [PATCH] gnuefi: preserve .gnu.hash sections (unbreaks elilo on IA-64)
+
+Gentoo has slightly modified linker defaults: --hash-style=gnu
+This means all ELF files in system have '.gnu.hash' section
+but no '.hash' section.
+
+gnuefi's ldscript did not account for it and as a result
+one symbol 'ImageBase' did not resolve locally for elilo.so
+and caused 'elilo' to fail to load by ia64 EFI:
+ Loading.: Gentoo (try new elilo)
+ ImageAddress: pointer is outside of image
+ ImageAddress: pointer is outside of image
+
+Those two relocations come from crt0-efi-ia64.S PE32 entry point
+fdescr:
+
+```
+ #define IMAGE_REL_BASED_DIR64<->10
+ .section .reloc, "a"
+ data4 _start_plabel // Page RVA
+ data4 12 // Block Size (2*4+2*2)
+ data2 (IMAGE_REL_BASED_DIR64<<12) + 0 // reloc for plabel's entry point
+ data2 (IMAGE_REL_BASED_DIR64<<12) + 8 // reloc for plabel's global pointer
+```
+
+These refer ImageBase.
+
+The change adds '.gnu.hash' collection (follows existing '.hash'
+collection).
+
+Tested on IA-64 by successfully booting elilo-3.16.
+
+Bug: https://bugs.gentoo.org/575300
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ README.gnuefi | 8 +++++++-
+ gnuefi/elf_ia32_efi.lds | 4 +++-
+ gnuefi/elf_ia32_fbsd_efi.lds | 4 +++-
+ gnuefi/elf_ia64_efi.lds | 4 +++-
+ gnuefi/elf_x86_64_efi.lds | 4 +++-
+ gnuefi/elf_x86_64_fbsd_efi.lds | 4 +++-
+ 6 files changed, 22 insertions(+), 6 deletions(-)
+
+diff --git a/README.gnuefi b/README.gnuefi
+index a7feec0..512698c 100644
+--- a/README.gnuefi
++++ b/README.gnuefi
+@@ -231,11 +231,17 @@ and page sized.These eight sections are used to group together the much
+ greater number of sections that are typically present in ELF object files.
+ Specifically:
+
+- .hash
++ .hash (and/or .gnu.hash)
+ Collects the ELF .hash info (this section _must_ be the first
+ section in order to build a shared object file; the section is
+ not actually loaded or used at runtime).
+
++ GNU binutils provides a mechanism to generate different hash info
++ via --hash-style=<sysv|gnu|both> option. In this case output
++ shared object will contain .hash section, .gnu.hash section or
++ both. In order to generate correct output linker script preserves
++ both types of hash sections.
++
+ .text
+ Collects all sections containing executable code.
+
+diff --git a/gnuefi/elf_ia32_efi.lds b/gnuefi/elf_ia32_efi.lds
+index 6cc4ce1..f27fe5f 100644
+--- a/gnuefi/elf_ia32_efi.lds
++++ b/gnuefi/elf_ia32_efi.lds
+@@ -5,7 +5,9 @@ SECTIONS
+ {
+ . = 0;
+ ImageBase = .;
+- .hash : { *(.hash) } /* this MUST come first! */
++ /* .hash and/or .gnu.hash MUST come first! */
++ .hash : { *(.hash) }
++ .gnu.hash : { *(.gnu.hash) }
+ . = ALIGN(4096);
+ .text :
+ {
+diff --git a/gnuefi/elf_ia32_fbsd_efi.lds b/gnuefi/elf_ia32_fbsd_efi.lds
+index 77d6fad..cd309e2 100644
+--- a/gnuefi/elf_ia32_fbsd_efi.lds
++++ b/gnuefi/elf_ia32_fbsd_efi.lds
+@@ -5,7 +5,9 @@ SECTIONS
+ {
+ . = 0;
+ ImageBase = .;
+- .hash : { *(.hash) } /* this MUST come first! */
++ /* .hash and/or .gnu.hash MUST come first! */
++ .hash : { *(.hash) }
++ .gnu.hash : { *(.gnu.hash) }
+ . = ALIGN(4096);
+ .text :
+ {
+diff --git a/gnuefi/elf_ia64_efi.lds b/gnuefi/elf_ia64_efi.lds
+index baca962..190792a 100644
+--- a/gnuefi/elf_ia64_efi.lds
++++ b/gnuefi/elf_ia64_efi.lds
+@@ -5,7 +5,9 @@ SECTIONS
+ {
+ . = 0;
+ ImageBase = .;
+- .hash : { *(.hash) } /* this MUST come first! */
++ /* .hash and/or .gnu.hash MUST come first! */
++ .hash : { *(.hash) }
++ .gnu.hash : { *(.gnu.hash) }
+ . = ALIGN(4096);
+ .text :
+ {
+diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds
+index 942d1f3..7be5902 100644
+--- a/gnuefi/elf_x86_64_efi.lds
++++ b/gnuefi/elf_x86_64_efi.lds
+@@ -6,7 +6,9 @@ SECTIONS
+ {
+ . = 0;
+ ImageBase = .;
+- .hash : { *(.hash) } /* this MUST come first! */
++ /* .hash and/or .gnu.hash MUST come first! */
++ .hash : { *(.hash) }
++ .gnu.hash : { *(.gnu.hash) }
+ . = ALIGN(4096);
+ .eh_frame :
+ {
+diff --git a/gnuefi/elf_x86_64_fbsd_efi.lds b/gnuefi/elf_x86_64_fbsd_efi.lds
+index 6fd2031..fe1f334 100644
+--- a/gnuefi/elf_x86_64_fbsd_efi.lds
++++ b/gnuefi/elf_x86_64_fbsd_efi.lds
+@@ -6,7 +6,9 @@ SECTIONS
+ {
+ . = 0;
+ ImageBase = .;
+- .hash : { *(.hash) } /* this MUST come first! */
++ /* .hash and/or .gnu.hash MUST come first! */
++ .hash : { *(.hash) }
++ .gnu.hash : { *(.gnu.hash) }
+ . = ALIGN(4096);
+ .eh_frame :
+ {
+--
+2.16.1
+
diff --git a/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-setjmp.patch b/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-setjmp.patch
new file mode 100644
index 000000000000..b09644265001
--- /dev/null
+++ b/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-setjmp.patch
@@ -0,0 +1,163 @@
+https://sourceforge.net/p/gnu-efi/code/merge-requests/2/
+
+From 0e6995a96b0f5867c8d85fbd251cfbc295a3fc4d Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun, 28 Jan 2018 16:44:21 +0000
+Subject: [PATCH] gnu-efi: fix lib/ia64/setjmp.S IA-64 build failure
+
+The build failed as:
+ lib/ia64/setjmp.S:171: Error: Unknown opcode `ldf.nt1 f26=[r10],8'
+ lib/ia64/setjmp.S:178: Error: Operand 1 of `ldf.fill.nt1' should be a floating-point register
+
+The change syncs longjmp definition with
+ edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/setjmp.s
+pulling in:
+- branch in the end of function
+- registers used wrong instruction for float restore
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ lib/ia64/setjmp.S | 61 +++++++++++++++++++++++++++----------------------------
+ 1 file changed, 30 insertions(+), 31 deletions(-)
+
+diff --git a/lib/ia64/setjmp.S b/lib/ia64/setjmp.S
+index c806fbc..bbb29d8 100644
+--- a/lib/ia64/setjmp.S
++++ b/lib/ia64/setjmp.S
+@@ -16,11 +16,11 @@ BASIS,
+ .globl setjmp
+ .type setjmp, @function
+ setjmp:
+- alloc loc = ar.pfs, 1, 2, 1, 0
++ alloc loc0 = ar.pfs, 1, 2, 1, 0
+ ;;
+ mov r14 = ar.unat
+ mov r15 = ar.bsp
+- add r10 = 0x10 * 20, in0
++ add r10 = 0x10*20, in0
+ ;;
+ stf.spill.nta [in0] = f2, 0x10
+ st8.spill.nta [r10] = r4, 8
+@@ -98,29 +98,25 @@ setjmp:
+
+ .globl longjmp
+ .type longjmp, @function
+- .regstk
++ .regstk 2, 0, 0, 0
+ longjmp:
+- add r10 = 0x10 * 20 + 8*14, in0
+- movl r2 = ~(((1<<14) - 1) << 16) | 3)
++ add r10 = 0x10*20 + 8*14, in0
++ movl r2 = ~((((1<<14) - 1) << 16) | 3)
+ ;;
+ ld8.nt1 r14 = [r10], -8*2
+ mov r15 = ar.bspstore
+ ;;
+ ld8.nt1 r17 = [r10], -8
+ mov r16 = ar.rsc
+- cmp.leu p6 = r14, r15
++ cmp.leu p6 = r14, r15
+ ;;
+ ld8.nt1 r18 = [r10], -8
+ ld8.nt1 r25 = [r10], -8
+- and r2 = r16, r2
++ and r2 = r16, r2
+ ;;
+- ldf.fill.nt1 f2 = [in0], 0x10
++ ldf.fill.nt1 f2 = [in0], 0x10
+ ld8.nt1 r24 = [r10], -8
+- mov b5 = r25
+- ;;
+- mov ar.rsc = r2
+- ld8.nt1 r23 = [r10], -8
+- mov b5 = r25
++ mov b5 = r25
+ ;;
+ mov ar.rsc = r2
+ ld8.nt1 r23 = [r10], -8
+@@ -137,51 +133,51 @@ _skip_flushrs:
+ mov r31 = ar.rnat
+ loadrs
+ ;;
+- ldf.fill.nt1 f4 = [in0], 0x10
++ ldf.fill.nt1 f4 = [in0], 0x10
+ ld8.nt1 r22 = [r10], -8
+- dep r2 = -1, r14, 3, 6
++ dep r2 = -1, r14, 3, 6
+ ;;
+- ldf.fill.nt1 f5 = [in0], 0x10
+- ld8.nt1 f21 = [r10], -8
+- cmp p6 = r2, r15
++ ldf.fill.nt1 f5 = [in0], 0x10
++ ld8.nt1 r21 = [r10], -8
++ cmp.ltu p6 = r2, r15
+ ;;
+ ld8.nt1 r20 = [r10], -0x10
+ (p6) ld8.nta r31 = [r2]
+- mov b3 = r23
++ mov b3 = r23
+ ;;
+ ldf.fill.nt1 f16 = [in0], 0x10
+- ld8.fill.nt1 r7 = [r10], -8
+- mov b2 = r22
++ ld8.fill.nt1 r7 = [r10], -8
++ mov b2 = r22
+ ;;
+ ldf.fill.nt1 f17 = [in0], 0x10
+- ld8.fill.nt1 r6 = [r10], -8
+- mov b1 = r21
++ ld8.fill.nt1 r6 = [r10], -8
++ mov b1 = r21
+ ;;
+ ldf.fill.nt1 f18 = [in0], 0x10
+- ld8.fill.nt1 r5 = [r10], -8
+- mov b0 = r20
++ ld8.fill.nt1 r5 = [r10], -8
++ mov b0 = r20
+ ;;
+ ldf.fill.nt1 f19 = [in0], 0x10
+- ld8.fill.nt1 r4 = [r10], 8*13
++ ld8.fill.nt1 r4 = [r10], 8*13
+ ;;
+ ldf.fill.nt1 f20 = [in0], 0x10
+ ld8.nt1 r19 = [r10], 0x10
+ ;;
+ ldf.fill.nt1 f21 = [in0], 0x10
+- ldf.nt1 f26 = [r10], 8
++ ld8.nt1 r26 = [r10], 8
+ mov ar.pfs = r19
+ ;;
+ ldf.fill.nt1 f22 = [in0], 0x10
+ ld8.nt1 r27 = [r10], 8
+- mov pr = r26, -1
++ mov pr = r26, -1
+ ;;
+- ldf.fill.nt1 r23 = [in0], 0x10
++ ldf.fill.nt1 f23 = [in0], 0x10
+ ld8.nt1 r28 = [r10], -17*8 - 0x10
+ mov ar.lc = r27
+ ;;
+ ldf.fill.nt1 f24 = [in0], 0x10
+ ldf.fill.nt1 f25 = [in0], 0x10
+- mov r8 = in1
++ mov r8 = in1
+ ;;
+ ldf.fill.nt1 f26 = [in0], 0x10
+ ldf.fill.nt1 f31 = [r10], -0x10
+@@ -192,9 +188,12 @@ _skip_flushrs:
+ ldf.fill.nt1 f28 = [in0]
+ ldf.fill.nt1 f29 = [r10], 0x10*3 + 8*4
+ ;;
+- ld8.fill.nt1 sp = [r10]
++ ld8.fill.nt1 sp = [r10]
+ mov ar.unat = r18
+ ;;
+ mov ar.bspstore = r14
+ mov ar.rnat = r31
+ ;;
++ invala
++ mov ar.rsc = r16
++ br.ret.sptk b0
+--
+2.16.1
+
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.2.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.2.ebuild
index 733b5bab8e1e..fc7b88d39c4a 100644
--- a/sys-boot/gnu-efi/gnu-efi-3.0.2.ebuild
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
-inherit multilib
+inherit epatch multilib
DESCRIPTION="Library for build EFI Applications"
HOMEPAGE="http://gnu-efi.sourceforge.net/"
@@ -26,6 +26,10 @@ RDEPEND=""
# so doing these QA checks on them doesn't make sense.
QA_EXECSTACK="usr/*/lib*efi.a:* usr/*/crt*.o"
+src_prepare() {
+ epatch_user
+}
+
_emake() {
emake \
prefix=${CHOST}- \
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.6-r2.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.6-r2.ebuild
new file mode 100644
index 000000000000..d30fd4771bdb
--- /dev/null
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.6-r2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Library for build EFI Applications"
+HOMEPAGE="http://gnu-efi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnu-efi/${P}.tar.bz2"
+
+# inc/, lib/ dirs (README.efilib)
+# - BSD-2
+# gnuefi dir:
+# - BSD (3-cluase): crt0-efi-ia32.S
+# - GPL-2+ : setjmp_ia32.S
+LICENSE="GPL-2+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~ia64 ~x86"
+IUSE="abi_x86_32 abi_x86_64 -custom-cflags"
+
+DEPEND="sys-apps/pciutils"
+RDEPEND=""
+
+# These objects get run early boot (i.e. not inside of Linux),
+# so doing these QA checks on them doesn't make sense.
+QA_EXECSTACK="usr/*/lib*efi.a:* usr/*/crt*.o"
+RESTRICT="strip"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-ia64-gnu-hash.patch
+ "${FILESDIR}"/${P}-ia64-setjmp.patch
+)
+
+src_prepare() {
+ sed -i -e "s/-Werror//" Make.defaults || die
+ default
+}
+
+efimake() {
+ local arch=
+ case ${CHOST} in
+ arm*) arch=arm ;;
+ aarch64*) arch=aarch64 ;;
+ ia64*) arch=ia64 ;;
+ i?86*) arch=ia32 ;;
+ x86_64*) arch=x86_64 ;;
+ *) die "Unknown CHOST" ;;
+ esac
+
+ local args=(
+ ARCH="${arch}"
+ HOSTCC="${BUILD_CC}"
+ CC="${CC}"
+ AS="${AS}"
+ LD="${LD}"
+ AR="${AR}"
+ PREFIX="${EPREFIX}/usr"
+ LIBDIR='$(PREFIX)'/$(get_libdir)
+ )
+ emake -j1 "${args[@]}" "$@"
+}
+
+src_compile() {
+ tc-export BUILD_CC AR AS CC LD
+
+ if use custom-cflags; then
+ # https://bugs.gentoo.org/607992
+ filter-mfpmath sse
+
+ # https://bugs.gentoo.org/619628
+ append-flags $(test-flags-CC -mno-avx)
+ else
+ unset CFLAGS CPPFLAGS LDFLAGS
+ fi
+
+ if [[ ${CHOST} == x86_64* ]]; then
+ use abi_x86_32 && CHOST=i686 ABI=x86 efimake
+ use abi_x86_64 && efimake
+ else
+ efimake
+ fi
+}
+
+src_install() {
+ if [[ ${CHOST} == x86_64* ]]; then
+ use abi_x86_32 && CHOST=i686 ABI=x86 efimake INSTALLROOT="${D}" install
+ use abi_x86_64 && efimake INSTALLROOT="${D}" install
+ else
+ efimake INSTALLROOT="${D}" install
+ fi
+ einstalldocs
+}