diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2015-12-08 16:23:20 -0500 |
---|---|---|
committer | Ian Stakenvicius <axs@gentoo.org> | 2015-12-08 16:23:47 -0500 |
commit | 69273f1d085c5d44071c1f209e9048faa7c78202 (patch) | |
tree | e5fecfc67b8b07e7ddb9c6fa63a5abe3dbc1a821 /sys-boot | |
parent | b11605f98ffe86003f351b97d7c975c554bf19a6 (diff) | |
download | gentoo-69273f1d085c5d44071c1f209e9048faa7c78202.tar.gz gentoo-69273f1d085c5d44071c1f209e9048faa7c78202.tar.xz |
sys-boot/grub:0 - Force -O0 to work around bugs 564890, 566638
Package-Manager: portage-2.2.24
Diffstat (limited to 'sys-boot')
-rw-r--r-- | sys-boot/grub/grub-0.97-r16.ebuild (renamed from sys-boot/grub/grub-0.97-r15.ebuild) | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys-boot/grub/grub-0.97-r15.ebuild b/sys-boot/grub/grub-0.97-r16.ebuild index 068f68b9196..9da0d0e384f 100644 --- a/sys-boot/grub/grub-0.97-r15.ebuild +++ b/sys-boot/grub/grub-0.97-r16.ebuild @@ -67,6 +67,21 @@ src_prepare() { || die EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch + + # Work around issue where the default CFLAGS fail with gcc-4.9.3 (possibly newer), force -O0 instead + # bug 564890, 566638 + if [[ $(gcc-major-version) -ge 5 || $(gcc-major-version) -eq 4 && $(gcc-minor-version) -ge 9 ]]; then + if use custom-cflags; then + ewarn "You are using custom cflags with gcc-4.9 or newer." + ewarn "Be aware the result may segfault at runtime due to unknown optimization" + ewarn "incompatibilities." + else + einfo "Forcing -O0 to get around optimization issue caused by gcc-4.9 and newer with -O2" + sed -i -e "/CFLAGS/s/-O2/-O0/" \ + "${S}"/configure.ac || die + fi + fi + rm -f "${S}"/aclocal.m4 # seems to keep bug 418287 away eautoreconf } |