[Bug 215974] [PATCH] audio/liba52: armv6 build requires -fPIC

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Feb 3 15:06:01 UTC 2017


--- Comment #2 from Michal Meloun <mmel at FreeBSD.org> ---
Yes, it's still needed.
By ARM EABI, shared library must be compiled with -fPIC.
(In short, standard ARM object file may contain relocations which cannot be
resolved by runtime linker, like R_ARM_MOVW_*, R_ARM_MOVT_*.)

The port build fails if you have specified any 'higher' CPU type. 
With -mcpu=cortex-a15, the build fails with:
(and I'm sorry, I did not realize that -mcpu is necessary for the exhibition of
this problem) 

/bin/sh ../libtool --mode=link cc  -pipe  -munaligned-access -mcpu=cortex-a15
  -fno-builtin-sin -fno-builtin-cos  -fno-strict-aliasing -O -pipe -O2
  -munaligned-access  -fomit-frame-pointer  -prefer-non-pic  -o liba52.la
  -rpath /usr/local/lib -no-undefined bitstream.lo imdct.lo bit_allocate.lo
   parse.lo downmix.lo -lm

rm -fr .libs/liba52.la .libs/liba52.* .libs/liba52.*

cc -shared  bitstream.lo imdct.lo bit_allocate.lo parse.lo downmix.lo 
  -lm  -Wl,-soname -Wl,liba52.so.0 -o .libs/liba52.so.0.0.0

/usr/bin/ld: imdct.lo(.text+0x90c): 
  unresolvable R_ARM_MOVW_ABS_NC relocation against symbol

/usr/bin/ld: final link failed: Nonrepresentable section on output

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-multimedia mailing list