<< Back to previous view

[PCC-390] RFE: pcc should have an option to use an alternative "cpp" Created: 10/Apr/12  Updated: 01/Sep/12

Status: Closed
Project: pcc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Roland Mainz Assignee: Anders Magnusson
Resolution: Fixed Votes: 1
Environment: any/all

File Attachments: File cpp.sh    

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).

Comment by Anders Magnusson [ 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.
Comment by Steve Hay [ 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.
Comment by Iain Hibbert [ 27/May/12 11:52 PM ]
the attached cpp.sh script would approximately do that, I believe..
Comment by Steve Hay [ 29/May/12 12:16 AM ]
Iain, how do I use the script with pcc?
Comment by Iain Hibbert [ 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..
Comment by Anders Magnusson [ 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.
Generated at Mon Apr 23 03:52:01 CEST 2018 using JIRA Enterprise Edition, Version: 3.13.1-#333.