Camino 1.6, based on the 1.8 branch, may change the compiler used for the ppc portion of the build from gcc 3.3 to gcc 4.0. (It would continue to use the 10.3.9 SDK and would support 10.3.9 as a minimum on PowerPC instead of the current 10.3.0 permitted with gcc 3.3.) During a test build to determine feasability, while compiling mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: In member function ‘virtual nsresult nsCanvasRenderingContext2D::Render(nsIRenderingContext*)’: /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:1026: error: invalid conversion from ‘int’ to ‘CGImageAlphaInfo’ /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:1026: error: initializing argument 7 of ‘CGImage* CGImageCreate(size_t, size_t, size_t, size_t, size_t, CGColorSpace*, CGImageAlphaInfo, CGDataProvider*, const float*, bool, CGColorRenderingIntent)’ /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:908: warning: unused variable ‘dest’ /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:909: warning: unused variable ‘dest_cr’ /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: At global scope: /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:198: warning: ‘PRBool FloatValidate(double, double, double)’ defined but not used make: *** [nsCanvasRenderingContext2D.o] Error 1 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40/content/canvas/src' make: *** [libs] Error 2 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40/content/canvas' make: *** [libs] Error 2 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40/content' make: *** [tier_9] Error 2 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40' make: *** [alldep] Error 2 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40' make: *** [alldep] Error 2 make: Leaving directory `/lizard/1.8/mozilla' The code causing the error: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp&rev=18.104.22.168&mark=155-164,1024-1026#1020 The problem is that during the ppc build as opposed to the x86 build, CG_BITMAP_BYTE_ORDER_FLAG is not of type CGImageAlphaInfo (an enum), but is instead 0: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp&rev=22.214.171.124&mark=155-164,1024-1026#155 gcc 3.3 is satisfied with this, but gcc 4.0 treats it as an error. A cast should be introduced to ensure that this is buildable with gcc 4.0. This appears the be the only change necessary to make the current 1.8 branch build for ppc with gcc 4.0, and it's completely safe as it's a simple cast that doesn't even involve a conversion.
Created attachment 294568 [details] [diff] [review] Cast to CGImageAlphaInfo
Gah, I hate moving.
Comment on attachment 294568 [details] [diff] [review] Cast to CGImageAlphaInfo I think vlad should review this -- this isn't my code.
Smokey, I've got something to alleviate the stripping pains.
Comment on attachment 294568 [details] [diff] [review] Cast to CGImageAlphaInfo No risk, just a cast, fixes compiler errors in the ppc build when using gcc 4, which we're evaluating for Camino 1.6 based on this branch.
Comment on attachment 294568 [details] [diff] [review] Cast to CGImageAlphaInfo Approved for the 126.96.36.199; a=ss for release drivers. Please land on the branch as soon as possible.
Checked in on the MOZILLA_1_8_BRANCH.
Verified in source using LXR.