summaryrefslogtreecommitdiff
path: root/sys-apps/kexec-tools/kexec-tools-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
commitdeba8115d2c2af26df42966b91ef04ff4dd79cde (patch)
tree9a48f42594e1a9e6b2020d5535a784314434d7a7 /sys-apps/kexec-tools/kexec-tools-9999.ebuild
parent38423c67c8a23f6a1bc42038193182e2da3116eb (diff)
gentoo resync : 14.05.2020
Diffstat (limited to 'sys-apps/kexec-tools/kexec-tools-9999.ebuild')
-rw-r--r--sys-apps/kexec-tools/kexec-tools-9999.ebuild28
1 files changed, 24 insertions, 4 deletions
diff --git a/sys-apps/kexec-tools/kexec-tools-9999.ebuild b/sys-apps/kexec-tools/kexec-tools-9999.ebuild
index 99c3438156f5..77c5d7c6e590 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 1999-2020 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
@@ -11,7 +11,7 @@ if [[ ${PV} == "9999" ]] ; then
else
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P/_/-}.tar.xz"
[[ "${PV}" == *_rc* ]] || \
- KEYWORDS="~amd64 ~arm64 ~hppa ~ppc64 ~x86"
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
fi
DESCRIPTION="Load another kernel from the currently executing Linux kernel"
@@ -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