meson: use chosen linker

meson requires setting the linker via c_ld/cpp_ld.
This now links meson based package builds with the chosen
DEFAULT_LINKER.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2023-10-16 14:43:08 +02:00
parent 9452f511f0
commit 52858e734f

View File

@ -609,13 +609,16 @@ EOF
} }
create_meson_conf_target() { create_meson_conf_target() {
local linker="$(get_target_linker)"
local properties local properties
properties="PKG_MESON_PROPERTIES_${1^^}" properties="PKG_MESON_PROPERTIES_${1^^}"
cat > $2 <<EOF cat > $2 <<EOF
[binaries] [binaries]
c = '$TARGET_CC' c = '$TARGET_CC'
c_ld = '$linker'
cpp = '$TARGET_CXX' cpp = '$TARGET_CXX'
cpp_ld = '$linker'
ar = '$TARGET_AR' ar = '$TARGET_AR'
strip = '$TARGET_STRIP' strip = '$TARGET_STRIP'
pkg-config = '$PKG_CONFIG' pkg-config = '$PKG_CONFIG'