Skip to content

Conversation

q009
Copy link

@q009 q009 commented Jun 17, 2015

Compiling produces the following results:
http://pastebin.com/3R8KJG72
It appears it's related to the latest commit to this file, which adds a few preprocessor directives checking for an FPU. Oddly enough those directives used different syntax (they were prefixed with '#' instead of '.'), and I was suggested on IRC to change it so it complies with the rest.
This is the fix.

@adamgreen
Copy link
Contributor

Another way to fix this problem would be to modify the GCC export scripts to use GCC to build assembly language sources instead of AS. If you specify the -x assembler-with-cpp flags to gcc, it will properly assemble this code after first running it through the C preprocessor. I see that this is used by workspace_tools/toolchains/gcc.py script so that is why the rtos still compiles when using the Python based build system.

Since the Python build system being used by Travis uses GCC for building the asm files, the build fails since the C preprocessor will replace the __FPU_PRESENT identifier in the code with either 0 or 1 before running the assembler. The values 0 and 1 aren't valid identifiers and therefore cause an error.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 17, 2015

@q009 Did you use exported project to get the error you shared?

There's a pull request regarding gcc arm templates, which will be merged soon, once that gets merged, we could fix it.

@adamgreen Good catch with $(AS) $(CPU) -o $@ $< in the templates !

@q009
Copy link
Author

q009 commented Jun 17, 2015

Yes, I just pulled the project with a GCC ARM Embedded Makefile from mbed and it just gives those errors unless I apply a fix.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 17, 2015

@q009 Thanks for the pull request. I'll close this, we should fix it as Adam pointed out - in the makefile templates. We should wait until the gcc template refactoring lands - #1159

@0xc0170 0xc0170 closed this Jun 17, 2015
@q009
Copy link
Author

q009 commented Jun 17, 2015

Awesome! Thanks for the assistance

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