Issue Details (XML | Word | Printable)

Key: PCC-390
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Anders Magnusson
Reporter: Roland Mainz
Votes: 1
Watchers: 2
Operations

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

RFE: pcc should have an option to use an alternative "cpp"

Created: 10/Apr/12 07:05 PM   Updated: 01/Sep/12 03:26 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File cpp.sh (0.5 kB)

Environment: any/all


 Description  « Hide
RFE: "pcc" should have an option to use an alternative "cpp" (see http://pcc.ludd.ltu.se/jira/browse/PCC-389 , such an option might be nice-to-have as workaround for such issues).

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 14/Apr/12 10:07 AM
cpp is quite close tied to its compiler, but it would probably be possible to write a sh wrapper for cpp to adapt to another one.
You may look at the -B option to make it search for cpp on alternate places.

Steve Hay added a comment - 24/May/12 08:21 PM
Does anyone have such a sh wrapper to use an alternate cpp? We've hit http://pcc.ludd.ltu.se/jira/browse/PCC-389 and have no workaround.

Iain Hibbert added a comment - 27/May/12 11:52 PM
the attached cpp.sh script would approximately do that, I believe..

Iain Hibbert made changes - 27/May/12 11:52 PM
Field Original Value New Value
Attachment cpp.sh [ 10223 ]
Steve Hay added a comment - 29/May/12 12:16 AM
Iain, how do I use the script with pcc?

Iain Hibbert added a comment - 29/May/12 02:48 PM
replace /usr/libexec/cpp with the script, so when pcc front end calls the 'preprocessor' the script will build a different but equivalent command line for GCC cpp and call that program instead. I did not test it beyond superficially by the way and I expect there will be cases it does not handle correctly but you should be able to see how it works more or less if you want to extend it..

Anders Magnusson made changes - 01/Sep/12 03:22 PM
Assignee Anders Magnusson [ ragge ]
Anders Magnusson added a comment - 01/Sep/12 03:26 PM
Close this issue since it is not in a realistic scope for pcc to have this.
If someone finds out a way and writes a wrapper for another cpp then it may be a viable solution.

Anders Magnusson made changes - 01/Sep/12 03:26 PM
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]