* [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects
@ 2013-06-20 14:14 Markos Chandras
2013-06-20 14:28 ` Markos Chandras
2013-06-20 15:06 ` Peter Korsgaard
0 siblings, 2 replies; 4+ messages in thread
From: Markos Chandras @ 2013-06-20 14:14 UTC (permalink / raw)
To: buildroot
From: Markos Chandras <markos.chandras@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@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
+
ifeq ($(BR2_PACKAGE_DBUS),y)
WVSTREAMS_DEPENDENCIES += dbus
WVSTREAMS_CONF_OPT += --with-dbus
--
1.8.2.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects
2013-06-20 14:14 [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects Markos Chandras
@ 2013-06-20 14:28 ` Markos Chandras
2013-06-20 15:06 ` Peter Korsgaard
1 sibling, 0 replies; 4+ messages in thread
From: Markos Chandras @ 2013-06-20 14:28 UTC (permalink / raw)
To: buildroot
On 20 June 2013 15:14, Markos Chandras <markos.chandras@gmail.com> wrote:
> From: Markos Chandras <markos.chandras@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@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects
2013-06-20 14:14 [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects Markos Chandras
2013-06-20 14:28 ` Markos Chandras
@ 2013-06-20 15:06 ` Peter Korsgaard
2013-06-20 20:21 ` Markos Chandras
1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2013-06-20 15:06 UTC (permalink / raw)
To: buildroot
>>>>> "Markos" == Markos Chandras <markos.chandras@gmail.com> writes:
Markos> From: Markos Chandras <markos.chandras@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@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects
2013-06-20 15:06 ` Peter Korsgaard
@ 2013-06-20 20:21 ` Markos Chandras
0 siblings, 0 replies; 4+ messages in thread
From: Markos Chandras @ 2013-06-20 20:21 UTC (permalink / raw)
To: buildroot
On 20 June 2013 16:06, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Markos" == Markos Chandras <markos.chandras@gmail.com> writes:
>
> Markos> From: Markos Chandras <markos.chandras@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@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-20 20:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20 14:14 [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects Markos Chandras
2013-06-20 14:28 ` Markos Chandras
2013-06-20 15:06 ` Peter Korsgaard
2013-06-20 20:21 ` Markos Chandras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox