Hi,
I'm tring to update my toolchain to new version but there was a problem. When I tried to compile the project it thrown me some error. I found the following bug:
When I tried to compile the cpp file with a simplified test command with SDCC snapshot build 4.2.12 #13827 (Mac OS X x86_64)
/path_to_sdcc/sdcc -MMD -c -xc ch552_serial1_debug.ino.cpp -o ch552_serial1_debug.ino.cpp.o
I got error
sdcpp: warning: '-x c' after last input file has no effect
cc1: fatal error: ch552_serial1_debug.ino.cpp.d: No such file or directory
compilation terminated.
at 1: warning 190: ISO C forbids an empty source file
subprocess error 256
And the cpp souce file disappears. I believe this is a bug? The file is attached.
Apparently, the "-x c" goes in the wrong place in the synthesized command line for the preprocessor.
It seems required to have the "-xc" although this comment said not needed https://sourceforge.net/p/sdcc/bugs/3489/#ddcf
But the "-xc" triggered the bug.
Last edit: Deqing Sun 2023-01-30
This bug does not seem (directly?) related to -xc or sdcpp.
Add --verbose to see the sdcpp command. Now, cpp (from gcc) takes similar
arguments, except --obj-ext=.rel...
Here's a simplified version of the test cast, starting from cpp, to get the
full picture.
adjusting the invocation a bit i get
Which is looks much closer to what we want. But then
Issue seems to be that -MF is missing in the sdcpp invocation. -MMD does not take arguments (anymore?).
I have fixed this in [r13911].
Related
Commit: [r13911]
Last edit: Maarten Brock 2023-03-22
Appears to be fixed with [r13911]. Please reopen if this is not the case.
Related
Commit: [r13911]