Bug 137022

Summary: [EFL] Fix the gst-libav build on ARM Thumb2
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Normal CC: akiss, commit-queue, gyuyoung.kim, zherczeg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Csaba Osztrogonác 2014-09-23 05:03:41 PDT
Tools/Scripts/update-webkitefl-libs fails with GCC 4.8.3
if I would like to build to ARM Thumb2 instruction set:

../../gst-libs/ext/libav/libavcodec/libavcodec.a(videodsp_armv5te.o): In function `ff_prefetch_arm':
/home/oszi/WebKit/WebKitBuild/Dependencies/Source/gst-libav-1.2.1/gst-libs/ext/libav
/libavcodec/arm/videodsp_armv5te.S:29:(.text+0x8): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `ff_prefetch_arm' defined in .text section in
 ../../gst-libs/ext/libav/libavcodec/libavcodec.a(videodsp_armv5te.o)
collect2: error: ld returned 1 exit status
make[3]: *** [libgstlibav.la] Error 1
make[3]: Leaving directory `/home/oszi/WebKit/WebKitBuild/Dependencies/Source/gst-libav-1.2.1/ext/libav'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/oszi/WebKit/WebKitBuild/Dependencies/Source/gst-libav-1.2.1/ext'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/oszi/WebKit/WebKitBuild/Dependencies/Source/gst-libav-1.2.1'
make: *** [all] Error 2
make -j 12
ESC[1m*** Error during phase build of gst-libav: ########## Error running make -j 12 *** [19/22]ESC(BESC[m


The failure occurs in the "bne ff_prefetch_arm" line in gst-libs/ext/libav/libavcodec/arm/videodsp_armv5te.S ,
because ff_prefetch_arm is too far from here to use Thumb2 conditional branch. Here is a similar fix in
Linux kernel: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a75e5248c51af1eaeed936be6bd3497b93f09685
We don't need forcing Thumb instruction set, because no code is generated for it if we use ARM instruction set.
Comment 1 Csaba Osztrogonác 2014-09-23 05:05:42 PDT
Created attachment 238530 [details]
Patch
Comment 2 Zoltan Herczeg 2014-09-26 05:38:33 PDT
Comment on attachment 238530 [details]
Patch

nice catch. r=me.
Comment 3 WebKit Commit Bot 2014-09-26 06:14:16 PDT
Comment on attachment 238530 [details]
Patch

Clearing flags on attachment: 238530

Committed r174005: <http://trac.webkit.org/changeset/174005>
Comment 4 WebKit Commit Bot 2014-09-26 06:14:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Akos Kiss 2014-09-26 07:14:12 PDT
GTK builds the very same version of gst-libav. Might be worth trying if the bug occurs there as well (it should IMHO) and then add the patch to that jhbuild.modules, too.