-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Support setting MCPU during Make, for ARM #35617
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
Conversation
Make.inc
Outdated
| do_step = yes | ||
| endif | ||
|
|
||
| ifdef do_step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be a better way to do the OR logic here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ifdef do_step | |
| ifneq ($(MARCH)$(MCPU),) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks. Incorporated
|
I think you can just pass in Also, this isn't very ARM specific (and FWIW the condition doesn't seem to capture aarch64 which is arguably more important) though I think it could make sense to forward native march to mtune automatically. According to that article this should work on both x86 and arm. |
|
The paradigm just seems to be different for ARM, so I thought it best to directly support MCPU? Also, that article claims
Is that right? If I'm wading into an area I'm not familiar with so apologies if these are flawed suggestions |
|
And on the condition for catching arm & aarch64, you're right.. I need to think of a better catch there |
Not sure if that's right but this PR doesn't change that it seems.
All of the flags mentioned here ( |
Sorry, I didn't mean to imply it was. That was a tangential question. I think I'm concluding that I don't think I know enough about the internals of the language to venture any further. I just tweaked the logic to catch |
What I meant is that if it is currently used and we didn't get an error then adding |
|
Edit: Done |
Make.inc
Outdated
| else | ||
| ifneq ($(XC_HOST),) | ||
| XC_HOST := $(ARCH)$(shell echo $(XC_HOST) | sed "s/[^-]*\(.*\)$$/\1/") | ||
| ifneq (,$(filter ,$(findstring arm, $(ARCH)) $(findstring aarch64, $(ARCH)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does filter do without a filter list? Is this the same as strip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On review I think this wouldn't have worked. I've updated to the OR format you suggested for the other case. Thanks
As is outlined in https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu
I also opened up JuliaCI/julia-buildbot#149 to switch arm builds to mcpu, before realizing I needed to also adjust the Make file here