Skip to content

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

Merged
kaspar030 merged 1 commit intoRIOT-OS:masterfrom
jnohlgard:pr/ccas
Mar 24, 2017
Merged

make: Add support for specifying a different compiler for assembler#6672
kaspar030 merged 1 commit intoRIOT-OS:masterfrom
jnohlgard:pr/ccas

Conversation

@jnohlgard
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Couldn't we just use gcc as AS?

@jnohlgard
Copy link
Copy Markdown
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
Copy Markdown
Member Author

Ping @kaspar030

@kaspar030
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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