<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 15, 2016 at 3:37 PM, Phil Blundell <span dir="ltr"><<a target="_blank" href="mailto:pb@pbcl.net">pb@pbcl.net</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-">On Thu, 2016-09-15 at 12:22 +0530, Sujith H wrote:<br>
> From: Fahad Usman <<a href="mailto:fahad_usman@mentor.com">fahad_usman@mentor.com</a>><br>
><br>
> This change help fix the warning message:<br>
><br>
> x264/r2491+gitAUTOINC+<wbr>c8a773ebfc-r0/packages-<br>
> split/x264/usr/lib/libx264.so.<wbr>144' has relocations in .text [textrel]<br>
><br>
> Adding textrel to INSANE_SKIP resolves this issue.<br>
<br>
</span>This is a poor commit message. Adding textrel to INSANE_SKIP prevents<br>
the check from being done, so it is fairly self-evident that it will<br>
suppress the corresponding warning message. Please add an explanation<br>
of why this is an appropriate thing to do, i.e. why the textrels are<br>
present and why you can't get rid of them by other means.<br>
<br>
In particular please clarify whether you want to do this because the<br>
textrels are absolutely unavoidable for some reason on your<br>
architecture, or just because you think this is a good trade-off for<br>
performance. If the latter then I think the change probably belongs in<br>
a distro or BSP layer not in oe-core.<br></blockquote><div><br></div><div>As per the reference from <a href="http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#qa-issue-textrel">http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#qa-issue-textrel</a> I added CFLAGS_append = " -fPIC " in the recipe and tried to build x264. Below is the result.<br><br><br>Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:00<br>Loaded 1313 entries from dependency cache.<br>Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:02<br>Parsing of 877 .bb files complete (865 cached, 12 parsed). 1325 targets, 69 skipped, 0 masked, 0 errors.<br>NOTE: Resolving any missing task queue dependencies<br><br>Build Configuration:<br>BB_VERSION = "1.31.1"<br>BUILD_SYS = "x86_64-linux"<br>NATIVELSBSTRING = "universal"<br>TARGET_SYS = "arm-poky-linux-gnueabi"<br>MACHINE = "cyclone5"<br>DISTRO = "poky"<br>DISTRO_VERSION = "2.1+snapshot-20160921"<br>TUNE_FEATURES = "arm armv7a vfp neon"<br>TARGET_FPU = "softfp"<br>meta <br>meta-poky <br>meta-yocto-bsp = "toaster-next:75927f8f6809b9b4696fc438b240bc7a3db561e2"<br>meta-altera = "master:1bfc1ac36f28352a79a7ba98dc9d74608d76f1e6"<br><br>Initialising tasks: 100% |#####################################################################################################################################################| Time: 0:00:01<br>NOTE: Executing SetScene Tasks<br>NOTE: Executing RunQueue Tasks<br>WARNING: x264-r2491+gitAUTOINC+c8a773ebfc-r0 do_package_qa: QA Issue: ELF binary '/home/sujith/poky-push/build-qemuarm/tmp/work/armv7a-neon-poky-linux-gnueabi/x264/r2491+gitAUTOINC+c8a773ebfc-r0/packages-split/x264/usr/lib/libx264.so.144' has relocations in .text [textrel]<br>NOTE: Tasks Summary: Attempted 407 tasks of which 394 didn't need to be rerun and all succeeded.<br><br>Summary: There was 1 WARNING message shown.<br><br></div><div>I have tried to debug the compile log where I found, there are .S files in the source. Here is the small snippet of the compile log<br><br>arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/cyclone5 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/sujith/poky-push/build-qemuarm/tmp/work/armv7a-neon-poky-linux-gnueabi/x264/r2491+gitAUTOINC+c8a773ebfc-r0=/usr/src/debug/x264/r2491+gitAUTOINC+c8a773ebfc-r0 -fdebug-prefix-map=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/cyclone5= -fPIC -Wall -I. -I. --sysroot=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/cyclone5 -std=gnu99 -fPIC -fomit-frame-pointer -fno-tree-vectorize -c -o encoder/slicetype-cl.o encoder/slicetype-cl.c<br>arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/cpu-a.o common/arm/cpu-a.S<br>arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/pixel-a.o common/arm/pixel-a.S<br>arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/mc-a.o common/arm/mc-a.S<br>arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/dct-a.o common/arm/dct-a.S<br>arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/quant-a.o common/arm/quant-a.S<br>arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/deblock-a.o common/arm/deblock-a.S<br>arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/predict-a.o common/arm/predict-a.S<br>rm -f libx264.a<br>arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/cyclone5 -o libx264.so.144 common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/osdep.o common/rectangle.o common/set.o common/quant.o common/deblock.o common/vlc.o common/mvpred.o common/bitstream.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/threadpool.o common/arm/mc-c.o common/arm/predict-c.o common/opencl.o encoder/slicetype-cl.o common/arm/cpu-a.o common/arm/pixel-a.o common/arm/mc-a.o common/arm/dct-a.o common/arm/quant-a.o common/arm/deblock-a.o common/arm/predict-a.o -shared -Wl,-soname,libx264.so.144 -Wl,-Bsymbolic -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/cyclone5 -lm -lpthread -ldl<br><br> Hence I tried to edit the config.mak to get the .S files compile with -fPIC. Basically updated the ASFLAGS. But that didn't helped me either. Also tried to add, TARGET_CC_ARCH += " -fPIC ". May be I am wrong with TARGET_CC_ARCH one. <br><br></div><div>I have verified with the command eu-findtextrel shown below in the devshell:<br><br>[root@sujith git]# eu-findtextrel libx264.so.144<br>either the file containing the function 'x264_pixel_ssim_end4_neon' or the file containing the function '$a' is not compiled with -fpic/-fPIC<br>either the file containing the function '$d' or the file containing the function '$a' is not compiled with -fpic/-fPIC<br>either the file containing the function 'memcpy_aligned_8_8_neon' or the file containing the function '$a' is not compiled with -fpic/-fPIC<br>either the file containing the function 'x264_zigzag_scan_4x4_frame_neon' or the file containing the function '$a' is not compiled with -fpic/-fPIC<br>either the file containing the function 'x264_coeff_last64_neon' or the file containing the function '$a' is not compiled with -fpic/-fPIC<br>either the file containing the function '$d' or the file containing the function '$a' is not compiled with -fpic/-fPIC<br>either the file containing the function '$d' or the file containing the function '$d' is not compiled with -fpic/-fPIC<br>either the file containing the function '$d' or the file containing the function '$d' is not compiled with -fpic/-fPIC<br>either the file containing the function '$d' or the file containing the function '$d' is not compiled with -fpic/-fPIC<br>either the file containing the function '$d' or the file containing the function '$d' is not compiled with -fpic/-fPIC<br>[root@sujith git]#<br><br></div><div>The above mentioned functions are part of .S files. I am not sure how to proceed with this. May be a helping hand would be appreciated to move further.<br><br></div><div>Yes, of course I can update the commit message. <br></div><div><br></div><div>Fahad, any idea to share?<br><br><br></div><div>Thanks,<br></div><div>Sujith H<br></div><div><br></div><div> <br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<span class="gmail-HOEnZb"><font color="#888888"><br>
p.<br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>സുജിത് ഹരിദാസന്<br>Bangalore<br><Project>Contributor to KDE project<br></div><div><Project>Contributor to Yocto project<br></div><div><a target="_blank" href="http://fci.wikia.com/wiki/Anti-DRM-Campaign">http://fci.wikia.com/wiki/Anti-DRM-Campaign</a><br><Blog> <a target="_blank" href="http://sujithh.info">http://sujithh.info</a><br></div><div>C-x C-c<br></div></div></div></div></div>
</div></div>