Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/
Date: Tue, 08 Dec 2015 21:24:09
Message-Id: 1449609827.69273f1d085c5d44071c1f209e9048faa7c78202.axs@gentoo
1 commit: 69273f1d085c5d44071c1f209e9048faa7c78202
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 8 21:23:20 2015 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 8 21:23:47 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69273f1d
7
8 sys-boot/grub:0 - Force -O0 to work around bugs 564890, 566638
9
10 Package-Manager: portage-2.2.24
11
12 .../grub/{grub-0.97-r15.ebuild => grub-0.97-r16.ebuild} | 15 +++++++++++++++
13 1 file changed, 15 insertions(+)
14
15 diff --git a/sys-boot/grub/grub-0.97-r15.ebuild b/sys-boot/grub/grub-0.97-r16.ebuild
16 similarity index 93%
17 rename from sys-boot/grub/grub-0.97-r15.ebuild
18 rename to sys-boot/grub/grub-0.97-r16.ebuild
19 index 068f68b..9da0d0e 100644
20 --- a/sys-boot/grub/grub-0.97-r15.ebuild
21 +++ b/sys-boot/grub/grub-0.97-r16.ebuild
22 @@ -67,6 +67,21 @@ src_prepare() {
23 || die
24
25 EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
26 +
27 + # Work around issue where the default CFLAGS fail with gcc-4.9.3 (possibly newer), force -O0 instead
28 + # bug 564890, 566638
29 + if [[ $(gcc-major-version) -ge 5 || $(gcc-major-version) -eq 4 && $(gcc-minor-version) -ge 9 ]]; then
30 + if use custom-cflags; then
31 + ewarn "You are using custom cflags with gcc-4.9 or newer."
32 + ewarn "Be aware the result may segfault at runtime due to unknown optimization"
33 + ewarn "incompatibilities."
34 + else
35 + einfo "Forcing -O0 to get around optimization issue caused by gcc-4.9 and newer with -O2"
36 + sed -i -e "/CFLAGS/s/-O2/-O0/" \
37 + "${S}"/configure.ac || die
38 + fi
39 + fi
40 +
41 rm -f "${S}"/aclocal.m4 # seems to keep bug 418287 away
42 eautoreconf
43 }