Issue Details (XML | Word | Printable)

Key: PCC-334
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Jonathan Gray
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

'gcc3' style dependency tracking

Created: 25/Apr/11 04:28 PM   Updated: 06/Aug/12 09:58 AM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

Environment: pcc cvs, OpenBSD/i386 current

 Description  « Hide
The only gcc dependency related options pcc currently implements are -M and -dM. Several things such as gnu cvs and the OpenBSD kernel assume the presence of options such as -MP, -MT, -MF and -MQ. describes these options.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 25/Apr/11 04:36 PM
The pcc cpp is not intended to be called directly, there are just too many things that never gets defined. Instead there should be a sh wrapper provided that handles all cpp specifics and calls pcc -E to emulate cpp. Need to write one though.

Anders Magnusson added a comment - 30/Jul/12 01:30 PM
Now pcc binary is installed as pcpp which calls cpp with all required options.
Added are also the -MP, -MT, -MF and -MQ options.

Jonathan Gray added a comment - 01/Aug/12 05:35 AM
Thanks, would it be possible to add -MD as well (which is also used by the kernel)?

It seems the existing code could use some sanity checking:

(gdb) run -MT
Starting program: /home/jsg/src/pcc/cc/cc/pcc -MT

Program received signal SIGSEGV, Segmentation fault.
strlen (str=0x0) at /usr/src/lib/libc/string/strlen.c:43
43 for (s = str; *s; ++s)
(gdb) bt
#0 strlen (str=0x0) at /usr/src/lib/libc/string/strlen.c:43
#1 0x1c002ffe in main (argc=2, argv=0xcfbead90) at cc.c:732

Anders Magnusson added a comment - 06/Aug/12 09:58 AM
I had to fix the cc driver to fix it, but now at last that is done :-)
Both better sanity checking and -MD is implemented now.