Bug 16955

Summary: Get errors when cross-compile webkit-gtk
Product: WebKit Reporter: Fengmeng <fengmeng>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alp, mrowe
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
patch to cleanup ICU_CFLAGS alp: review+

Description Fengmeng 2008-01-21 03:11:36 PST
When I cross-compile webkit-gtk for arm  arch. I get following errors:

arm-linux-g++ -DHAVE_CONFIG_H -I.  -I ./JavaScriptCore -I ./JavaScriptCore/ForwardingHeaders -I ./JavaScriptCore/wtf -I ./JavaScriptCore/kjs -I ./DerivedSources -DBUILDING_GTK__=1 -DWTF_CHANGES   -DNDEBUG  -DENABLE_ICONDATABASE=0   -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter  -fno-rtti -fno-exceptions  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing  -O2 -MT JavaScriptCore/kjs/Programs_testkjs-testkjs.o -MD -MP -MF JavaScriptCore/kjs/.deps/Programs_testkjs-testkjs.Tpo -c -o JavaScriptCore/kjs/Programs_testkjs-testkjs.o `test -f 'JavaScriptCore/kjs/testkjs.cpp' || echo './'`JavaScriptCore/kjs/testkjs.cpp
cc1plus: error: invalid option `64'
cc1plus: error: unrecognized command line option "-fstack-protector"
cc1plus: error: invalid parameter `ssp-buffer-size'
JavaScriptCore/kjs/testkjs.cpp:1: error: bad value (generic) for -mtune= switch
make[1]: *** [JavaScriptCore/kjs/Programs_testkjs-testkjs.o] Error 1
make[1]: Leaving directory `/usr/nthcode/WebKit-r29674'
make: *** [all] Error 2
Comment 1 Mark Rowe (bdash) 2008-01-21 03:15:27 PST
Discussion in #webkit revealed the erroneous flags were coming from ICU_CFLAGS.
Comment 2 Jan Alonzo 2008-01-21 09:57:50 PST
Created attachment 18575 [details]
patch to cleanup ICU_CFLAGS

The patch to cleanup usage of ICU_CFLAGS is attached. The patch also adds ICU_CPPFLAGS in the jsc and webcore/webkitgtk builds.

Please let me know if there are any issues with the patch.
Comment 3 Alp Toker 2008-01-21 15:06:38 PST
Comment on attachment 18575 [details]
patch to cleanup ICU_CFLAGS

ICU libs/cflags only need to be added to jsc and webcore, nothing else. There are also other redundant flags we can remove.

Also found tabs in WebKitTools/ChangeLog

Will fix up these issues.
Comment 4 Alp Toker 2008-01-21 15:07:34 PST
Landed in r29701.
Comment 5 Fengmeng 2008-01-21 22:52:05 PST
Hi alp

Your patch works , 
Now I have successfully cross-compiled WebKit/Gtk for my arm board.
Thank you guys a lot

Fengmeng

(In reply to comment #3)
> (From update of attachment 18575 [details] [edit])
> ICU libs/cflags only need to be added to jsc and webcore, nothing else. There
> are also other redundant flags we can remove.
> 
> Also found tabs in WebKitTools/ChangeLog
> 
> Will fix up these issues.
>