Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/silo/, sys-boot/silo/files/
Date: Mon, 01 Jan 2018 22:37:42
Message-Id: 1514846234.47fdb3554be8764c8adfc03782dcdf41a4448191.slyfox@gentoo
1 commit: 47fdb3554be8764c8adfc03782dcdf41a4448191
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 1 22:37:14 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 1 22:37:14 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47fdb355
7
8 sys-boot/silo: fix build failure against gcc-6, bug #639224
9
10 It's a commit similar to d534bffc051980f5bca96ae8fbad3f7f1a70297c
11 ("sys-boot/aboot: fix link failure on recent gcc (force gnu90)")
12
13 c99 and gnu90 have slightly different semantics
14 WRT symbol definition: http://www.greenend.org.uk/rjk/tech/inline.html
15
16 Reported-by: Rolf Eike Beer
17 Closes: https://bugs.gentoo.org/639224
18 Package-Manager: Portage-2.3.19, Repoman-2.3.6
19
20 .../files/silo-1.4.14_p20120819-gnu90-inline.patch | 20 +++++++
21 sys-boot/silo/silo-1.4.14_p20120819-r1.ebuild | 69 ++++++++++++++++++++++
22 2 files changed, 89 insertions(+)
23
24 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
25 new file mode 100644
26 index 00000000000..bf6add0ce10
27 --- /dev/null
28 +++ b/sys-boot/silo/files/silo-1.4.14_p20120819-gnu90-inline.patch
29 @@ -0,0 +1,20 @@
30 +--- a/Rules.make
31 ++++ b/Rules.make
32 +@@ -26,2 +26,7 @@ CFLAGS += -fno-stack-protector
33 + endif
34 ++ifeq ($(call cc-option-yn, -std=gnu90),y)
35 ++# In gcc-5+ c99 changed inline rules by forbidding
36 ++# multiple extern definitions. Fall back to gnu90
37 ++CFLAGS += -std=gnu90
38 ++endif
39 +
40 +--- a/silo/Makefile
41 ++++ b/silo/Makefile
42 +@@ -6,2 +6,7 @@ UFSDEPS=
43 + CFLAGS=-O2 -Wall -I. -I../include
44 ++ifeq ($(call cc-option-yn, -std=gnu90),y)
45 ++# In gcc-5+ c99 changed inline rules by forbidding
46 ++# multiple extern definitions. Fall back to gnu90
47 ++CFLAGS += -std=gnu90
48 ++endif
49 +
50
51 diff --git a/sys-boot/silo/silo-1.4.14_p20120819-r1.ebuild b/sys-boot/silo/silo-1.4.14_p20120819-r1.ebuild
52 new file mode 100644
53 index 00000000000..8cb43a1287e
54 --- /dev/null
55 +++ b/sys-boot/silo/silo-1.4.14_p20120819-r1.ebuild
56 @@ -0,0 +1,69 @@
57 +# Copyright 1999-2018 Gentoo Foundation
58 +# Distributed under the terms of the GNU General Public License v2
59 +
60 +EAPI=6
61 +
62 +inherit mount-boot flag-o-matic toolchain-funcs eutils
63 +
64 +DEB_PL="1"
65 +MY_PV="${PV##*_p}"
66 +MY_GIT="git${MY_PV%%_*}"
67 +MY_PV="${PV%%_*}"
68 +MY_P="${PN}_${MY_PV}+${MY_GIT}"
69 +
70 +DESCRIPTION="SPARC/UltraSPARC Improved Loader, a boot loader for sparc"
71 +SRC_URI="mirror://debian/pool/main/s/${PN}/${MY_P}.orig.tar.gz
72 + mirror://debian/pool/main/s/${PN}/${MY_P}-${DEB_PL}.diff.gz"
73 +HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/davem/silo.git;a=summary"
74 +
75 +SLOT="0"
76 +LICENSE="GPL-2"
77 +KEYWORDS="-* ~sparc"
78 +IUSE=""
79 +
80 +DEPEND="sys-fs/e2fsprogs
81 + sys-apps/sparc-utils"
82 +RDEPEND=""
83 +
84 +ABI_ALLOW="sparc32"
85 +
86 +S="${WORKDIR}/${PN}"
87 +
88 +PATCHES=(
89 + "${FILESDIR}"/${P}-gnu90-inline.patch
90 +)
91 +
92 +src_prepare() {
93 + default
94 +
95 + #Set the correct version
96 + sed -i -e "s/1.4.14/1.4.14_git20120819_p1/g" Rules.make || die
97 +
98 + # Fix build failure
99 + sed -i -e "s/-fno-strict-aliasing/-fno-strict-aliasing -U_FORTIFY_SOURCE -mcpu=v9/g" Rules.make || die
100 +}
101 +
102 +src_compile() {
103 + filter-flags "-fstack-protector"
104 +
105 + emake CC="$(tc-getCC)"
106 +}
107 +
108 +src_install() {
109 + default
110 +
111 + dodoc first-isofs/README.SILO_ISOFS docs/README*
112 +
113 + # Fix maketilo manpage
114 + rm "${D}"/usr/share/man/man1/maketilo.1
115 + dosym tilo.1 /usr/share/man/man1/maketilo.1
116 +}
117 +
118 +pkg_postinst() {
119 + mount-boot_pkg_postinst
120 + ewarn "NOTE: If this is an upgrade to an existing SILO install,"
121 + ewarn " you will need to re-run silo as the /boot/second.b"
122 + ewarn " file has changed, else the system will fail to load"
123 + ewarn " SILO at the next boot."
124 + ewarn
125 +}