coremark: fix error when it was built in the second run
authorRye Sears <redacted>
Thu, 10 Apr 2025 07:36:31 +0000 (15:36 +0800)
committerRobert Marko <redacted>
Wed, 23 Apr 2025 13:14:09 +0000 (15:14 +0200)
When there is an error building packages other than coremark
and re-run with make -j1 V=s, the coremark package will report error.
the root cause is the folder was already created in the first run,
and not removed before the second run.

To fix this, use 'mkdir -p' instead of 'mkdir'.

Co-authored-by: Jonas Gorski <redacted>
Signed-off-by: Rye Sears <redacted>
utils/coremark/Makefile

index 06a05c8753f87424c63095c6c34c398c28317ade..cc3d6dd7f1966635c91a1e83336cd9f259a7536a 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=coremark
 PKG_SOURCE_DATE:=2023-01-25
 PKG_SOURCE_VERSION:=d5fad6bd094899101a4e5fd53af7298160ced6ab
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/eembc/coremark/tar.gz/$(PKG_SOURCE_VERSION)?
@@ -70,8 +70,8 @@ endif
 
 define Build/Compile
        $(SED) 's|EXE = .exe|EXE =|' $(PKG_BUILD_DIR)/posix/core_portme.mak
-       mkdir $(PKG_BUILD_DIR)/$(ARCH)
-       $(CP) -r $(PKG_BUILD_DIR)/linux/* $(PKG_BUILD_DIR)/$(ARCH)
+       mkdir -p $(PKG_BUILD_DIR)/$(ARCH)
+       $(CP) $(PKG_BUILD_DIR)/linux/* $(PKG_BUILD_DIR)/$(ARCH)/
        $(MAKE) -C $(PKG_BUILD_DIR) PORT_DIR=$(ARCH) $(MAKE_FLAGS) \
                PORT_CFLAGS="$(TARGET_CFLAGS)" XCFLAGS="$(EXTRA_CFLAGS)" compile
 endef
git clone https://git.99rst.org/PROJECT