From: Mike Gilbert Date: Sun, 3 May 2020 15:18:12 +0000 (-0400) Subject: meson.eclass: only default BUILD_FLAGS to FLAGS if not cross-compiling X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c8d90f4ac9df93020014604a39cdca6b8356cce;p=gentoo.git meson.eclass: only default BUILD_FLAGS to FLAGS if not cross-compiling Bug: https://bugs.gentoo.org/720818 Signed-off-by: Mike Gilbert --- 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