Skip to content
Snippets Groups Projects

WIP: Meson native test

Open Marvin Scholz requested to merge meson_native/1 into master
+ 14
15
@@ -312,19 +312,6 @@ HOSTCONF += --with-pic
PIC := -fPIC
endif
# For cross-compilation with meson, do not set compiler and flags
# in HOSTVARS as meson will always use them for the BUILD machine compiler!
MESON_HOST_FLAGS := \
CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
LDFLAGS="$(LDFLAGS)"
ifdef HAVE_CROSS_COMPILE
HOSTVARS_MESON := PATH="$(PREFIX)/bin:$(PATH)"
else
HOSTVARS_MESON := $(HOSTTOOLS) $(MESON_HOST_FLAGS)
endif
# Add these flags after Meson consumed the CFLAGS/CXXFLAGS
ifndef WITH_OPTIMIZATION
CFLAGS := $(CFLAGS) -g -O0
@@ -349,6 +336,19 @@ HOSTVARS_PIC := $(HOSTTOOLS) \
CXXFLAGS="$(CXXFLAGS) $(PIC)" \
LDFLAGS="$(LDFLAGS)"
# For cross-compilation with meson, do not set compiler and flags
# as meson will always use them for the BUILD machine compiler!
ifdef HAVE_CROSS_COMPILE
HOSTVARS_MESON := PATH="$(PREFIX)/bin:$(PATH)" \
CCAS="" RANLIB="" STRIP="" \
CPPFLAGS="" \
CFLAGS="" \
CXXFLAGS="" \
LDFLAGS=""
else
HOSTVARS_MESON := $(HOSTVARS)
endif
download_git = \
rm -Rf -- "$(@:.tar.xz=)" && \
$(GIT) init --bare "$(@:.tar.xz=)" && \
@@ -648,8 +648,7 @@ endif
endif
crossfile.meson: $(SRC)/gen-meson-crossfile.py
$(HOSTTOOLS) \
$(MESON_HOST_FLAGS) \
$(HOSTVARS) \
WINDRES="$(WINDRES)" \
PKG_CONFIG="$(PKG_CONFIG)" \
HOST_SYSTEM="$(MESON_SYSTEM_NAME)" \
Loading