Skip to content

Commit 14ec809

Browse files
authored
Fix call to make arch-noarch-x.y (#6830)
* Fix call to make arch-noarch-x.y * noarch log filename fix * supported.mk: Add make all-supported|latest functionalty to noarch * patch.mk: Handle noarch architecture * supported.mk: Use ARCH=noarch instead of ARCH= when applicable
1 parent 74f9050 commit 14ec809

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

mk/spksrc.common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ ifneq ($(filter 1 on ON,$(PSTAT)),)
144144
PSTAT_TIME = time -o $(STATUS_LOG) --append --quiet
145145
endif
146146

147-
DEFAULT_LOG = $(LOG_DIR)/build$(ARCH_SUFFIX).log
147+
DEFAULT_LOG = $(LOG_DIR)/build$(or $(ARCH_SUFFIX),-noarch-$(TCVERSION)).log
148148
CROSSENV_LOG = $(LOG_DIR)/build$(ARCH_SUFFIX)-crossenv.log
149149
WHEEL_LOG = $(LOG_DIR)/build$(ARCH_SUFFIX)-wheel.log
150150
NATIVE_LOG = $(LOG_DIR)/build-native-$(PKG_NAME).log

mk/spksrc.patch.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ PATCHES_LEVEL = 0
1616
endif
1717

1818
# find patches into the following directory order:
19-
# patches/*.patch ## this is the only location for native and noarch builds
19+
# patches/*.patch ## this is the default location for native
2020
# patches/kernel-$(subst +,,$(TC_KERNEL))/*.patch ## Discard any ending +
2121
# patches/DSM-$(TCVERSION)/*.patch
2222
# patches/$(group)/*.patch
2323
# patches/$(group)-$(TCVERSION)/*.patch
2424
# patches/$(arch)/*.patch
2525
# patches/$(arch)-$(TCVERSION)/*.patch
26-
# supported groups: arm, armv5, armv7, armv7l, armv8, ppc, i686, x64
26+
# supported groups: arm, armv5, armv7, armv7l, armv8, ppc, i686, x64, noarch
2727
ifeq ($(strip $(PATCHES)),)
28-
ifeq ($(strip $(ARCH)),)
28+
ifeq ($(strip $(ARCH)),noarch)
2929
PATCHES = $(wildcard patches/*.patch)
3030
else ifneq ($(filter cross diyspk python spk,$(shell basename $(dir $(abspath $(dir $$PWD))))),)
3131
PATCHES = $(sort $(foreach group,ARM_ARCHS ARMv5_ARCHS ARMv7_ARCHS ARMv7L_ARCHS ARMv8_ARCHS PPC_ARCHS i686_ARCHS x64_ARCHS, \
32-
$(foreach arch,$($(group)), \
32+
$(foreach arch,$($(group) noarch), \
3333
$(if $(filter $(ARCH),$(arch)),$(sort $(wildcard patches/*.patch patches/kernel-$(subst +,,$(TC_KERNEL))/*.patch patches/DSM-$(TCVERSION)/*.patch patches/$(shell echo ${group} | cut -f1 -d'_'| tr '[:upper:]' '[:lower:]')/*.patch patches/$(shell echo ${group} | cut -f1 -d'_'| tr '[:upper:]' '[:lower:]')-$(TCVERSION)/*.patch patches/$(arch)/*.patch patches/$(arch)-$(TCVERSION)/*.patch)),))))
3434
else
3535
PATCHES = $(sort $(wildcard patches/*.patch))

mk/spksrc.supported.mk

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ include ../../mk/spksrc.common-rules.mk
99
# make all-supported
1010
ifeq (supported,$(findstring supported,$(subst -, ,$(firstword $(MAKECMDGOALS)))))
1111
TARGET_TYPE = supported
12+
ifeq ($(ARCH),noarch)
13+
TARGET_ARCH = $(addprefix noarch-,$(sort $(foreach version,$(SUPPORTED_ARCHS),$(word 2,$(subst -, ,$(version))))))
14+
else
1215
TARGET_ARCH = $(SUPPORTED_ARCHS)
16+
endif
1317

1418
# make all-latest
1519
else ifeq (latest,$(findstring latest,$(subst -, ,$(firstword $(MAKECMDGOALS)))))
1620
TARGET_TYPE = latest
21+
ifeq ($(ARCH),noarch)
22+
TARGET_ARCH = $(addprefix noarch-,$(sort $(foreach version,$(LATEST_ARCHS),$(word 2,$(subst -, ,$(version))))))
23+
else
1724
TARGET_ARCH = $(LATEST_ARCHS)
1825
endif
26+
endif
1927

2028
# error: make setup not invoked
2129
ifneq ($(strip $(TARGET_TYPE)),)
@@ -50,12 +58,12 @@ pre-build-native:
5058
$(TARGET_TYPE)-arch-% &: pre-build-native
5159
-@MAKEFLAGS= GCC_DEBUG_INFO="$(GCC_DEBUG_INFO)" $(MAKE) arch-$*
5260

61+
arch-noarch-%:
62+
$(PSTAT_TIME) $(MAKE) $(addprefix build-noarch-, $(filter $*, $(AVAILABLE_TCVERSIONS) 3.1))
63+
5364
arch-%:
5465
$(PSTAT_TIME) $(MAKE) $(addprefix build-arch-, $(or $(filter $(addprefix %, $(DEFAULT_TC)), $(filter %$(word 2,$(subst -, ,$*)), $(filter $(firstword $(subst -, ,$*))%, $(AVAILABLE_TOOLCHAINS)))),$*))
5566

56-
noarch-%:
57-
$(PSTAT_TIME) $(MAKE) $(addprefix build-noarch-, $(filter $*, $(AVAILABLE_TCVERSIONS) 3.1))
58-
5967
####
6068

6169
build-arch-%: SHELL:=/bin/bash
@@ -70,7 +78,7 @@ build-arch-%:
7078
build-noarch-%: SHELL:=/bin/bash
7179
build-noarch-%:
7280
@$(MSG) BUILDING noarch package for TCVERSION $*
73-
@MAKEFLAGS= $(MAKE) TCVERSION=$* 2>&1 ; \
81+
@MAKEFLAGS= $(MAKE) TCVERSION=$* ARCH=noarch 2>&1 ; \
7482
status=$${PIPESTATUS[0]} ; \
7583
$(MSG) $$(printf "%s MAKELEVEL: %02d, PARALLEL_MAKE: %s, TCVERSION: %s, NAME: %s [END]\n" "$$(date +%Y%m%d-%H%M%S)" $(MAKELEVEL) "$(PARALLEL_MAKE)" "$*" "$(NAME)") | tee --append $(STATUS_LOG) ; \
7684
[ $${status[0]} -eq 0 ] || false

0 commit comments

Comments
 (0)