Closed Bug 576764 Opened 14 years ago Closed 14 years ago

incorrect #define for PowerPC in mozilla-central/gfx/ycbcr/chromium_types.h

Categories

(Core :: Audio/Video, defect)

PowerPC
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: nsoudee, Unassigned)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; Linux ppc; en-US; rv:2.0b2pre) Gecko/20100703
Build Identifier: Mozilla/5.0 (X11; Linux ppc; en-US; rv:2.0b2pre) Gecko/20100703

I'm running Debian testing on an iBook G4, and I build my own minefield on a regular basis so that sound works. For the past few weeks I have been unable to compile it and figured someone would eventually fix the problem. Since today is a long weekend I decided to actually try diagnosing the problem and figured out what's wrong: The #define being checked against for PowerPC does not match up the one for my GCC (gcc (Debian 4.4.4-5) 4.4.4). The file mozilla-central/gfx/ycbcr/chromium_types.h currently checks against "__ppc__" but my GCC has "__PPC__" (uppercase), "__PPC", "__ARCH_PPC" and "__powerpc". I have changed the "__ppc__" to "__powerpc" and everything built fine.

Reproducible: Always

Steps to Reproduce:
1. Try to build firefox
2. Get error about platform not being in chromium_types.h
3. Sad face
Actual Results:  
Build error

Expected Results:  
Build Success

Used "__PPC__" or "__powerpc" as the #define variable instead of, or complementary with, "__ppc__".
I suspect this code probably only cares about OS X/PPC, not Linux/PPC.
Component: Build Config → IPC
Product: Firefox → Core
QA Contact: build.config → ipc
Version: unspecified → Trunk
Status: UNCONFIRMED → NEW
Component: IPC → Video/Audio
Ever confirmed: true
QA Contact: ipc → video.audio
Oops, I saw chromium_types and missed the rest of the path. :)
(In reply to comment #0)

> The file
> mozilla-central/gfx/ycbcr/chromium_types.h 
> currently checks against "__ppc__" but my GCC has "__PPC__" (uppercase),
> "__PPC", "__ARCH_PPC" and "__powerpc". I have changed the "__ppc__" 
> to "__powerpc" and everything built fine.

Here's the patch to fix that chromium_types.h header file:

--- ./gfx/ycbcr/chromium_types.h	2010-10-09 13:40:21.563086014 +0200
+++ ./gfx/ycbcr/chromium_types.h	2010-10-09 13:39:27.832088583 +0200
@@ -60,7 +60,7 @@
 #define ARCH_CPU_ARM_FAMILY 1
 #define ARCH_CPU_ARMEL 1
 #define ARCH_CPU_32_BITS 1
-#elif defined(__ppc__)
+#elif defined(__powerpc) || defined(__PPC__) || defined(__ppc__)
 #define ARCH_CPU_PPC_FAMILY 1
 #define ARCH_CPU_PPC 1
 #define ARCH_CPU_32_BITS 1

(It can be applied via 'patch -p1 < PATCH-chromium_types_h'.)
Depends on: 583138
Thanks for the patch. Bug 583138 updates to the latest chromium code and I've blocked that on this one to ensure I get this fix into it as part of the update.
Fixed in bug 583138 which has now landed. Thanks for the patch!
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: