gcc complains that these overloaded uses of pow and max are ambiguous.
Casts were used to for the selection of a specific version of the
overloaded function, but it is unclear whether they are correct or it is a
compiler bug.

file upstream bug to determine correct fix

diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp
index b211ed6..13b6945 100644
--- a/Source/JavaScriptCore/dfg/DFGOperations.cpp
+++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp
@@ -2921,7 +2921,7 @@ JSC_DEFINE_JIT_OPERATION(operationLoadVarargs, void, (JSGlobalObject* globalObje
 
 JSC_DEFINE_JIT_OPERATION(operationFModOnInts, double, (int32_t a, int32_t b))
 {
-    return fmod(a, b);
+    return fmod(float(a), float(b));
 }
 
 #if USE(JSVALUE32_64)
diff --git a/Source/WebCore/rendering/shapes/BoxShape.cpp b/Source/WebCore/rendering/shapes/BoxShape.cpp
index c2e53dd..8f3068b 100644
--- a/Source/WebCore/rendering/shapes/BoxShape.cpp
+++ b/Source/WebCore/rendering/shapes/BoxShape.cpp
@@ -43,7 +43,7 @@ static inline LayoutUnit adjustRadiusForMarginBoxShape(LayoutUnit radius, Layout
 
     LayoutUnit ratio = radius / margin;
     if (ratio < 1)
-        return LayoutUnit(radius + (margin * (1 + pow(ratio - 1, 3.0))));
+        return LayoutUnit(radius + (margin * (1 + pow(static_cast<double>(ratio) - 1, 3.0))));
 
     return radius + margin;
 }
diff --git a/Source/WebCore/rendering/shapes/RasterShape.cpp b/Source/WebCore/rendering/shapes/RasterShape.cpp
index d52092b..10b22e3 100644
--- a/Source/WebCore/rendering/shapes/RasterShape.cpp
+++ b/Source/WebCore/rendering/shapes/RasterShape.cpp
@@ -142,7 +142,7 @@ const RasterShapeIntervals& RasterShape::marginIntervals() const
         return *m_intervals;
 
     int shapeMarginInt = clampToPositiveInteger(ceil(shapeMargin()));
-    int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt(2);
+    int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt(static_cast<float>(2));
     if (!m_marginIntervals)
         m_marginIntervals = m_intervals->computeShapeMarginIntervals(std::min(shapeMarginInt, maxShapeMarginInt));
 
--- a/Source/JavaScriptCore/dfg/DFGStaticExecutionCountEstimationPhase.cpp.orig
+++ b/Source/JavaScriptCore/dfg/DFGStaticExecutionCountEstimationPhase.cpp
@@ -52,7 +52,7 @@
             if (!block)
                 continue;
 
-            block->executionCount = pow(10, m_graph.m_cpsNaturalLoops->loopDepth(block));
+            block->executionCount = powf(10, m_graph.m_cpsNaturalLoops->loopDepth(block));
         }
         
         // Estimate branch weights based on execution counts. This isn't quite correct. It'll