From: Mike Gilbert Date: Sun, 3 May 2020 17:46:50 +0000 (-0400) Subject: meson.eclass: avoid leaking BUILD vars outside meson_src_configure X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cbeeaff9e92cd67e100e5810ce1cf5d075d3f438;p=gentoo.git meson.eclass: avoid leaking BUILD vars outside meson_src_configure Signed-off-by: Mike Gilbert --- diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 17875d97c47b..773413bb6020 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -287,13 +287,26 @@ meson_feature() { meson_src_configure() { debug-print-function ${FUNCNAME} "$@" - tc-export_build_env + local BUILD_CFLAGS=${BUILD_CFLAGS} + local BUILD_CPPFLAGS=${BUILD_CPPFLAGS} + local BUILD_CXXFLAGS=${BUILD_CXXFLAGS} + local BUILD_FCFLAGS=${BUILD_FCFLAGS} + local BUILD_OBJCFLAGS=${BUILD_OBJCFLAGS} + local BUILD_OBJCXXFLAGS=${BUILD_OBJCXXFLAGS} + local BUILD_LDFLAGS=${BUILD_LDFLAGS} + if tc-is-cross-compiler; then + : ${BUILD_CFLAGS:=-O1 -pipe} + : ${BUILD_CXXFLAGS:=-O1 -pipe} : ${BUILD_FCFLAGS:=-O1 -pipe} : ${BUILD_OBJCFLAGS:=-O1 -pipe} : ${BUILD_OBJCXXFLAGS:=-O1 -pipe} else + : ${BUILD_CFLAGS:=${CFLAGS}} + : ${BUILD_CPPFLAGS:=${CPPFLAGS}} + : ${BUILD_CXXFLAGS:=${CXXFLAGS}} : ${BUILD_FCFLAGS:=${FCFLAGS}} + : ${BUILD_LDFLAGS:=${LDFLAGS}} : ${BUILD_OBJCFLAGS:=${OBJCFLAGS}} : ${BUILD_OBJCXXFLAGS:=${OBJCXXFLAGS}} fi