-MT appears to be incorrect for header file dependency generation? [message #1071955] |
Sun, 21 July 2013 14:04  |
Eclipse User |
|
|
|
Hello,
I'm fairly new to Eclipse/CDT so there's likely something stupid I'm missing here But, the issue I was trying to track down was why CDT (in a managed external build) would not recompile source files based on header file dependencies.
Looking through the makefiles I see that the .d files are being generated and included. However, the target within each .d file is the .d file itself rather than the .o file. So, on a header file update make will want to rebuild the .d file (for which there is no rule) rather than the .o file...
If I manually edit the .d file to set the target as a .o and run make from the command line then make will correctly rebuild the object file.
It appears the .d dependency is being explicitly set with a -MT option to the compiler. Is there a way I can change this? Or is something else going on that I'm missing?
I'm using Eclipse Juno with the latest CDT (just updated).
Thanks for any help!
Shannon
[Updated on: Mon, 22 July 2013 00:43] by Moderator
|
|
|
|
Re: -MT appears to be incorrect for header file dependency generation? [message #1077694 is a reply to message #1072848] |
Thu, 01 August 2013 22:53  |
Eclipse User |
|
|
|
Interesting. I haven't fully tracked down the .d rule in the Makefile, but the actual gcc command I'm getting to rebuild a .d file is along the lines of:
arm-none-eabi-gcc -O0 -Wall -Wa,-adhlns="stubs.o.lst" -c -fmessage-length=0 -MMD -MP -MF"app_stubs.d" -MT"stubs.d" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "stubs.o" "/Users/holland/Source/stubs.c"
As far as I understand the -MT option this will make stubs.d the dependency target in the .d files, not the actual .o... (This is consistent with what I'm getting in the .d file itself).
I'll poke around more at the overall makefile structure/
|
|
|
Powered by
FUDForum. Page generated in 0.04428 seconds