Bug 14974 - Build failure on PPC Linux
Summary: Build failure on PPC Linux
Status: RESOLVED DUPLICATE of bug 14521
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac (PowerPC) Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-15 11:07 PDT by Mike Hommey
Modified: 2007-10-23 08:36 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Hommey 2007-08-15 11:07:16 PDT
The assembly in JavaScriptCore/wtf/TCSpinLock.h fails to build on PPC with the following error message:
g++ -c -g -O2 -Wall -D_REENTRANT -I/usr/include -g -Wall -W -DQT_SHARED -DBUILDING_GDK__ -I/usr/share/qt4/mkspecs/linux-g++ -I../../../JavaScriptCore/kjs -I../../../JavaScriptCore -I../../../JavaScriptCore/kjs -I../../../JavaScriptCore/bindings -I../../../JavaScriptCore/bindings/c -I../../../JavaScriptCore/wtf -Itmp -I../../../JavaScriptCore -I../../../JavaScriptCore/kjs -I../../../JavaScriptCore/bindings -I../../../JavaScriptCore/bindings/c -I../../../JavaScriptCore/wtf -I../../../JavaScriptCore/pcre -Itmp -I../../../JavaScriptCore/kjs -I. -o TCSystemAlloc.o ../../../JavaScriptCore/wtf/TCSystemAlloc.cpp
../../../JavaScriptCore/wtf/TCSpinLock.h: In function 'void* TCMalloc_SystemAlloc(size_t, size_t)':
../../../JavaScriptCore/wtf/TCSpinLock.h:98: error: 'asm' operand requires impossible reload

The toolchain in use is :
gcc 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)
glibc 2.6.1
and binutils 2.17cvs20070804
Comment 1 Mark Rowe (bdash) 2007-08-16 01:37:15 PDT
Patches are welcome.  The code in TCSpinLock.h compiles under GCC 4.0 on PowerPC Mac OS X.  A simple workaround would be to use the pthread version of TCMalloc_SpinLock rather than the custom assembly version.
Comment 2 Mike Hommey 2007-08-16 12:01:55 PDT
After further investigation, it is likely a regression in g++. It builds with -O0, and builds at -O2 with g++-4.0. Maybe you should give a try building with g++-4.1 or 4.2 on OSX, it may also fail.
Comment 3 Mark Rowe (bdash) 2007-08-16 20:21:09 PDT
Mac OS X only ships with GCC 4.0.1.  Mainline GCC does not support many of the features that Apple has added and which are possibly used by the Mac port, so it is not particularly easy to test with other versions.
Comment 4 David Kilzer (:ddkilzer) 2007-10-23 08:36:30 PDT

*** This bug has been marked as a duplicate of 14521 ***