Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 588252 Details for
Bug 692930
>=sys-apps/kexec-tools-2.0.19 partially ignores CFLAGS
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
kexec-tools.patch (text/plain), 4.11 KB, created by
Arfrever Frehtes Taifersar Arahesis
on 2019-08-27 08:05:22 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis
Created:
2019-08-27 08:05:22 UTC
Size:
4.11 KB
patch
obsolete
>From 4ab0cf86caaeb24cf4de2a0c000563bfafc40c12 Mon Sep 17 00:00:00 2001 >From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> >Date: Tue, 27 Aug 2019 07:39:08 +0000 >Subject: [PATCH] sys-apps/kexec-tools: Respect CFLAGS for purgatory. > >Only when building purgatory, replace -mfunction-return=thunk and -mindirect-branch=thunk flags >with similar -mfunction-return=thunk-inline and -mindirect-branch=thunk-inline flags, which >are not incompatible with flags added by build system. > >Closes: https://bugs.gentoo.org/646536 >Closes: https://bugs.gentoo.org/692930 >Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> >--- > .../kexec-tools/kexec-tools-2.0.20.ebuild | 26 ++++++++++++++++--- > sys-apps/kexec-tools/kexec-tools-9999.ebuild | 26 ++++++++++++++++--- > 2 files changed, 46 insertions(+), 6 deletions(-) > >diff --git a/sys-apps/kexec-tools/kexec-tools-2.0.20.ebuild b/sys-apps/kexec-tools/kexec-tools-2.0.20.ebuild >index a96230eff79..63ed29fa45e 100644 >--- a/sys-apps/kexec-tools/kexec-tools-2.0.20.ebuild >+++ b/sys-apps/kexec-tools/kexec-tools-2.0.20.ebuild >@@ -1,9 +1,9 @@ >-# Copyright 1999-2019 Gentoo Authors >+# Copyright 2004-2019 Gentoo Authors > # Distributed under the terms of the GNU General Public License v2 > > EAPI=7 > >-inherit flag-o-matic libtool linux-info systemd >+inherit libtool linux-info systemd > > if [[ ${PV} == "9999" ]] ; then > inherit git-r3 autotools >@@ -44,12 +44,15 @@ pkg_setup() { > > src_prepare() { > default >+ >+ # Append PURGATORY_EXTRA_CFLAGS flags set by configure, instead of overriding them completely. >+ sed -e "/^PURGATORY_EXTRA_CFLAGS =/s/=/+=/" -i Makefile.in || die >+ > if [[ "${PV}" == 9999 ]] ; then > eautoreconf > else > elibtoolize > fi >- filter-flags '-mindirect-branch=thunk*' > } > > src_configure() { >@@ -62,6 +65,23 @@ src_configure() { > econf "${myeconfargs[@]}" > } > >+src_compile() { >+ # Respect CFLAGS for purgatory. >+ # purgatory/Makefile uses PURGATORY_EXTRA_CFLAGS variable. >+ # -mfunction-return=thunk and -mindirect-branch=thunk conflict with >+ # -mcmodel=large which is added by build system. >+ # Replace them with -mfunction-return=thunk-inline and -mindirect-branch=thunk-inline. >+ local flag flags=() >+ for flag in ${CFLAGS}; do >+ [[ ${flag} == -mfunction-return=thunk ]] && flag="-mfunction-return=thunk-inline" >+ [[ ${flag} == -mindirect-branch=thunk ]] && flag="-mindirect-branch=thunk-inline" >+ flags+=("${flag}") >+ done >+ local -x PURGATORY_EXTRA_CFLAGS="${flags[*]}" >+ >+ default >+} >+ > src_install() { > default > >diff --git a/sys-apps/kexec-tools/kexec-tools-9999.ebuild b/sys-apps/kexec-tools/kexec-tools-9999.ebuild >index a96230eff79..63ed29fa45e 100644 >--- a/sys-apps/kexec-tools/kexec-tools-9999.ebuild >+++ b/sys-apps/kexec-tools/kexec-tools-9999.ebuild >@@ -1,9 +1,9 @@ >-# Copyright 1999-2019 Gentoo Authors >+# Copyright 2004-2019 Gentoo Authors > # Distributed under the terms of the GNU General Public License v2 > > EAPI=7 > >-inherit flag-o-matic libtool linux-info systemd >+inherit libtool linux-info systemd > > if [[ ${PV} == "9999" ]] ; then > inherit git-r3 autotools >@@ -44,12 +44,15 @@ pkg_setup() { > > src_prepare() { > default >+ >+ # Append PURGATORY_EXTRA_CFLAGS flags set by configure, instead of overriding them completely. >+ sed -e "/^PURGATORY_EXTRA_CFLAGS =/s/=/+=/" -i Makefile.in || die >+ > if [[ "${PV}" == 9999 ]] ; then > eautoreconf > else > elibtoolize > fi >- filter-flags '-mindirect-branch=thunk*' > } > > src_configure() { >@@ -62,6 +65,23 @@ src_configure() { > econf "${myeconfargs[@]}" > } > >+src_compile() { >+ # Respect CFLAGS for purgatory. >+ # purgatory/Makefile uses PURGATORY_EXTRA_CFLAGS variable. >+ # -mfunction-return=thunk and -mindirect-branch=thunk conflict with >+ # -mcmodel=large which is added by build system. >+ # Replace them with -mfunction-return=thunk-inline and -mindirect-branch=thunk-inline. >+ local flag flags=() >+ for flag in ${CFLAGS}; do >+ [[ ${flag} == -mfunction-return=thunk ]] && flag="-mfunction-return=thunk-inline" >+ [[ ${flag} == -mindirect-branch=thunk ]] && flag="-mindirect-branch=thunk-inline" >+ flags+=("${flag}") >+ done >+ local -x PURGATORY_EXTRA_CFLAGS="${flags[*]}" >+ >+ default >+} >+ > src_install() { > default > >-- >2.23.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 692930
:
588250
| 588252