Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coremark: fix error when it was built in the second run #1402

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xlighting2017
Copy link
Contributor

when there is an error building packages, and re-run with make -j1 V=s, the coremark package will report error

mkdir: cannot create directory '.../coremark-d5fad6bd094899101a4e5fd53af7298160ced6ab/XXX': File exists

so, add a check to see if that dir is already there;

also add a '/' to the destination folder of the cp command

fixes #1380

when there is an error building packages, and re-run with `make -j1 V=s`,  the coremark package will report error

`mkdir: cannot create directory '.../coremark-d5fad6bd094899101a4e5fd53af7298160ced6ab/XXX': File exists`

so, add a check to see if that dir is already there;

also add a '/' to the destination folder of the `cp` command

fixes immortalwrt#1380
@@ -69,8 +69,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)
[ -d "$(PKG_BUILD_DIR)/$(ARCH)" ] || mkdir $(PKG_BUILD_DIR)/$(ARCH)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say these operations should be done in Build/Configure stage, so the detection can be removed I guess.

mkdir $(PKG_BUILD_DIR)/$(ARCH)
$(CP) -r $(PKG_BUILD_DIR)/linux/* $(PKG_BUILD_DIR)/$(ARCH)
[ -d "$(PKG_BUILD_DIR)/$(ARCH)" ] || mkdir $(PKG_BUILD_DIR)/$(ARCH)
$(CP) -r $(PKG_BUILD_DIR)/linux/* $(PKG_BUILD_DIR)/$(ARCH)/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-r is included by $(CP) already, can be removed.

@1715173329
Copy link
Member

This PR should be sent to upstream.

@xlighting2017
Copy link
Contributor Author

This PR should be sent to upstream.

Thanks, will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coremark 编译错误
2 participants