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 |
- |
|
|