* [gentoo-commits] repo/gentoo:master commit in: sys-boot/elilo/files/, sys-boot/elilo/
@ 2018-04-21 19:10 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2018-04-21 19:10 UTC (permalink / raw
To: gentoo-commits
commit: b1cc70ce5c810fb85684ea8f681465a20546c0c8
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 21 19:09:51 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Apr 21 19:10:09 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1cc70ce
sys-boot/elilo: fix build failure on ia64 against gnu-efi-3.0.6
Disambiguate setpjmp()/longjmp()/jmp_buf implementation across
elilo copy and gnu-efi-3.0.6.
To avoid behaviour change I'm keeping elilo's implementation for now
as the jmp_buf passing ABI is slightly different across the two.
```
setjmp.h:25:14: error: conflicting types for 'jmp_buf'
typedef long jmp_buf[_JBLEN] __attribute__ ((aligned (16)));
^~~~~~~
In file included from /usr/include/efi/efisetjmp.h:5:0,
from /usr/include/efi/efi.h:60,
from gzip.c:29:
/usr/include/efi/ia64/efisetjmp_arch.h:45:23: note: previous
declaration of 'jmp_buf' was here
} ALIGN(JMPBUF_ALIGN) jmp_buf;
^~~~~~~
```
Reported-by: Stanton Arch
Package-Manager: Portage-2.3.28, Repoman-2.3.9
sys-boot/elilo/elilo-3.16-r2.ebuild | 88 ++++++++++++++++
.../files/elilo-3.16-gnu-efi-3.0.6-ia64.patch | 112 +++++++++++++++++++++
2 files changed, 200 insertions(+)
diff --git a/sys-boot/elilo/elilo-3.16-r2.ebuild b/sys-boot/elilo/elilo-3.16-r2.ebuild
new file mode 100644
index 00000000000..840e7f568f8
--- /dev/null
+++ b/sys-boot/elilo/elilo-3.16-r2.ebuild
@@ -0,0 +1,88 @@
+# 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
+ "${FILESDIR}"/${PN}-3.16-gnu-efi-3.0.6-ia64.patch
+)
+
+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/elilo/files/elilo-3.16-gnu-efi-3.0.6-ia64.patch b/sys-boot/elilo/files/elilo-3.16-gnu-efi-3.0.6-ia64.patch
new file mode 100644
index 00000000000..21f10f31644
--- /dev/null
+++ b/sys-boot/elilo/files/elilo-3.16-gnu-efi-3.0.6-ia64.patch
@@ -0,0 +1,112 @@
+Disambiguate setpjmp()/longjmp()/jmp_buf across elilo copy and gnu-efi-3.0.6.
+
+In order not to chang the behaviour I'm keeping elilo's implementation
+as the jmp_buf passing ABI is slightly different scross the two.
+
+ setjmp.h:25:14: error: conflicting types for 'jmp_buf'
+ typedef long jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
+ ^~~~~~~
+ In file included from /usr/include/efi/efisetjmp.h:5:0,
+ from /usr/include/efi/efi.h:60,
+ from gzip.c:29:
+ /usr/include/efi/ia64/efisetjmp_arch.h:45:23: note: previous declaration of 'jmp_buf' was here
+ } ALIGN(JMPBUF_ALIGN) jmp_buf;
+ ^~~~~~~
+diff --git a/ia64/gzip.c b/ia64/gzip.c
+index cc0c943..e2d40f6 100644
+--- a/ia64/gzip.c
++++ b/ia64/gzip.c
+@@ -138,3 +138,3 @@ static void error(char *m);
+
+-static jmp_buf jbuf;
++static jmp_buf_ia64_elilo jbuf;
+ static int error_return;
+@@ -598,3 +598,3 @@ load_abort:
+ error_return = ELILO_LOAD_ABORTED;
+- longjmp(jbuf, 1);
++ longjmp_ia64_elilo(jbuf, 1);
+ }
+@@ -606,3 +606,3 @@ error(char *x)
+ /* will eventually exit with error from gunzip() */
+- longjmp(jbuf,1);
++ longjmp_ia64_elilo(jbuf,1);
+ }
+@@ -645,3 +645,3 @@ gunzip_kernel(fops_fd_t fd, kdesc_t *kd)
+
+- if (setjmp(jbuf) == 1) goto error;
++ if (setjmp_ia64_elilo(jbuf) == 1) goto error;
+
+diff --git a/ia64/longjmp.S b/ia64/longjmp.S
+index 23dec86..5341632 100644
+--- a/ia64/longjmp.S
++++ b/ia64/longjmp.S
+@@ -18,5 +18,5 @@
+
+- Note that __sigsetjmp() did NOT flush the register stack. Instead,
+- we do it here since __longjmp() is usually much less frequently
+- invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp()
++ Note that __sigsetjmp_ia64_elilo() did NOT flush the register stack. Instead,
++ we do it here since __longjmp_ia64_elilo() is usually much less frequently
++ invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp_ia64_elilo()
+ didn't (and wouldn't be able to) save ar.rnat either. This is a problem
+@@ -40,8 +40,8 @@
+
+- /* __longjmp(__jmp_buf buf, int val) */
++ /* __longjmp_ia64_elilo(__jmp_buf_ia64_elilo buf, int val) */
+
+ .text
+- .global longjmp
+- .proc longjmp
+-longjmp:
++ .global longjmp_ia64_elilo
++ .proc longjmp_ia64_elilo
++longjmp_ia64_elilo:
+ alloc r8=ar.pfs,2,1,0,0
+@@ -161,2 +161,2 @@ longjmp:
+ br.ret.dptk.few rp
+- .endp longjmp
++ .endp longjmp_ia64_elilo
+diff --git a/ia64/setjmp.S b/ia64/setjmp.S
+index 4c83d03..57f5542 100644
+--- a/ia64/setjmp.S
++++ b/ia64/setjmp.S
+@@ -70,14 +70,14 @@
+ .text
+- .global setjmp
+- .proc setjmp
+-setjmp:
++ .global setjmp_ia64_elilo
++ .proc setjmp_ia64_elilo
++setjmp_ia64_elilo:
+ alloc r8=ar.pfs,2,0,0,0
+ mov in1=1
+- br.cond.sptk.many __sigsetjmp
+- .endp setjmp
++ br.cond.sptk.many __sigsetjmp_ia64_elilo
++ .endp setjmp_ia64_elilo
+
+- /* __sigsetjmp(__jmp_buf buf, int savemask) */
++ /* __sigsetjmp_ia64_elilo(__jmp_buf buf, int savemask) */
+
+- .proc __sigsetjmp
+-__sigsetjmp:
++ .proc __sigsetjmp_ia64_elilo
++__sigsetjmp_ia64_elilo:
+ //.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
+@@ -173,2 +173,2 @@ __sigsetjmp:
+
+- .endp __sigsetjmp
++ .endp __sigsetjmp_ia64_elilo
+diff --git a/ia64/setjmp.h b/ia64/setjmp.h
+index 91bbfc1..f9e654d 100644
+--- a/ia64/setjmp.h
++++ b/ia64/setjmp.h
+@@ -24,5 +24,5 @@
+ /* the __jmp_buf element type should be __float80 per ABI... */
+-typedef long jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
++typedef long jmp_buf_ia64_elilo[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
+
+-extern int setjmp (jmp_buf __env);
+-extern void longjmp (jmp_buf __env, int __val);
++extern int setjmp_ia64_elilo (jmp_buf_ia64_elilo __env);
++extern void longjmp_ia64_elilo (jmp_buf_ia64_elilo __env, int __val);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/elilo/files/, sys-boot/elilo/
@ 2021-02-16 17:45 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2021-02-16 17:45 UTC (permalink / raw
To: gentoo-commits
commit: 321303c29d48b84b8691ac2a70d719e2220f0929
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 16 17:44:45 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Feb 16 17:45:34 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=321303c2
sys-boot/elilo: allow ARCH override
Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/770982
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
sys-boot/elilo/elilo-3.16-r4.ebuild | 3 ++-
sys-boot/elilo/files/elilo-3.16-ARCH.patch | 12 ++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/sys-boot/elilo/elilo-3.16-r4.ebuild b/sys-boot/elilo/elilo-3.16-r4.ebuild
index c4cd5a90dd8..2670fdcaf7a 100644
--- a/sys-boot/elilo/elilo-3.16-r4.ebuild
+++ b/sys-boot/elilo/elilo-3.16-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.16-gnu-efi-3.0.6-ia64.patch
"${FILESDIR}"/${PN}-3.16-strncpy-clash.patch
"${FILESDIR}"/${PN}-3.16-FLAGS.patch
+ "${FILESDIR}"/${PN}-3.16-ARCH.patch
)
src_unpack() {
diff --git a/sys-boot/elilo/files/elilo-3.16-ARCH.patch b/sys-boot/elilo/files/elilo-3.16-ARCH.patch
new file mode 100644
index 00000000000..935cf7adbe4
--- /dev/null
+++ b/sys-boot/elilo/files/elilo-3.16-ARCH.patch
@@ -0,0 +1,12 @@
+Allow for easier override from make's commandline.
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -64,7 +64,7 @@ TOPDIR =
+ ALLSUBDIRS = ia32 ia64 x86_64 fs choosers devschemes tools
+
+ HOSTARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
+-ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
++ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
+ INCDIR = -I. -I$(TOPDIR) -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I$(TOPDIR)/efi110
+ CPPFLAGS = -DCONFIG_$(ARCH)
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-16 17:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-16 17:45 [gentoo-commits] repo/gentoo:master commit in: sys-boot/elilo/files/, sys-boot/elilo/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2018-04-21 19:10 Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox