Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: eclass/
Date: Tue, 29 Aug 2017 13:52:17
Message-Id: 1504014545.575f949150dafd0288bf9d28bcf6acc1f6474408.heroxbd@gentoo
1 commit: 575f949150dafd0288bf9d28bcf6acc1f6474408
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 29 13:49:05 2017 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 29 13:49:05 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=575f9491
7
8 numeric-int64-multibuild.eclass: consider _static build variant.
9
10 _static is considered to be a different variant in this eclass,
11 but is no different from its dynamic conterpart in multilib.eclass.
12
13 Credit: Tom Daff
14 Closes: https://github.com/gentoo/sci/issues/809
15
16 eclass/numeric-int64-multibuild.eclass | 16 +++++++++++-----
17 1 file changed, 11 insertions(+), 5 deletions(-)
18
19 diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
20 index 1da654c7f..6403ee79c 100644
21 --- a/eclass/numeric-int64-multibuild.eclass
22 +++ b/eclass/numeric-int64-multibuild.eclass
23 @@ -347,17 +347,23 @@ numeric-int64-multibuild_multilib_wrapper() {
24 debug-print-function ${FUNCNAME} "${@}"
25
26 local v="${MULTIBUILD_VARIANT%_*}"
27 + # MULTIBUILD_VARIANT could be abi_x86_64.amd64_static_int32
28 + v=${v%_${NUMERIC_STATIC_SUFFIX}}
29 local ABI="${v#*.}"
30 # hack: our int64 and int32 ABIs can correspond to the same ABI
31 # in multilib, resulting in multiple sed replacements of headers
32 # and thus error like "Flag not listed in wrapper template."
33 # Using MULTILIB_ABI_FLAG="${ABI}", the corresponding header
34 # is ignored.
35 - if [[ ${MULTIBUILD_VARIANT##*_} == ${NUMERIC_INT32_SUFFIX} ]] ; then
36 - local -r MULTILIB_ABI_FLAG="${v%.*}"
37 - else
38 - local -r MULTILIB_ABI_FLAG="${ABI}"
39 - fi
40 + local MULTILIB_ABI_FLAG
41 + case ${MULTIBUILD_VARIANT} in
42 + *_${NUMERIC_STATIC_SUFFIX}*|*_${NUMERIC_INT64_SUFFIX})
43 + MULTILIB_ABI_FLAG="${ABI}"
44 + ;;
45 + *_${NUMERIC_INT32_SUFFIX})
46 + MULTILIB_ABI_FLAG="${v%.*}"
47 + ;;
48 + esac
49
50 multilib_toolchain_setup "${ABI}"
51 readonly ABI