[Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects

Markos Chandras markos.chandras at gmail.com
Thu Jun 20 20:21:38 UTC 2013


On 20 June 2013 16:06, 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> The argp bundled dependency which is linked to the libwvutils.so
>  Markos> shared library, wasn't built with -fPIC.
>  Markos> MIPS will refuce to link a non-PIC library with a shared one.
>
>  Markos> We fix this problem by appending -fPIC to CFLAGS and build all the
>  Markos> shared objects with -fPIC.
>
>  Markos> Signed-off-by: Markos Chandras <markos.chandras at imgtec.com>
>  Markos> ---
>  Markos>  package/wvstreams/wvstreams.mk | 4 ++++
>  Markos>  1 file changed, 4 insertions(+)
>
>  Markos> diff --git a/package/wvstreams/wvstreams.mk b/package/wvstreams/wvstreams.mk
>  Markos> index 65f48d4..fddaad7 100644
>  Markos> --- a/package/wvstreams/wvstreams.mk
>  Markos> +++ b/package/wvstreams/wvstreams.mk
>  Markos> @@ -27,6 +27,10 @@ WVSTREAMS_CONF_OPT += \
>  Markos>  # needed for openssl detection when statically linking (as ssl needs lz)
>  Markos>  WVSTREAMS_CONF_ENV += LIBS=-lz
>
>  Markos> +ifneq ($(BR2_PREFER_STATIC_LIB),y)
>  Markos> +      WVSTREAMS_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -fPIC"
>
> Committed with this changed to a +=, thanks.
>
> --
> Bye, Peter Korsgaard

Thank you Peter

--
Regards,
Markos Chandras


More information about the buildroot mailing list