meson when compiling something with 'native: true' (for building executables that are meant to be run on the host system) uses CFLAGS and CXXFLAGS environment variables, we "pollute" them with TARGET system cflags/cxxflags, such as -march= for the cross-compiled arch. so to fix it we export CFLAGS and CXXFLAGS to be CFLAGS_host and CXXFLAGS_host respectively, they are set by XBPS and correspond to the XBPS_CFLAGS/XBPS_CXXFLAGS. This same set of changes is also done with CC and CXX see L#61 this was found when cross-compiling lighttpd which created the 'lemon' executable to generate inputs thanks to @Cogitri from Exherbo for helping me debug this [ci skip]
BUILD STYLES ============ These shell snippets provide support for multiple build systems, i.e GNU configure, CMake, etc. A build style file must provide at least the following functions: - do_configure - do_build - do_install If a source package defines its own do_xxx() function, the function defined in the build style file is simply ignored.