Bug 20105 - The preprocessor is assumed not detected for IDL parsing
Summary: The preprocessor is assumed not detected for IDL parsing
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Trivial
Assignee: Nobody
URL: http://pastebin.org/52538
Depends on:
Reported: 2008-07-18 19:23 PDT by Connor Behan
Modified: 2014-03-25 15:27 PDT (History)
2 users (show)

See Also:

Fix (4.26 KB, patch)
2008-07-18 19:25 PDT, Connor Behan
no flags Details | Formatted Diff | Diff
Better fix (4.35 KB, patch)
2008-07-18 21:04 PDT, Connor Behan
mrowe: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]

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.