From f4d315aaa826270b307c9ce7cd1622ed97b44d23 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 31 Mar 2020 15:53:48 +0200 Subject: [PATCH] build-style/meson: update for new env var behaviour meson 0.54 now honors _FOR_BUILD env vars, and we don't have to set CC and friends to the host system vars. Setting PKG_CONFIG_FOR_BUILD is needed since otherwise it would pickup our cross wrapper --- common/build-style/meson.sh | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/common/build-style/meson.sh b/common/build-style/meson.sh index bf3185b2ef9..65238d3b54b 100644 --- a/common/build-style/meson.sh +++ b/common/build-style/meson.sh @@ -85,22 +85,7 @@ do_configure() { if [ "$CROSS_BUILD" ]; then configure_args+=" --cross-file=${meson_crossfile}" - - # Meson tries to compile natively with CC, CXX, LD, AR - # so when cross compiling, we need to set those to the - # host versions. - export CC=${CC_host} CXX=${CXX_host} LD=${LD_host} AR=${AR_host} - - # Meson tries to use CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS when compiling under - # native: true, so we use XBPS_CFLAGS, XBPS_CXXFLAGS, XBPS_CPPFLAGS and XBPS_LDFLAGS - # which are set to (C|CXX|CPP|LD)FLAGS_host - export CFLAGS=${CFLAGS_host} CXXFLAGS=${CXXFLAGS_host} CPPFLAGS=${CPPFLAGS_host} LDFLAGS=${LDFLAGS_host} - - # Meson tries to use our wrapped cross-only pkg-config to find - # libraries even when 'native: true' (build against the host platform) - # is set, so set the PKG_CONFIG variable to tell Meson which pkg-config - # it should use when searching for stuff in the build machine - export PKG_CONFIG="/usr/bin/pkg-config" + export PKG_CONFIG_FOR_BUILD="/usr/bin/pkg-config" fi ${meson_cmd} \