ARMmbed / target-mbed-gcc

DEPRECATED Base for mbed yotta compilation targets compiling with GCC
Apache License 2.0
6 stars 12 forks source link

Add support for inline assembly in C files. #11

Closed bremoran closed 9 years ago

bremoran commented 9 years ago

Add the -fasm flag to the C family command line. Fixes #10

bremoran commented 9 years ago

@bogdanm

kjbracey commented 9 years ago

-std=c99 seems weird, or at least ambitious, in the first place - it's deactivating a lot of normally-enabled GCC extensions, and lots of code struggles to compile in that environment.

Are you sure you wouldn't rather just use "-std=gnu99"?

bogdanm commented 9 years ago

Deactivating GCC extensions is a good thing, since we want our code to compile with other compilers too.

0xc0170 commented 9 years ago

Most of the compilers have support for __asm, an example: cmsis headers: https://github.com/ARMmbed/cmsis-core/blob/master/cmsis-core/core_cm0.h#L79. Our compiler-polyfill does not include asm at the moment.

autopulated commented 9 years ago

Sorry just noticed this – what does this enable, just raw asm use? You can anyway use the __asm__ keyword, which I believe is what we do.

autopulated commented 9 years ago

bump @bremoran

bremoran commented 9 years ago

I had a specific use-case that this was blocking and I was able to fix it using a custom cmake instead. I think that is the correct solution.