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

examples: probe for -mtune=generic support, fix wrong LoongArch support #322

Merged
merged 1 commit into from
Aug 4, 2021
Merged

Conversation

xen0n
Copy link
Contributor

@xen0n xen0n commented Jun 29, 2021

The commit being fixed is completely pointless, as it was introducing C
preprocessor directives into a Makefile. That aside, there certainly are
some GCC ports that does not have support for -mtune=generic, so probe
for support dynamically instead.

Fixes: f1996f1 ("delete -mtune option on loongarch architecture")

P.S. I came across that PR just by coincidence, I haven't looked at properly testing the library yet. Do exercise caution if you're going to directly merge this; I will try to verify the changes on actual LoongArch hardware in a day or so.

OPT_CFLAGS = -Ofast
#endif
# Add -mtune=generic for GCC if supported.
NO_MTUNE_GENERIC = $(shell $(CXX) -mtune=generic -E - < /dev/null > /dev/null 2>&1; echo $?)
Copy link
Contributor

Choose a reason for hiding this comment

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

modify ‘echo $?’ to ‘echo $$?’

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, nice catch. Fixed.

The commit being fixed is completely pointless, as it was introducing C
preprocessor directives into a Makefile. That aside, there certainly are
some GCC ports that does not have support for `-mtune=generic`, so probe
for support dynamically instead.

Fixes: f1996f1 ("delete -mtune option on loongarch architecture")
@dtschump dtschump merged commit 2d83233 into GreycLab:master Aug 4, 2021
@xen0n xen0n deleted the fix-f1996f1 branch August 4, 2021 11:25
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.

3 participants