summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/meson.eclass12
1 files changed, 9 insertions, 3 deletions
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index dce5fffd894c..13daa961c7bd 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -288,9 +288,15 @@ meson_src_configure() {
debug-print-function ${FUNCNAME} "$@"
tc-export_build_env
- : ${BUILD_FCFLAGS:=${FCFLAGS}}
- : ${BUILD_OBJCFLAGS:=${OBJCFLAGS}}
- : ${BUILD_OBJCXXFLAGS:=${OBJCXXFLAGS}}
+ if tc-is-cross-compiler; then
+ : ${BUILD_FCFLAGS:=-O1 -pipe}
+ : ${BUILD_OBJCFLAGS:=-O1 -pipe}
+ : ${BUILD_OBJCXXFLAGS:=-O1 -pipe}
+ else
+ : ${BUILD_FCFLAGS:=${FCFLAGS}}
+ : ${BUILD_OBJCFLAGS:=${OBJCFLAGS}}
+ : ${BUILD_OBJCXXFLAGS:=${OBJCXXFLAGS}}
+ fi
local mesonargs=(
meson setup