From 608f10ea59d065b4940d86fb47e060e71be46ba3 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Mon, 10 Sep 2018 01:29:52 -0300 Subject: [PATCH] build-style/meson: add nm to binaries and export LD, AR, CPPFLAGS and LDFLAGS. --- common/build-style/meson.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/common/build-style/meson.sh b/common/build-style/meson.sh index 31231fa469a..6f9256e5881 100644 --- a/common/build-style/meson.sh +++ b/common/build-style/meson.sh @@ -35,6 +35,7 @@ do_configure() { c = '${CC}' cpp = '${CXX}' ar = '${AR}' +nm = '${NM}' ld = '${LD}' strip = '${STRIP}' readelf = '${READELF}' @@ -56,14 +57,15 @@ endian = '${_MESON_TARGET_ENDIAN}' EOF configure_args+=" --cross-file=${meson_crossfile}" - # Meson tries to compile natively with CC, CXX, so when cross - # compiling, we need to set those to the host versions. - export CC=${CC_host} CXX=${CXX_host} + # 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 and CPPFLAGS when compiling under - # native: true, so we use XBPS_CFLAGS and XBPS_CPPFLAGS which - # are set to (C|CXX)FLAGS_host - export CFLAGS=${CFLAGS_host} CXXFLAGS=${CXXFLAGS_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)