diff --git a/config/functions b/config/functions index 55f6cb3b83..5a886059d7 100644 --- a/config/functions +++ b/config/functions @@ -147,7 +147,7 @@ setup_toolchain() { } create_meson_conf() { - local endian root conf + local endian root case "$1" in target|init) endian="little" root="$SYSROOT_PREFIX/usr" @@ -157,24 +157,25 @@ create_meson_conf() { ;; esac - conf=$2 - echo "[binaries]" > $conf - echo "c = '$CC'" >> $conf - echo "cpp = '$CXX'" >> $conf - echo "ar = '$AR'" >> $conf - echo "strip = '$STRIP'" >> $conf - echo "pkgconfig = '$PKG_CONFIG'" >> $conf - echo "" >> $conf - echo "[host_machine]" >> $conf - echo "system = 'linux'" >> $conf - echo "cpu_family = '$TARGET_ARCH'" >> $conf - echo "cpu = '$TARGET_SUBARCH'" >> $conf - echo "endian = '$endian'" >> $conf - echo "" >> $conf - echo "[properties]" >> $conf - echo "root = '$root'" >> $conf - python -c "import os; print('c_args = {}'.format([x for x in os.getenv('CFLAGS').split()]))" >> $conf - python -c "import os; print('c_link_args = {}'.format([x for x in os.getenv('LDFLAGS').split()]))" >> $conf + cat > $2 <