Browse Source

meson: fix arch mapping

meson uses a different architecture mapping than CONFIG_ARCH does.

Fix the problematic ones and fall back to CONFIG_ARCH.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 4 years ago
parent
commit
737f1f46ce
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
2 changed files with 18 additions and 2 deletions
  1. +1
    -1
      devel/meson/Makefile
  2. +17
    -1
      devel/meson/meson.mk

+ 1
- 1
devel/meson/Makefile View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=meson PKG_NAME:=meson
PKG_VERSION:=0.54.3 PKG_VERSION:=0.54.3
PKG_RELEASE:=1
PKG_RELEASE:=2
PYPI_NAME:=meson PYPI_NAME:=meson
PKG_HASH:=f2bdf4cf0694e696b48261cdd14380fb1d0fe33d24744d8b2df0c12f33ebb662 PKG_HASH:=f2bdf4cf0694e696b48261cdd14380fb1d0fe33d24744d8b2df0c12f33ebb662


+ 17
- 1
devel/meson/meson.mk View File

@ -36,6 +36,22 @@ MESON_BUILD_DIR:=$(PKG_BUILD_DIR)/openwrt-build
MESON_VARS:= MESON_VARS:=
MESON_ARGS:= MESON_ARGS:=
ifneq ($(findstring i386,$(CONFIG_ARCH)),)
MESON_ARCH:="x86"
else ifneq ($(findstring powerpc64,$(CONFIG_ARCH)),)
MESON_ARCH:="ppc64"
else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
MESON_ARCH:="ppc"
else ifneq ($(findstring mips64el,$(CONFIG_ARCH)),)
MESON_ARCH:="mips64"
else ifneq ($(findstring mipsel,$(CONFIG_ARCH)),)
MESON_ARCH:="mips"
else ifneq ($(findstring armeb,$(CONFIG_ARCH)),)
MESON_ARCH:="arm"
else
MESON_ARCH:=$(CONFIG_ARCH)
endif
define Meson define Meson
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(MESON_DIR)/meson.py $(1) $(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(MESON_DIR)/meson.py $(1)
endef endef
@ -65,7 +81,7 @@ define Meson/CreateCrossFile
-e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \ -e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \
-e "s|@ARCH@|$(ARCH)|" \
-e "s|@ARCH@|$(MESON_ARCH)|" \
-e "s|@CPU@|$(CONFIG_TARGET_SUBTARGET)|" \ -e "s|@CPU@|$(CONFIG_TARGET_SUBTARGET)|" \
-e "s|@ENDIAN@|$(if $(CONFIG_BIG_ENDIAN),big,little)|" \ -e "s|@ENDIAN@|$(if $(CONFIG_BIG_ENDIAN),big,little)|" \
< $(MESON_DIR)/openwrt-cross.txt.in \ < $(MESON_DIR)/openwrt-cross.txt.in \


Loading…
Cancel
Save