diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-12-15 07:29:42 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2012-12-15 21:17:14 +0100 |
commit | d11bb6da1c909d4961d6337479ca7fc0cd15ca64 (patch) | |
tree | 7a0b6907476836943f141129131b257e099f6acc /package/webkit/webkit-bison-2-6-compat.patch | |
parent | d2d81f4b3420ae004bdcd3b3edf742ac7f10ff7a (diff) | |
download | buildroot-novena-d11bb6da1c909d4961d6337479ca7fc0cd15ca64.tar.gz buildroot-novena-d11bb6da1c909d4961d6337479ca7fc0cd15ca64.zip |
webkit: fix build with bison 2.6
WebKit 1.2.7 does not build with Bison 2.6, but Bison 2.6 is our
host-bison, so if the build machine has bison 2.6, or if by chance it
gets built before webkit, then the build fails with errors such as:
http://autobuild.buildroot.org/results/0b7cfbebd4388cabfa243b5ef74e3b6316fd9fd9/build-end.log
(the real error is not visible due to the overwhelming number of
warnings).
So, we add a patch that modifies WebKit to make it compatible with
Bison 2.6 (patch taken from upstream), and we also add 'host-bison' to
the WebKit dependencies, so that we are sure that a well-known version
of bison is used.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/webkit/webkit-bison-2-6-compat.patch')
-rw-r--r-- | package/webkit/webkit-bison-2-6-compat.patch | 672 |
1 files changed, 672 insertions, 0 deletions
diff --git a/package/webkit/webkit-bison-2-6-compat.patch b/package/webkit/webkit-bison-2-6-compat.patch new file mode 100644 index 000000000..7a94164fe --- /dev/null +++ b/package/webkit/webkit-bison-2-6-compat.patch @@ -0,0 +1,672 @@ +Bison 2.6 compatibility fix + +Taken from upstream at http://trac.webkit.org/changeset/124099, with +minor adaptations. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> + +Index: webkit-1.2.7/WebCore/ChangeLog +=================================================================== +--- webkit-1.2.7.orig/WebCore/ChangeLog 2010-12-28 13:27:37.000000000 +0100 ++++ webkit-1.2.7/WebCore/ChangeLog 2012-12-15 15:48:40.000000000 +0100 +@@ -1,3 +1,28 @@ ++2012-07-30 Alexis Menard <alexis.menard@openbossa.org> ++ ++ Build fix with newer bison 2.6. ++ https://bugs.webkit.org/show_bug.cgi?id=92264 ++ ++ Reviewed by Adam Barth. ++ ++ As stated in http://www.gnu.org/software/bison/manual/html_node/Table-of-Symbols.html ++ YYLEX_PARAM and YYPARSE_PARAM are depecreated since version 1.875. So far all Mac OS ++ version I had access to as well as recent Linux runs at least version 2.3 so it's safe ++ to use the replacement of these deprecated macros in favor of %lex-param and %parse-param. ++ As announced http://lists.gnu.org/archive/html/info-gnu/2012-07/msg00011.html with the release ++ of version 2.6 YYLEX_PARAM and YYPARSE_PARAM are not supported anymore. ++ ++ No new tests : build fix and the patch should not trigger any regressions ++ ++ * css/CSSGrammar.y: ++ * css/CSSParser.cpp: ++ * xml/XPathGrammar.y: Refactored a bit to not use an intermediate PARSER define. ++ * xml/XPathParser.cpp: bison 2.6 declare xpathyyparse in the .h file now, i.e. XPathGrammar.h ++ therefore including this file within the namespace {} declarations leads to xpathyyparse being ++ defined part of WebCore::XPath namespaces but the actual implementation of xpathyyparse is in XPathGrammar.cpp ++ (generated) and not implemented within the WebCore::XPath so it lead to linking issues. Last, XPathGrammar.h needs ++ to be included after the other includes as it uses some XPath types. It breaks the style but CSSParser.cpp is doing the same. ++ + 2010-06-21 Philippe Normand <pnormand@igalia.com> + + Reviewed by Xan Lopez. +Index: webkit-1.2.7/WebCore/css/CSSParser.cpp +=================================================================== +--- webkit-1.2.7.orig/WebCore/css/CSSParser.cpp 2010-12-28 13:24:33.000000000 +0100 ++++ webkit-1.2.7/WebCore/css/CSSParser.cpp 2012-12-15 17:29:57.000000000 +0100 +@@ -81,7 +81,7 @@ + extern int cssyydebug; + #endif + +-extern int cssyyparse(void* parser); ++extern int cssyyparse(WebCore::CSSParser*); + + using namespace std; + using namespace WTF; +@@ -226,7 +226,7 @@ + m_defaultNamespace = starAtom; // Reset the default namespace. + + setupParser("", string, ""); +- cssyyparse(this); ++ ::cssyyparse(this); + m_rule = 0; + } + +@@ -235,7 +235,7 @@ + m_styleSheet = sheet; + m_allowNamespaceDeclarations = false; + setupParser("@-webkit-rule{", string, "} "); +- cssyyparse(this); ++ ::cssyyparse(this); + return m_rule.release(); + } + +@@ -243,7 +243,7 @@ + { + m_styleSheet = sheet; + setupParser("@-webkit-keyframe-rule{ ", string, "} "); +- cssyyparse(this); ++ ::cssyyparse(this); + return m_keyframe.release(); + } + +@@ -257,7 +257,7 @@ + m_id = id; + m_important = important; + +- cssyyparse(this); ++ ::cssyyparse(this); + + m_rule = 0; + +@@ -304,7 +304,7 @@ + m_styleSheet = static_cast<CSSStyleSheet*>(declaration->stylesheet()); + + setupParser("@-webkit-decls{color:", string, "} "); +- cssyyparse(this); ++ ::cssyyparse(this); + m_rule = 0; + + return (m_numParsedProperties && m_parsedProperties[0]->m_id == CSSPropertyColor); +@@ -319,7 +319,7 @@ + + setupParser("@-webkit-selector{", string, "}"); + +- cssyyparse(this); ++ ::cssyyparse(this); + + m_selectorListForParseSelector = 0; + } +@@ -330,7 +330,7 @@ + m_styleSheet = static_cast<CSSStyleSheet*>(declaration->stylesheet()); + + setupParser("@-webkit-decls{", string, "} "); +- cssyyparse(this); ++ ::cssyyparse(this); + m_rule = 0; + + bool ok = false; +@@ -354,7 +354,7 @@ + // can't use { because tokenizer state switches from mediaquery to initial state when it sees { token. + // instead insert one " " (which is WHITESPACE in CSSGrammar.y) + setupParser("@-webkit-mediaquery ", string, "} "); +- cssyyparse(this); ++ ::cssyyparse(this); + + bool ok = false; + if (m_mediaQuery) { +@@ -5191,7 +5191,7 @@ + nameValuePair += variableValue; + + setupParser("@-webkit-variables-decls{", nameValuePair, "} "); +- cssyyparse(this); ++ ::cssyyparse(this); + m_rule = 0; + + bool ok = false; +Index: webkit-1.2.7/WebCore/css/CSSGrammar.y +=================================================================== +--- webkit-1.2.7.orig/WebCore/css/CSSGrammar.y 2010-09-10 15:20:33.000000000 +0200 ++++ webkit-1.2.7/WebCore/css/CSSGrammar.y 2012-12-15 15:48:40.000000000 +0100 +@@ -51,14 +51,13 @@ + #define YYMAXDEPTH 10000 + #define YYDEBUG 0 + +-// FIXME: Replace with %parse-param { CSSParser* parser } once we can depend on bison 2.x +-#define YYPARSE_PARAM parser +-#define YYLEX_PARAM parser +- + %} + + %pure_parser + ++%parse-param { CSSParser* parser } ++%lex-param { CSSParser* parser } ++ + %union { + bool boolean; + char character; +@@ -85,7 +84,7 @@ + + %{ + +-static inline int cssyyerror(const char*) ++static inline int cssyyerror(void*, const char*) + { + return 1; + } +Index: webkit-1.2.7/WebCore/xml/XPathParser.cpp +=================================================================== +--- webkit-1.2.7.orig/WebCore/xml/XPathParser.cpp 2010-09-10 15:20:33.000000000 +0200 ++++ webkit-1.2.7/WebCore/xml/XPathParser.cpp 2012-12-15 15:56:37.000000000 +0100 +@@ -35,20 +35,18 @@ + #include "XPathEvaluator.h" + #include "XPathException.h" + #include "XPathNSResolver.h" ++#include "XPathPath.h" + #include "XPathStep.h" + #include <wtf/StdLibExtras.h> + +-int xpathyyparse(void*); +- ++using namespace WebCore; + using namespace WTF; + using namespace Unicode; + +-namespace WebCore { +-namespace XPath { +- +-class LocationPath; ++using namespace XPath; + +-#include "XPathGrammar.h" ++extern int xpathyyparse(WebCore::XPath::Parser*); ++#include "XPathGrammar.h" + + Parser* Parser::currentParser = 0; + +@@ -630,7 +628,5 @@ + delete t; + } + +-} +-} + + #endif // ENABLE(XPATH) +Index: webkit-1.2.7/WebCore/xml/XPathGrammar.y +=================================================================== +--- webkit-1.2.7.orig/WebCore/xml/XPathGrammar.y 2010-02-05 17:26:58.000000000 +0100 ++++ webkit-1.2.7/WebCore/xml/XPathGrammar.y 2012-12-15 15:48:40.000000000 +0100 +@@ -36,6 +36,7 @@ + #include "XPathParser.h" + #include "XPathPath.h" + #include "XPathPredicate.h" ++#include "XPathStep.h" + #include "XPathVariableReference.h" + #include <wtf/FastMalloc.h> + +@@ -46,8 +47,6 @@ + #define YYLTYPE_IS_TRIVIAL 1 + #define YYDEBUG 0 + #define YYMAXDEPTH 10000 +-#define YYPARSE_PARAM parserParameter +-#define PARSER static_cast<Parser*>(parserParameter) + + using namespace WebCore; + using namespace XPath; +@@ -55,6 +54,7 @@ + %} + + %pure_parser ++%parse-param { WebCore::XPath::Parser* parser } + + %union + { +@@ -73,7 +73,7 @@ + %{ + + static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval); } +-static void xpathyyerror(const char*) { } ++static void xpathyyerror(void*, const char*) { } + + %} + +@@ -120,7 +120,7 @@ + Expr: + OrExpr + { +- PARSER->m_topExpr = $1; ++ parser->m_topExpr = $1; + } + ; + +@@ -140,7 +140,7 @@ + '/' + { + $$ = new LocationPath; +- PARSER->registerParseNode($$); ++ parser->registerParseNode($$); + } + | + '/' RelativeLocationPath +@@ -152,7 +152,7 @@ + { + $$ = $2; + $$->insertFirstStep($1); +- PARSER->unregisterParseNode($1); ++ parser->unregisterParseNode($1); + } + ; + +@@ -161,22 +161,22 @@ + { + $$ = new LocationPath; + $$->appendStep($1); +- PARSER->unregisterParseNode($1); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->registerParseNode($$); + } + | + RelativeLocationPath '/' Step + { + $$->appendStep($3); +- PARSER->unregisterParseNode($3); ++ parser->unregisterParseNode($3); + } + | + RelativeLocationPath DescendantOrSelf Step + { + $$->appendStep($2); + $$->appendStep($3); +- PARSER->unregisterParseNode($2); +- PARSER->unregisterParseNode($3); ++ parser->unregisterParseNode($2); ++ parser->unregisterParseNode($3); + } + ; + +@@ -185,58 +185,58 @@ + { + if ($2) { + $$ = new Step(Step::ChildAxis, *$1, *$2); +- PARSER->deletePredicateVector($2); ++ parser->deletePredicateVector($2); + } else + $$ = new Step(Step::ChildAxis, *$1); +- PARSER->deleteNodeTest($1); +- PARSER->registerParseNode($$); ++ parser->deleteNodeTest($1); ++ parser->registerParseNode($$); + } + | + NAMETEST OptionalPredicateList + { + String localName; + String namespaceURI; +- if (!PARSER->expandQName(*$1, localName, namespaceURI)) { +- PARSER->m_gotNamespaceError = true; ++ if (!parser->expandQName(*$1, localName, namespaceURI)) { ++ parser->m_gotNamespaceError = true; + YYABORT; + } + + if ($2) { + $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$2); +- PARSER->deletePredicateVector($2); ++ parser->deletePredicateVector($2); + } else + $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI)); +- PARSER->deleteString($1); +- PARSER->registerParseNode($$); ++ parser->deleteString($1); ++ parser->registerParseNode($$); + } + | + AxisSpecifier NodeTest OptionalPredicateList + { + if ($3) { + $$ = new Step($1, *$2, *$3); +- PARSER->deletePredicateVector($3); ++ parser->deletePredicateVector($3); + } else + $$ = new Step($1, *$2); +- PARSER->deleteNodeTest($2); +- PARSER->registerParseNode($$); ++ parser->deleteNodeTest($2); ++ parser->registerParseNode($$); + } + | + AxisSpecifier NAMETEST OptionalPredicateList + { + String localName; + String namespaceURI; +- if (!PARSER->expandQName(*$2, localName, namespaceURI)) { +- PARSER->m_gotNamespaceError = true; ++ if (!parser->expandQName(*$2, localName, namespaceURI)) { ++ parser->m_gotNamespaceError = true; + YYABORT; + } + + if ($3) { + $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$3); +- PARSER->deletePredicateVector($3); ++ parser->deletePredicateVector($3); + } else + $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI)); +- PARSER->deleteString($2); +- PARSER->registerParseNode($$); ++ parser->deleteString($2); ++ parser->registerParseNode($$); + } + | + AbbreviatedStep +@@ -261,23 +261,23 @@ + else if (*$1 == "comment") + $$ = new Step::NodeTest(Step::NodeTest::CommentNodeTest); + +- PARSER->deleteString($1); +- PARSER->registerNodeTest($$); ++ parser->deleteString($1); ++ parser->registerNodeTest($$); + } + | + PI '(' ')' + { + $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest); +- PARSER->deleteString($1); +- PARSER->registerNodeTest($$); ++ parser->deleteString($1); ++ parser->registerNodeTest($$); + } + | + PI '(' LITERAL ')' + { + $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, $3->stripWhiteSpace()); +- PARSER->deleteString($1); +- PARSER->deleteString($3); +- PARSER->registerNodeTest($$); ++ parser->deleteString($1); ++ parser->deleteString($3); ++ parser->registerNodeTest($$); + } + ; + +@@ -295,14 +295,14 @@ + { + $$ = new Vector<Predicate*>; + $$->append(new Predicate($1)); +- PARSER->unregisterParseNode($1); +- PARSER->registerPredicateVector($$); ++ parser->unregisterParseNode($1); ++ parser->registerPredicateVector($$); + } + | + PredicateList Predicate + { + $$->append(new Predicate($2)); +- PARSER->unregisterParseNode($2); ++ parser->unregisterParseNode($2); + } + ; + +@@ -317,7 +317,7 @@ + SLASHSLASH + { + $$ = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); +- PARSER->registerParseNode($$); ++ parser->registerParseNode($$); + } + ; + +@@ -325,13 +325,13 @@ + '.' + { + $$ = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); +- PARSER->registerParseNode($$); ++ parser->registerParseNode($$); + } + | + DOTDOT + { + $$ = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); +- PARSER->registerParseNode($$); ++ parser->registerParseNode($$); + } + ; + +@@ -339,8 +339,8 @@ + VARIABLEREFERENCE + { + $$ = new VariableReference(*$1); +- PARSER->deleteString($1); +- PARSER->registerParseNode($$); ++ parser->deleteString($1); ++ parser->registerParseNode($$); + } + | + '(' Expr ')' +@@ -351,15 +351,15 @@ + LITERAL + { + $$ = new StringExpression(*$1); +- PARSER->deleteString($1); +- PARSER->registerParseNode($$); ++ parser->deleteString($1); ++ parser->registerParseNode($$); + } + | + NUMBER + { + $$ = new Number($1->toDouble()); +- PARSER->deleteString($1); +- PARSER->registerParseNode($$); ++ parser->deleteString($1); ++ parser->registerParseNode($$); + } + | + FunctionCall +@@ -371,8 +371,8 @@ + $$ = createFunction(*$1); + if (!$$) + YYABORT; +- PARSER->deleteString($1); +- PARSER->registerParseNode($$); ++ parser->deleteString($1); ++ parser->registerParseNode($$); + } + | + FUNCTIONNAME '(' ArgumentList ')' +@@ -380,9 +380,9 @@ + $$ = createFunction(*$1, *$3); + if (!$$) + YYABORT; +- PARSER->deleteString($1); +- PARSER->deleteExpressionVector($3); +- PARSER->registerParseNode($$); ++ parser->deleteString($1); ++ parser->deleteExpressionVector($3); ++ parser->registerParseNode($$); + } + ; + +@@ -391,14 +391,14 @@ + { + $$ = new Vector<Expression*>; + $$->append($1); +- PARSER->unregisterParseNode($1); +- PARSER->registerExpressionVector($$); ++ parser->unregisterParseNode($1); ++ parser->registerExpressionVector($$); + } + | + ArgumentList ',' Argument + { + $$->append($3); +- PARSER->unregisterParseNode($3); ++ parser->unregisterParseNode($3); + } + ; + +@@ -414,9 +414,9 @@ + $$ = new Union; + $$->addSubExpression($1); + $$->addSubExpression($3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + ; + +@@ -432,9 +432,9 @@ + { + $3->setAbsolute(true); + $$ = new Path(static_cast<Filter*>($1), $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + | + FilterExpr DescendantOrSelf RelativeLocationPath +@@ -442,10 +442,10 @@ + $3->insertFirstStep($2); + $3->setAbsolute(true); + $$ = new Path(static_cast<Filter*>($1), $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($2); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($2); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + ; + +@@ -455,9 +455,9 @@ + PrimaryExpr PredicateList + { + $$ = new Filter($1, *$2); +- PARSER->unregisterParseNode($1); +- PARSER->deletePredicateVector($2); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->deletePredicateVector($2); ++ parser->registerParseNode($$); + } + ; + +@@ -467,9 +467,9 @@ + OrExpr OR AndExpr + { + $$ = new LogicalOp(LogicalOp::OP_Or, $1, $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + ; + +@@ -479,9 +479,9 @@ + AndExpr AND EqualityExpr + { + $$ = new LogicalOp(LogicalOp::OP_And, $1, $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + ; + +@@ -491,9 +491,9 @@ + EqualityExpr EQOP RelationalExpr + { + $$ = new EqTestOp($2, $1, $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + ; + +@@ -503,9 +503,9 @@ + RelationalExpr RELOP AdditiveExpr + { + $$ = new EqTestOp($2, $1, $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + ; + +@@ -515,17 +515,17 @@ + AdditiveExpr PLUS MultiplicativeExpr + { + $$ = new NumericOp(NumericOp::OP_Add, $1, $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + | + AdditiveExpr MINUS MultiplicativeExpr + { + $$ = new NumericOp(NumericOp::OP_Sub, $1, $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + ; + +@@ -535,9 +535,9 @@ + MultiplicativeExpr MULOP UnaryExpr + { + $$ = new NumericOp($2, $1, $3); +- PARSER->unregisterParseNode($1); +- PARSER->unregisterParseNode($3); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($1); ++ parser->unregisterParseNode($3); ++ parser->registerParseNode($$); + } + ; + +@@ -548,8 +548,8 @@ + { + $$ = new Negative; + $$->addSubExpression($2); +- PARSER->unregisterParseNode($2); +- PARSER->registerParseNode($$); ++ parser->unregisterParseNode($2); ++ parser->registerParseNode($$); + } + ; + |