Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 692930 | Differences between
and this patch

Collapse All | Expand All

(-)a/sys-apps/kexec-tools/kexec-tools-2.0.20.ebuild (-3 / +23 lines)
Lines 1-9 Link Here
1
# Copyright 1999-2019 Gentoo Authors
1
# Copyright 2004-2019 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=7
4
EAPI=7
5
5
6
inherit flag-o-matic libtool linux-info systemd
6
inherit libtool linux-info systemd
7
7
8
if [[ ${PV} == "9999" ]] ; then
8
if [[ ${PV} == "9999" ]] ; then
9
	inherit git-r3 autotools
9
	inherit git-r3 autotools
Lines 44-55 pkg_setup() { Link Here
44
44
45
src_prepare() {
45
src_prepare() {
46
	default
46
	default
47
48
	# Append PURGATORY_EXTRA_CFLAGS flags set by configure, instead of overriding them completely.
49
	sed -e "/^PURGATORY_EXTRA_CFLAGS =/s/=/+=/" -i Makefile.in || die
50
47
	if [[ "${PV}" == 9999 ]] ; then
51
	if [[ "${PV}" == 9999 ]] ; then
48
		eautoreconf
52
		eautoreconf
49
	else
53
	else
50
		elibtoolize
54
		elibtoolize
51
	fi
55
	fi
52
	filter-flags '-mindirect-branch=thunk*'
53
}
56
}
54
57
55
src_configure() {
58
src_configure() {
Lines 62-67 src_configure() { Link Here
62
	econf "${myeconfargs[@]}"
65
	econf "${myeconfargs[@]}"
63
}
66
}
64
67
68
src_compile() {
69
	# Respect CFLAGS for purgatory.
70
	# purgatory/Makefile uses PURGATORY_EXTRA_CFLAGS variable.
71
	# -mfunction-return=thunk and -mindirect-branch=thunk conflict with
72
	# -mcmodel=large which is added by build system.
73
	# Replace them with -mfunction-return=thunk-inline and -mindirect-branch=thunk-inline.
74
	local flag flags=()
75
	for flag in ${CFLAGS}; do
76
		[[ ${flag} == -mfunction-return=thunk ]] && flag="-mfunction-return=thunk-inline"
77
		[[ ${flag} == -mindirect-branch=thunk ]] && flag="-mindirect-branch=thunk-inline"
78
		flags+=("${flag}")
79
	done
80
	local -x PURGATORY_EXTRA_CFLAGS="${flags[*]}"
81
82
	default
83
}
84
65
src_install() {
85
src_install() {
66
	default
86
	default
67
87
(-)a/sys-apps/kexec-tools/kexec-tools-9999.ebuild (-4 / +23 lines)
Lines 1-9 Link Here
1
# Copyright 1999-2019 Gentoo Authors
1
# Copyright 2004-2019 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=7
4
EAPI=7
5
5
6
inherit flag-o-matic libtool linux-info systemd
6
inherit libtool linux-info systemd
7
7
8
if [[ ${PV} == "9999" ]] ; then
8
if [[ ${PV} == "9999" ]] ; then
9
	inherit git-r3 autotools
9
	inherit git-r3 autotools
Lines 44-55 pkg_setup() { Link Here
44
44
45
src_prepare() {
45
src_prepare() {
46
	default
46
	default
47
48
	# Append PURGATORY_EXTRA_CFLAGS flags set by configure, instead of overriding them completely.
49
	sed -e "/^PURGATORY_EXTRA_CFLAGS =/s/=/+=/" -i Makefile.in || die
50
47
	if [[ "${PV}" == 9999 ]] ; then
51
	if [[ "${PV}" == 9999 ]] ; then
48
		eautoreconf
52
		eautoreconf
49
	else
53
	else
50
		elibtoolize
54
		elibtoolize
51
	fi
55
	fi
52
	filter-flags '-mindirect-branch=thunk*'
53
}
56
}
54
57
55
src_configure() {
58
src_configure() {
Lines 62-67 src_configure() { Link Here
62
	econf "${myeconfargs[@]}"
65
	econf "${myeconfargs[@]}"
63
}
66
}
64
67
68
src_compile() {
69
	# Respect CFLAGS for purgatory.
70
	# purgatory/Makefile uses PURGATORY_EXTRA_CFLAGS variable.
71
	# -mfunction-return=thunk and -mindirect-branch=thunk conflict with
72
	# -mcmodel=large which is added by build system.
73
	# Replace them with -mfunction-return=thunk-inline and -mindirect-branch=thunk-inline.
74
	local flag flags=()
75
	for flag in ${CFLAGS}; do
76
		[[ ${flag} == -mfunction-return=thunk ]] && flag="-mfunction-return=thunk-inline"
77
		[[ ${flag} == -mindirect-branch=thunk ]] && flag="-mindirect-branch=thunk-inline"
78
		flags+=("${flag}")
79
	done
80
	local -x PURGATORY_EXTRA_CFLAGS="${flags[*]}"
81
82
	default
83
}
84
65
src_install() {
85
src_install() {
66
	default
86
	default
67
87
68
- 

Return to bug 692930