Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 05 May 2018 20:16:14
Message-Id: 1525551355.2dd9b21e7b9003c1dd6e7e71578449d01302d610.floppym@gentoo
1 commit: 2dd9b21e7b9003c1dd6e7e71578449d01302d610
2 Author: Raul E Rangel <rrangel <AT> chromium <DOT> org>
3 AuthorDate: Tue May 1 18:40:30 2018 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat May 5 20:15:55 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dd9b21e
7
8 tc-export_build_env: handle non-cross compile case
9
10 By handling the non-cross compiler case the meson.eclass can be
11 simplified to `tc-env_build "$@" || die`.
12
13 See https://bugs.gentoo.org/654424
14
15 Change-Id: I1a90da46366c490abbf7d5660bf90482c7f22747
16 Signed-off-by: Raul E Rangel <rrangel <AT> chromium.org>
17 Closes: https://bugs.gentoo.org/654424
18
19 eclass/toolchain-funcs.eclass | 22 +++++++++++++++-------
20 1 file changed, 15 insertions(+), 7 deletions(-)
21
22 diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
23 index 4b1876b8e09..1c8090cf75c 100644
24 --- a/eclass/toolchain-funcs.eclass
25 +++ b/eclass/toolchain-funcs.eclass
26 @@ -247,13 +247,21 @@ tc-stack-grows-down() {
27 # Export common build related compiler settings.
28 tc-export_build_env() {
29 tc-export "$@"
30 - # Some build envs will initialize vars like:
31 - # : ${BUILD_LDFLAGS:-${LDFLAGS}}
32 - # So make sure all variables are non-empty. #526734
33 - : ${BUILD_CFLAGS:=-O1 -pipe}
34 - : ${BUILD_CXXFLAGS:=-O1 -pipe}
35 - : ${BUILD_CPPFLAGS:= }
36 - : ${BUILD_LDFLAGS:= }
37 + if tc-is-cross-compiler; then
38 + # Some build envs will initialize vars like:
39 + # : ${BUILD_LDFLAGS:-${LDFLAGS}}
40 + # So make sure all variables are non-empty. #526734
41 + : ${BUILD_CFLAGS:=-O1 -pipe}
42 + : ${BUILD_CXXFLAGS:=-O1 -pipe}
43 + : ${BUILD_CPPFLAGS:= }
44 + : ${BUILD_LDFLAGS:= }
45 + else
46 + # https://bugs.gentoo.org/654424
47 + : ${BUILD_CFLAGS:=${CFLAGS}}
48 + : ${BUILD_CXXFLAGS:=${CXXFLAGS}}
49 + : ${BUILD_CPPFLAGS:=${CPPFLAGS}}
50 + : ${BUILD_LDFLAGS:=${LDFLAGS}}
51 + fi
52 export BUILD_{C,CXX,CPP,LD}FLAGS
53
54 # Some packages use XXX_FOR_BUILD.