wvstreams: Pass -fPIC to CFLAGS when building PIC objects
PATCH v2 1/1 wvstreams: Pass -fPIC to CFLAGS when building PIC objects
From: Markos Chandras <[email protected]>
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.
--- package/wvstreams/wvstreams.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/wvstreams/wvstreams.mk +4 -0
@@ -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
Signature · 1 line
1.8.2.1
PATCH v2 1/1 wvstreams: Pass -fPIC to CFLAGS when building PIC objects
Quoted 19 lines · Markos Chandras
From: Markos Chandras <[email protected]>
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 <[email protected]>--- package/wvstreams/wvstreams.mk | 4 ++++ 1 file changed, 4 insertions(+)package/wvstreams/wvstreams.mk +0
-0
package/wvstreams/wvstreams.mk WVSTREAMS_CONF_OPT += \ · line 32
Quoted 6 lines
package/wvstreams/wvstreams.mk +3
-0@@ -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
PATCH v2 1/1 wvstreams: Pass -fPIC to CFLAGS when building PIC objects
In reply to Markos ChandrasQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Markos" == Markos Chandras <[email protected]> writes:
Markos> From: Markos Chandras <[email protected]> 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 <[email protected]> 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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 wvstreams: Pass -fPIC to CFLAGS when building PIC objects
Quoted 23 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Markos" == Markos Chandras <[email protected]> writes:
Markos> From: Markos Chandras <[email protected]> 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 <[email protected]> Markos> ---
Markos> package/wvstreams/wvstreams.mk | 4 ++++Markos> 1 file changed, 4 insertions(+)
Markos> diff --git
a/package/wvstreams/wvstreams.mkb/package/wvstreams/wvstreams.mkMarkos> 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
Quoted 7 lines
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