diff options
author | Mike Gilbert <floppym@gentoo.org> | 2020-05-03 13:46:50 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-05-03 13:54:46 -0400 |
commit | cbeeaff9e92cd67e100e5810ce1cf5d075d3f438 (patch) | |
tree | ff61598e5e34aa05e4fab5b817b281459715f864 /eclass | |
parent | profiles: Add x11-libs/pangox-compat to package.deprecated (diff) | |
download | gentoo-cbeeaff9e92cd67e100e5810ce1cf5d075d3f438.tar.gz gentoo-cbeeaff9e92cd67e100e5810ce1cf5d075d3f438.tar.bz2 gentoo-cbeeaff9e92cd67e100e5810ce1cf5d075d3f438.zip |
meson.eclass: avoid leaking BUILD vars outside meson_src_configure
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/meson.eclass | 15 |
1 files changed, 14 insertions, 1 deletions
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 |