Bug 20105

Summary: The preprocessor is assumed not detected for IDL parsing
Product: WebKit Reporter: Connor Behan <connor.behan>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Trivial CC: jmalonzo, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://pastebin.org/52538
Attachments:
Description Flags
Fix
none
Better fix mrowe: review-

Description Connor Behan 2008-07-18 19:23:14 PDT
The --preprocessor $(CPP) variable should get passed to certain perl scripts on platforms where gcc is not in /usr/bin. This just fixes WebCore/GNUmakefile.am so it does that.
Comment 1 Connor Behan 2008-07-18 19:25:06 PDT
Created attachment 22379 [details]
Fix

Choose whatever license you want. BSD and LGPL are both fine with me.
Comment 2 Connor Behan 2008-07-18 21:04:28 PDT
Created attachment 22381 [details]
Better fix

Actually this one is better. Autotools don't append enough flags to $(CPP).
Comment 3 Mark Rowe (bdash) 2008-07-18 23:16:09 PDT
That patch assumes that CPP is gcc and thus accepts "-P -x c++".  I don't think that is necessarily a valid assumption.
Comment 4 Connor Behan 2008-07-19 08:46:56 PDT
Well without the patch, the preprocessor will always be "/usr/bin/gcc -E -P -x c++" which only works if gcc is in /usr/bin, so it can never work on windows for instance. Autotools is supposed to detect the preprocessor and store it in $CPP so it would be great if the patch could just use --preprocessor $(CPP). But I think autotools detecs the C preprocessor not the C++ one, so extra flags need to be added. Fixing the bug as to what preprocessor is detected would be the best solution but I have no idea how to do that.
Comment 5 Mark Rowe (bdash) 2008-07-19 21:37:38 PDT
Copying Jan Michael Alonzo on this as he's done a bunch of work on the autotools support of the GTK port.  Jan, any ideas how we can have autoconf detect what we need here?
Comment 6 Jan Alonzo 2008-07-21 07:22:13 PDT
You should use CXXCPP for the C++ preprocessor. The problem is I still have to pass "-P -x c++" to get it to compile properly. I'm not sure what to do here though. Either we detect gcc in the Makefiles and pass the required flags or do it in make_names.pl. What do you think?
Comment 7 Martin Robinson 2014-03-25 15:27:47 PDT
The patch is long invalid. Please create a new bug with a patch against the CMake build if this is still an issue.