wvstreams: Build bundled argp library with -fPIC
PATCH 1/1 wvstreams: Build bundled argp library with -fPIC
From: Markos Chandras <[email protected]>
Fixes linking problems on MIPS.
--- package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patch
package/wvstreams/wvstreams-0006-argp-fpic.patch new file +28 -0
@@ -0,0 +1,28 @@ +Build argp object files with -fPIC. + +The argp bundled dependency is linked to the libwvutils.so shared library. +MIPS will refuce to link a non-PIC library with a shared one. + +We fix this problem by building the argp source files using -fPIC since +the libargp static library will only be used to link to libwvutils.so +as instructed by the following rule in the root Makefile: + +ifeq ($(USE_WVSTREAMS_ARGP),1) + utils/wvargs.o-CPPFLAGS += -Iargp + libwvutils.so-LIBS += -Largp -largp + +Signed-off-by: Markos Chandras <[email protected]> + +Index: wvstreams-4.6.1/argp/Makefile.in +=================================================================== +--- wvstreams-4.6.1.orig/argp/Makefile.in ++++ wvstreams-4.6.1/argp/Makefile.in +@@ -137,7 +137,7 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -fPIC + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@
Signature · 1 line
1.8.2.1
PATCH 1/1 wvstreams: Build bundled argp library with -fPIC
Quoted 48 lines · Markos Chandras
From: Markos Chandras <[email protected]>
Fixes linking problems on MIPS.
Signed-off-by Markos Chandras <[email protected]>--- package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patchpackage/wvstreams/wvstreams-0006-argp-fpic.patch new file +28
-1@@ -0,0 +1,28 @@ +Build argp object files with -fPIC. + +The argp bundled dependency is linked to the libwvutils.so shared library. +MIPS will refuce to link a non-PIC library with a shared one. + +We fix this problem by building the argp source files using -fPIC since +the libargp static library will only be used to link to libwvutils.so +as instructed by the following rule in the root Makefile: + +ifeq ($(USE_WVSTREAMS_ARGP),1) + utils/wvargs.o-CPPFLAGS += -Iargp + libwvutils.so-LIBS += -Largp -largp + +Signed-off-by: Markos Chandras <[email protected]> + +Index: wvstreams-4.6.1/argp/Makefile.in +=================================================================== +--- wvstreams-4.6.1.orig/argp/Makefile.in ++++ wvstreams-4.6.1/argp/Makefile.in +@@ -137,7 +137,7 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -fPIC + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ --1.8.2.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Hi all,
After the relevant discussion in the bzip2 static/shared lib patch, I believe this patch is safe to be applied as is, since the argp static library is only a dependency for the shared libwvutils.so. In my opinion, it is fine to build argp with -fPIC since it's only going to be used
in a shared library.
--
Regards,
Markos Chandras
PATCH 1/1 wvstreams: Build bundled argp library with -fPIC
Quoted 63 lines · Markos Chandras
Quoted 48 lines · Markos Chandras
From: Markos Chandras <[email protected]>
Fixes linking problems on MIPS.
Signed-off-by Markos Chandras <[email protected]>--- package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patchpackage/wvstreams/wvstreams-0006-argp-fpic.patch new file +28
-1@@ -0,0 +1,28 @@ +Build argp object files with -fPIC. + +The argp bundled dependency is linked to the libwvutils.so shared library. +MIPS will refuce to link a non-PIC library with a shared one. + +We fix this problem by building the argp source files using -fPIC since +the libargp static library will only be used to link to libwvutils.so +as instructed by the following rule in the root Makefile: + +ifeq ($(USE_WVSTREAMS_ARGP),1) + utils/wvargs.o-CPPFLAGS += -Iargp + libwvutils.so-LIBS += -Largp -largp + +Signed-off-by: Markos Chandras <[email protected]> + +Index: wvstreams-4.6.1/argp/Makefile.in +=================================================================== +--- wvstreams-4.6.1.orig/argp/Makefile.in ++++ wvstreams-4.6.1/argp/Makefile.in +@@ -137,7 +137,7 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -fPIC + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ --1.8.2.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootHi all,
After the relevant discussion in the bzip2 static/shared lib patch, I believe this patch is safe to be applied as is, since the argp static library is only a dependency for the shared libwvutils.so. In my opinion, it is fine to build argp with -fPIC since it's only going to be used
in a shared library.
Quoted 3 lines
--
Regards,
Markos Chandras
Hi,
ping? :)
--
Regards,
Markos Chandras
PATCH 1/1 wvstreams: Build bundled argp library with -fPIC
Quoted 68 lines · Markos Chandras
Quoted 63 lines · Markos Chandras
Quoted 48 lines · Markos Chandras
From: Markos Chandras <[email protected]>
Fixes linking problems on MIPS.
Signed-off-by Markos Chandras <[email protected]>--- package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patchpackage/wvstreams/wvstreams-0006-argp-fpic.patch new file +28
-1@@ -0,0 +1,28 @@ +Build argp object files with -fPIC. + +The argp bundled dependency is linked to the libwvutils.so shared library. +MIPS will refuce to link a non-PIC library with a shared one. + +We fix this problem by building the argp source files using -fPIC since +the libargp static library will only be used to link to libwvutils.so +as instructed by the following rule in the root Makefile: + +ifeq ($(USE_WVSTREAMS_ARGP),1) + utils/wvargs.o-CPPFLAGS += -Iargp + libwvutils.so-LIBS += -Largp -largp + +Signed-off-by: Markos Chandras <[email protected]> + +Index: wvstreams-4.6.1/argp/Makefile.in +=================================================================== +--- wvstreams-4.6.1.orig/argp/Makefile.in ++++ wvstreams-4.6.1/argp/Makefile.in +@@ -137,7 +137,7 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -fPIC + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ --1.8.2.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootHi all,
After the relevant discussion in the bzip2 static/shared lib patch, I believe this patch is safe to be applied as is, since the argp static library is only a dependency for the shared libwvutils.so. In my opinion, it is fine to build argp with -fPIC since it's only going to be used
in a shared library.Quoted 3 lines
--
Regards,
Markos Chandras
Quoted 7 lines
Hi,
ping? :)
--
Regards,
Markos Chandras
Hello,
any comments on this patch?
--
Regards,
Markos Chandras
PATCH 1/1 wvstreams: Build bundled argp library with -fPIC
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> Fixes linking problems on MIPS.
Markos> Signed-off-by: Markos Chandras <[email protected]> Markos> ---
Markos> package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++
Markos> 1 file changed, 28 insertions(+)
Markos> create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patch
Markos> diff --git a/package/wvstreams/wvstreams-0006-argp-fpic.patch b/package/wvstreams/wvstreams-0006-argp-fpic.patch Markos> new file mode 100644
Markos> index 0000000..b4cf1d2
Markos> --- /dev/null
Markos> +++ b/package/wvstreams/wvstreams-0006-argp-fpic.patch
Markos> @@ -0,0 +1,28 @@
Markos> +Build argp object files with -fPIC.
Markos> +
Markos> +The argp bundled dependency is linked to the libwvutils.so shared library.
Markos> +MIPS will refuce to link a non-PIC library with a shared one.
Markos> +
Markos> +We fix this problem by building the argp source files using -fPIC since
Markos> +the libargp static library will only be used to link to libwvutils.so
Markos> +as instructed by the following rule in the root Makefile:
Markos> +
Markos> +ifeq ($(USE_WVSTREAMS_ARGP),1)
Markos> + utils/wvargs.o-CPPFLAGS += -Iargp
Markos> + libwvutils.so-LIBS += -Largp -largp
Markos> +
Markos> +Signed-off-by: Markos Chandras <[email protected]>
Markos> +
Markos> +Index: wvstreams-4.6.1/argp/Makefile.in
Markos> +===================================================================
Markos> +--- wvstreams-4.6.1.orig/argp/Makefile.in
Markos> ++++ wvstreams-4.6.1/argp/Makefile.in
Markos> +@@ -137,7 +137,7 @@ AUTOMAKE = @AUTOMAKE@
Markos> + AWK = @AWK@
Markos> + CC = @CC@
Markos> + CCDEPMODE = @CCDEPMODE@
Markos> +-CFLAGS = @CFLAGS@
Markos> ++CFLAGS = @CFLAGS@ -fPIC
How about when wvstreams is built as a static library (BR2_PREFER_STATIC_LIB)?
Makefile.in is a generated file, so you should rather fix Makefile.am and set WVSTREAMS_AUTORECONF = YES, but wouldn't it just be simpler to just add CFLAGS="$(TARGET_CFLAGS) -fPIC" to WVSTREAMS_CONF_ENV when building in the !BR2_PREFER_STATIC_LIB case?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 wvstreams: Build bundled argp library with -fPIC
Quoted 46 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> Fixes linking problems on MIPS.
Markos> Signed-off-by: Markos Chandras <[email protected]> Markos> ---
Markos> package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++Markos> 1 file changed, 28 insertions(+)
Markos> create mode 100644package/wvstreams/wvstreams-0006-argp-fpic.patchMarkos> diff --git
a/package/wvstreams/wvstreams-0006-argp-fpic.patchb/package/wvstreams/wvstreams-0006-argp-fpic.patchMarkos> new file mode 100644
Markos> index 0000000..b4cf1d2
Markos> ---/dev/null
Markos> +++b/package/wvstreams/wvstreams-0006-argp-fpic.patch
Markos> @@ -0,0 +1,28 @@
Markos> +Build argp object files with -fPIC.
Markos> +
Markos> +The argp bundled dependency is linked to the libwvutils.so shared library.
Markos> +MIPS will refuce to link a non-PIC library with a shared one.
Markos> +
Markos> +We fix this problem by building the argp source files using -fPIC since
Markos> +the libargp static library will only be used to link to libwvutils.so
Markos> +as instructed by the following rule in the rootMakefile:
Markos> +
Markos> +ifeq ($(USE_WVSTREAMS_ARGP),1)
Markos> + utils/wvargs.o-CPPFLAGS += -Iargp
Markos> + libwvutils.so-LIBS += -Largp -largp
Markos> +
Markos> +Signed-off-by: Markos Chandras <[email protected]>
Markos> +
Markos> +Index: wvstreams-4.6.1/argp/Makefile.in
Markos> +===================================================================
Markos> +--- wvstreams-4.6.1.orig/argp/Makefile.in
Markos> ++++ wvstreams-4.6.1/argp/Makefile.in
Markos> +@@ -137,7 +137,7 @@ AUTOMAKE = @AUTOMAKE@
Markos> + AWK = @AWK@
Markos> + CC = @CC@
Markos> + CCDEPMODE = @CCDEPMODE@
Markos> +-CFLAGS = @CFLAGS@
Markos> ++CFLAGS = @CFLAGS@ -fPICHow about when wvstreams is built as a static library (
BR2_PREFER_STATIC_LIB)?
Quoted 7 lines
Makefile.in is a generated file, so you should rather fix Makefile.am and set
WVSTREAMS_AUTORECONF= YES, but wouldn't it just be simpler to just add CFLAGS="$(TARGET_CFLAGS) -fPIC" toWVSTREAMS_CONF_ENVwhen building in the !BR2_PREFER_STATIC_LIB case?--
Bye, Peter Korsgaard
Hi Peter,
Yes modifying the CFLAGS is simpler. I will do that.
--
Regards,
Markos Chandras