1 |
commit: 2c8d90f4ac9df93020014604a39cdca6b8356cce |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 3 15:18:12 2020 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 3 15:18:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c8d90f4 |
7 |
|
8 |
meson.eclass: only default BUILD_FLAGS to FLAGS if not cross-compiling |
9 |
|
10 |
Bug: https://bugs.gentoo.org/720818 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
eclass/meson.eclass | 12 +++++++++--- |
14 |
1 file changed, 9 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/eclass/meson.eclass b/eclass/meson.eclass |
17 |
index dce5fffd894..13daa961c7b 100644 |
18 |
--- a/eclass/meson.eclass |
19 |
+++ b/eclass/meson.eclass |
20 |
@@ -288,9 +288,15 @@ meson_src_configure() { |
21 |
debug-print-function ${FUNCNAME} "$@" |
22 |
|
23 |
tc-export_build_env |
24 |
- : ${BUILD_FCFLAGS:=${FCFLAGS}} |
25 |
- : ${BUILD_OBJCFLAGS:=${OBJCFLAGS}} |
26 |
- : ${BUILD_OBJCXXFLAGS:=${OBJCXXFLAGS}} |
27 |
+ if tc-is-cross-compiler; then |
28 |
+ : ${BUILD_FCFLAGS:=-O1 -pipe} |
29 |
+ : ${BUILD_OBJCFLAGS:=-O1 -pipe} |
30 |
+ : ${BUILD_OBJCXXFLAGS:=-O1 -pipe} |
31 |
+ else |
32 |
+ : ${BUILD_FCFLAGS:=${FCFLAGS}} |
33 |
+ : ${BUILD_OBJCFLAGS:=${OBJCFLAGS}} |
34 |
+ : ${BUILD_OBJCXXFLAGS:=${OBJCXXFLAGS}} |
35 |
+ fi |
36 |
|
37 |
local mesonargs=( |
38 |
meson setup |