cc1.exe: error: output filename specified twice
See original GitHub issuei am using mbed os 5 for compilation, i am getting this error (cc1.exe: error: output filename specified twice) please some one help.
{
"GCC_ARM": {
"common": ["-c", "-Wall", "-Wextra",
"-Wno-unused-parameter", "-Wno-missing-field-initializers",
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
"-MMD", "-fno-delete-null-pointer-checks",
"-fomit-frame-pointer", "-O3", "-DNDEBUG", "-g1"],
"asm": ["-x", "assembler-with-cpp"],
"c": ["-std=gnu99"],
"cxx": ["-std=gnu++98","-fno-rtti", "-Wvla"],
"ld": ["-Wl,--gc-sections", "-Wl,--wrap,main", "mfpu=fpv4-sp-d16", "-Wl,--wrap,_malloc_r",
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r", "-Wl,--wrap,_memalign_r",
"-Wl,--wrap,_calloc_r", "-Wl,--wrap,exit", "-Wl,--wrap,atexit",
"-Wl,-n"]
}
}
this is my release_O3.json
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
cc1plus error: output filename specified twice - Stack Overflow
The problem is that you have -o0 in your command which specifies your output filename to be 0 which conflicts with -o wf_stack_frame.s...
Read more >cpp.exe: Output filename specified twice - Google Groups
I get the following error when I try to compile code with GCC: cpp.exe: Output filename specified twice
Read more >gcc detect multiple -o passed on one command line
option with an argument is specified twice, and it only makes sense to specify it once, then the option ... cc1: error: output...
Read more >Build failed with cc1plus: error: output filename specified twice
I'm having a strange issue with Xcode. If I make a new project in my usual projects directory (/Users/mainframe/Documents/Work/Term 2, 2005/CSCI ...
Read more >40583 – automatic preprocessing for .F90 or .F95 files fails ...
F95 -mtune=generic -auxbase testf95 -version -fpreprocessed -o /tmp/ccifqF7t.s cc1: error: output filename specified twice ignoring ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@vrushalibhokare I think we’re going about this in a way that is less helpful to both of us:
Please don’t ask me to do your homework. Further, the error you’re seeing is expected and correct behavior. Finally, I don’t know what you’re trying to do (so far you have just said “fix it” with compiler erros). Without context, I can only help you so much.
I understand that asking a good question to help everyone involved is a skill that takes practice. I’m going to try guessing what questions you could ask that are more helpful to both of us. I don’t know how much you know (pro tip: include what you have tried and what information you know in the issue/question description)
Perhaps you meant to ask the question:
That’s a question that I can help you with. The linker is claiming that the object files contained within the archive,
libPDMFilter_CM4_GCC.a
, are compiled to use “VFP register arguments” (more on this in a bit) and that the executable you’re generating,kws_realtime_test.elf
, does not use them. “VFP register arguments” is a C/C++ calling convention term made from:So “VFP register arguments” is referring to how to treat Floating point function call arguments. Specifically using “VFP register arguments” indicates that the VFP’s registers are used for float arguments. Your
libPDMFilter_CM4_GCC.a(pdm_filter.o)
library does this, but the rest of your program was compiled expecting floating point arguments to be passed in the CM4’s registers. These two calling conventions are incompatible, as the code that was generated in saymain.o
expected that it could call functions inpdm_filter.o
and pass float arguments in the CM4’s registers. If this were to link without the error, then the output of this program would be completely arbitrary!You might then follow up with:
That’s part of the
arm-none-eabi-readelf
output, as described in this stack overflow question: https://stackoverflow.com/questions/20555594/how-can-i-know-if-an-arm-library-is-using-hardfpAnd after running that command on your
main.o
you might ask:Looking in the tools that build your binary (specifically here: https://github.com/ARMmbed/mbed-os/blob/master/tools/toolchains/gcc.py#L74-L76), we (Mbed OS) configure the
softfp
floating point ABI.The calling conventoins are discussed in the GCC Arm-specific documentation https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html in the section
-mfloat-abi=name
. Note thatsoftfp
uses hardware floating point. Also note that it is incompatible withhard
.From this point onward, I can’t really help further without knowing the problem you’re trying to solve. Could you explain what problem it is you’re trying to solve, and what you have tried?
@vrushalibhokare General github tip: add
```
before and after code blocks to format them correctly. I edited your comments to use them. After the top```
you can also add a language name to get syntax highlighting for that language. I used```json
to get JSON syntax highlighting in your issue description.