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 ARCH_FLAG before compiler/linker flag checks #4457

Closed
wants to merge 1 commit into from

Conversation

xiphon
Copy link
Contributor

@xiphon xiphon commented Sep 27, 2018

There are some architecture-dependent compiler flags. We have to set ARCH_FLAG before we do any flag checks, e.g., GCC doesn't support fcf_protection for x86 targets.

Cross-compilation output (gcc 8.2.0) without the fix:

-- Building on x86_64 for i686
-- Performing Test _fcf_protection=full_c
-- Performing Test _fcf_protection=full_c - Success
-- Performing Test _fcf_protection=full_cxx
-- Performing Test _fcf_protection=full_cxx - Success

...

cc1plus: error: ‘-fcf-protection=full’ is not supported for this target

Copy link
Contributor

@fluffypony fluffypony left a comment

Choose a reason for hiding this comment

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

Reviewed

fluffypony added a commit that referenced this pull request Sep 29, 2018
85318e7 build: set ARCH_FLAG before compiler/linker flag checks (xiphon)
fluffypony added a commit that referenced this pull request Sep 29, 2018
85318e7 build: set ARCH_FLAG before compiler/linker flag checks (xiphon)
@fluffypony fluffypony closed this Sep 30, 2018
@xiphon xiphon deleted the fix-compiler-flags-arch branch October 4, 2018 00:05
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.

4 participants