[Buildroot] [PATCH] bzip2: Rearrange build order

Markos Chandras markos.chandras at gmail.com
Wed Jun 5 14:02:06 UTC 2013


On 5 June 2013 14:50, Peter Korsgaard <jacmet at uclibc.org> wrote:
>>>>>> "Markos" == Markos Chandras <markos.chandras at gmail.com> writes:
>
>  Markos> From: Markos Chandras <markos.chandras at imgtec.com>
>  Markos> Several object files are shared between the libbz2.so shared library
>  Markos> and the libbz2.a static one. MIPS will refuce to build a relocatable
>  Markos> object when creating a new shared library with the following error:
>
>  Markos> blocksort.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used
>  Markos> when making a shared object; recompile with -fPIC
>
>  Markos> This is because these files are build without -fPIC when creating the
>  Markos> static library and later on they are used to build the shared one.
>
>  Markos> This is easily fixed if we add the shared library build rule before
>  Markos> creating the static library so object files are always compiled with
>  Markos> -fPIC.
>
> This works, but is afaik less efficient for the static lib case.
>
> The real fix is imho to build the object files twice, like how libtool
> does it.
>
> If you look at the Debian package, they work around it by adding a
> seperate .c -> .sho build rule, which adds -fPIC, and then link the .so
> file with the .sho files instead.
>
> --
> Bye, Peter Korsgaard

Hi Peter,

Ok I will send a new patch based on the debian patch.

--
Regards,
Markos Chandras



More information about the buildroot mailing list