Bug 137022 - [EFL] Fix the gst-libav build on ARM Thumb2
Summary: [EFL] Fix the gst-libav build on ARM Thumb2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Csaba Osztrogonác
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-23 05:03 PDT by Csaba Osztrogonác
Modified: 2014-09-26 07:14 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.91 KB, patch)
2014-09-23 05:05 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.