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

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


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

I just noticed this is a mistake. It should be "+=" instead of "=" for
the WVSTREAMS_CONF_ENV.

I can send a new patch if needed.

--
Regards,
Markos Chandras



More information about the buildroot mailing list