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

make: Add support for specifying a different compiler for assembler #6672

Merged
merged 1 commit into from
Mar 24, 2017

Conversation

jnohlgard
Copy link
Member

This will allow us to specify a separate compiler for assembly sources which are compiled with GCC (not AS). Clang has a problem with some of the assembly headers in the MIPS port and using GCC for the asm sources instead will allow Clang to build all of the C code. PR on the MIPS part is coming.

@jnohlgard jnohlgard added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system labels Mar 1, 2017
@jnohlgard jnohlgard added this to the Release 2017.04 milestone Mar 1, 2017
@jnohlgard jnohlgard added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 1, 2017
@kaspar030
Copy link
Contributor

Couldn't we just use gcc as AS?

@jnohlgard
Copy link
Member Author

I did not try to change any behaviour, just allow us to specify a separate compiler for assembler sources being built with gcc (*.S). There are assembly sources built using as too, these are named *.s, lowercase s.

@jnohlgard
Copy link
Member Author

Ping @kaspar030

@kaspar030
Copy link
Contributor

I did not try to change any behaviour, just allow us to specify a separate compiler for assembler sources being built with gcc (*.S). There are assembly sources built using as too, these are named *.s, lowercase s.

Just so I understand, there are some assembly files in the MIPS code that clang doesn't like, but gcc compiles fine?

Can we get rid of ASSMSRC vs ASMSRC? gcc invokes gnu as, clang invokes the llvm assembler. Both run the preprocessor on *.S, not on *.s.
Maybe we can get away with just one rule for both *.s and *.S, and use "gcc" for gnu, "clang" for llvm, and in the special mips case, use "gcc" even for llvm as selected toolchain.

@jnohlgard
Copy link
Member Author

Just so I understand, there are some assembly files in the MIPS code that clang doesn't like, but gcc compiles fine?

Correct

Can we get rid of ASSMSRC vs ASMSRC? ...

Yes, let's do that.

@jnohlgard
Copy link
Member Author

But could we merge this in the meantime while we work on that change?

Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

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

ACK.

@kaspar030 kaspar030 merged commit 4dc2028 into RIOT-OS:master Mar 24, 2017
@jnohlgard jnohlgard deleted the pr/ccas branch March 24, 2017 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants