summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-01-01 22:37:14 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2018-01-01 22:37:14 +0000
commit47fdb3554be8764c8adfc03782dcdf41a4448191 (patch)
tree11e268b3d55468654f21736503e6576bdb65d26d /sys-boot
parentnet-misc/iputils: stable 20171016_pre for hppa/ia64/ppc/ppc64, bug #643026 (diff)
downloadgentoo-47fdb3554be8764c8adfc03782dcdf41a4448191.tar.gz
gentoo-47fdb3554be8764c8adfc03782dcdf41a4448191.tar.bz2
gentoo-47fdb3554be8764c8adfc03782dcdf41a4448191.zip
sys-boot/silo: fix build failure against gcc-6, bug #639224
It's a commit similar to d534bffc051980f5bca96ae8fbad3f7f1a70297c ("sys-boot/aboot: fix link failure on recent gcc (force gnu90)") c99 and gnu90 have slightly different semantics WRT symbol definition: http://www.greenend.org.uk/rjk/tech/inline.html Reported-by: Rolf Eike Beer Closes: https://bugs.gentoo.org/639224 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/silo/files/silo-1.4.14_p20120819-gnu90-inline.patch20
-rw-r--r--sys-boot/silo/silo-1.4.14_p20120819-r1.ebuild69
2 files changed, 89 insertions, 0 deletions
diff --git a/sys-boot/silo/files/silo-1.4.14_p20120819-gnu90-inline.patch b/sys-boot/silo/files/silo-1.4.14_p20120819-gnu90-inline.patch
new file mode 100644
index 000000000000..bf6add0ce104
--- /dev/null
+++ b/sys-boot/silo/files/silo-1.4.14_p20120819-gnu90-inline.patch
@@ -0,0 +1,20 @@
+--- a/Rules.make
++++ b/Rules.make
+@@ -26,2 +26,7 @@ CFLAGS += -fno-stack-protector
+ endif
++ifeq ($(call cc-option-yn, -std=gnu90),y)
++# In gcc-5+ c99 changed inline rules by forbidding
++# multiple extern definitions. Fall back to gnu90
++CFLAGS += -std=gnu90
++endif
+
+--- a/silo/Makefile
++++ b/silo/Makefile
+@@ -6,2 +6,7 @@ UFSDEPS=
+ CFLAGS=-O2 -Wall -I. -I../include
++ifeq ($(call cc-option-yn, -std=gnu90),y)
++# In gcc-5+ c99 changed inline rules by forbidding
++# multiple extern definitions. Fall back to gnu90
++CFLAGS += -std=gnu90
++endif
+
diff --git a/sys-boot/silo/silo-1.4.14_p20120819-r1.ebuild b/sys-boot/silo/silo-1.4.14_p20120819-r1.ebuild
new file mode 100644
index 000000000000..8cb43a1287e1
--- /dev/null
+++ b/sys-boot/silo/silo-1.4.14_p20120819-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit mount-boot flag-o-matic toolchain-funcs eutils
+
+DEB_PL="1"
+MY_PV="${PV##*_p}"
+MY_GIT="git${MY_PV%%_*}"
+MY_PV="${PV%%_*}"
+MY_P="${PN}_${MY_PV}+${MY_GIT}"
+
+DESCRIPTION="SPARC/UltraSPARC Improved Loader, a boot loader for sparc"
+SRC_URI="mirror://debian/pool/main/s/${PN}/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/s/${PN}/${MY_P}-${DEB_PL}.diff.gz"
+HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/davem/silo.git;a=summary"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="-* ~sparc"
+IUSE=""
+
+DEPEND="sys-fs/e2fsprogs
+ sys-apps/sparc-utils"
+RDEPEND=""
+
+ABI_ALLOW="sparc32"
+
+S="${WORKDIR}/${PN}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gnu90-inline.patch
+)
+
+src_prepare() {
+ default
+
+ #Set the correct version
+ sed -i -e "s/1.4.14/1.4.14_git20120819_p1/g" Rules.make || die
+
+ # Fix build failure
+ sed -i -e "s/-fno-strict-aliasing/-fno-strict-aliasing -U_FORTIFY_SOURCE -mcpu=v9/g" Rules.make || die
+}
+
+src_compile() {
+ filter-flags "-fstack-protector"
+
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+
+ dodoc first-isofs/README.SILO_ISOFS docs/README*
+
+ # Fix maketilo manpage
+ rm "${D}"/usr/share/man/man1/maketilo.1
+ dosym tilo.1 /usr/share/man/man1/maketilo.1
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+ ewarn "NOTE: If this is an upgrade to an existing SILO install,"
+ ewarn " you will need to re-run silo as the /boot/second.b"
+ ewarn " file has changed, else the system will fail to load"
+ ewarn " SILO at the next boot."
+ ewarn
+}