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

build: Set noarch as default TARGET_ARCH #1947

Conversation

rzr
Copy link
Contributor

@rzr rzr commented Jul 24, 2020

This will help for debian upgrade

Change-Id: I2991d324b887e340cb676f7de8ea0dda2ea7c050
Forwarded: https://github.com/jerryscript-project/iotjs/pull/rzr
Bug: #1945
Bug-Debian: https://bugs.debian.org/957364
Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/cmake/review/master
IoT.js-DCO-1.0-Signed-off-by: Philippe Coval rzr@users.sf.net

This will help for debian upgrade

Change-Id: I2991d324b887e340cb676f7de8ea0dda2ea7c050
Forwarded: jerryscript-project#1947
Bug: jerryscript-project#1945
Bug-Debian: https://bugs.debian.org/957364
Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/cmake/review/master
IoT.js-DCO-1.0-Signed-off-by: Philippe Coval rzr@users.sf.net
@rzr rzr force-pushed the sandbox/rzr/cmake/review/master branch from 68a5d9d to e122c37 Compare July 24, 2020 20:20
rzr added a commit to TizenTeam/iotjs that referenced this pull request Jul 24, 2020
This will help for debian upgrade

Change-Id: I2991d324b887e340cb676f7de8ea0dda2ea7c050
Forwarded: jerryscript-project#1947
Bug: jerryscript-project#1945
Bug-Debian: https://bugs.debian.org/957364
Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/cmake/review/master
IoT.js-DCO-1.0-Signed-off-by: Philippe Coval rzr@users.sf.net
rzr added a commit to rzr/iotjs that referenced this pull request Jul 29, 2020
This will help for debian upgrade

Change-Id: I2991d324b887e340cb676f7de8ea0dda2ea7c050
Forwarded: jerryscript-project#1947
Bug: jerryscript-project#1945
Bug-Debian: https://bugs.debian.org/957364
Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/cmake/review/master
IoT.js-DCO-1.0-Signed-off-by: Philippe Coval rzr@users.sf.net
if(NOT DEFINED TARGET_ARCH)
message(WARNING "Use generic flags since TARGET_ARCH is not defined")
set(TARGET_ARCH "noarch")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are adding a TARGET_ARCH to be defined as "noarch" if it is not defined then the last else in the following check will never trigger. Is it not possible to set this via debian rules?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well I used to overide in debian/rules but I thought it would be better to have it set default upstream to avoid relying on undefined values,
I could remove the else warning since it's added in my patch.

Copy link
Contributor

Choose a reason for hiding this comment

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

ohh wait. I misunderstood the if-s here. The change is ok. If the user specified an incorrect arch then a warning will be printed out bellow, but if there is no arch configured then this will be triggered.

Copy link
Contributor

@galpeter galpeter left a comment

Choose a reason for hiding this comment

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

lgtm

if(NOT DEFINED TARGET_ARCH)
message(WARNING "Use generic flags since TARGET_ARCH is not defined")
set(TARGET_ARCH "noarch")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

ohh wait. I misunderstood the if-s here. The change is ok. If the user specified an incorrect arch then a warning will be printed out bellow, but if there is no arch configured then this will be triggered.

@rzr
Copy link
Contributor Author

rzr commented Jul 30, 2020

yes this is same as other board patch

Copy link
Member

@akosthekiss akosthekiss left a comment

Choose a reason for hiding this comment

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

LGTM (with a minor comment)

Works with me, for now, since noarch is already being used in our build terminology. But it is used incorrectly, in my opinion. At least, it is not consistent with the more widespread meaning of "noarch". In rpm/deb world, noarch usually labels a package that is not compiled, doesn't contain any binaries. A "noarch" package usually contains docs or scripts only. So, here, noarch is misleading IMO.

I think "generic" would be a better value for such a TARGET_ARCH, as that would trigger a build with no architecture-specific compiler options -- but that's still a build.

However, that would need a patch that touches more files in the code base, so that should/could happen in a follow-up.

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.

None yet

3 participants