From: SourceForge.net <no...@so...> - 2008-11-06 17:22:45
|
Bugs item #2224960, was opened at 2008-11-05 12:18 Message generated for change (Comment added) made by borutr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=2224960&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: C-Front End >Group: fixed >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Steven Borley (sjborley) >Assigned to: Borut Ražem (borutr) Summary: sdcc -MM no working correctly Initial Comment: I use something like the following to generate dependency files when building sdcc -MM foo.c but I have found that -MM is not excluding system headers, and works the like -M. $ ~/sdcc/bin/sdcc -MM foo.c foo.rel: foo.c /home/steven/sdcc/bin/../share/sdcc/include/stdio.h \ /home/steven/sdcc/bin/../share/sdcc/include/stdarg.h \ /home/steven/sdcc/bin/../share/sdcc/include/sdcc-lib.h \ /home/steven/sdcc/bin/../share/sdcc/include/asm/mcs51/features.h foo.h This could be a problem with how sdcc passes options intended for the preprocessor to sdcpp as I've found that the following works... sdcpp -MM foo.c $ ~/sdcc/bin/sdcpp -MM foo.c foo.rel: foo.c foo.h This provides a workround in many cases, but the expectation is that sdcc should pass -MM to the preprocessor (like gcc does). Hence I'm calling this as a bug rather than a feature request. All the above with snapshot #5253 on Linux. ---------------------------------------------------------------------- >Comment By: Borut Ražem (borutr) Date: 2008-11-06 18:22 Message: Fixed in svn revision #5257. Borut ---------------------------------------------------------------------- Comment By: Steven Borley (sjborley) Date: 2008-11-05 12:42 Message: Just after posing I noticed another symptom while trying to implement a workround. It seems that passing an include path to the system files to sdcpp we get the same problem sdcpp -DC8051F305 -I/home/steven/sdcc/share/sdcc/include -MM foo.c foo.rel: foo.c /home/steven/sdcc/share/sdcc/include/stdio.h \ /home/steven/sdcc/share/sdcc/include/stdarg.h \ /home/steven/sdcc/share/sdcc/include/sdcc-lib.h \ /home/steven/sdcc/share/sdcc/include/asm/default/features.h foo.h I'm now in the belief that this is a sdcpp bug (rather than how sdcc passes options to sdcpp). According to the manual: "-MM Like ‘-M’ but the output mentions only the user header files included with ‘#include “file"’. System header files included with ‘#include <file>’ are omitted." Thus my #include <stdio.h> in foo.c should be ignore regardless of whether it's found on the include path or not. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=2224960&group_id=599 |