Browse Source

meson: fix host cpu setting

CONFIG_TARGET_SUBTARGET is bogus for this, it can contain values such as
'nand' or 'tiny', use the real cpu type instead.

Fixes #14662.

Signed-off-by: Andre Heider <a.heider@gmail.com>
lilik-openwrt-22.03
Andre Heider 4 years ago
parent
commit
a7865a4af4
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      devel/meson/meson.mk

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

@ -52,6 +52,13 @@ else
MESON_ARCH:=$(CONFIG_ARCH)
endif
# this is undefined for just x64_64
ifeq ($(origin CPU_TYPE),undefined)
MESON_CPU:="generic"
else
MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))"
endif
define Meson
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(MESON_DIR)/meson.py $(1)
endef
@ -81,7 +88,7 @@ define Meson/CreateCrossFile
-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|@ARCH@|$(MESON_ARCH)|" \
-e "s|@CPU@|$(CONFIG_TARGET_SUBTARGET)|" \
-e "s|@CPU@|$(MESON_CPU))|" \
-e "s|@ENDIAN@|$(if $(CONFIG_BIG_ENDIAN),big,little)|" \
< $(MESON_DIR)/openwrt-cross.txt.in \
> $(1)


Loading…
Cancel
Save