* [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC
@ 2013-06-05 14:02 Markos Chandras
2013-06-06 13:09 ` Markos Chandras
2013-06-20 8:00 ` Peter Korsgaard
0 siblings, 2 replies; 6+ messages in thread
From: Markos Chandras @ 2013-06-05 14:02 UTC (permalink / raw)
To: buildroot
From: Markos Chandras <markos.chandras@imgtec.com>
Fixes linking problems on MIPS.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patch
diff --git a/package/wvstreams/wvstreams-0006-argp-fpic.patch b/package/wvstreams/wvstreams-0006-argp-fpic.patch
new file mode 100644
index 0000000..b4cf1d2
--- /dev/null
+++ b/package/wvstreams/wvstreams-0006-argp-fpic.patch
@@ -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 <markos.chandras@imgtec.com>
+
+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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC
2013-06-05 14:02 [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC Markos Chandras
@ 2013-06-06 13:09 ` Markos Chandras
2013-06-12 8:22 ` Markos Chandras
2013-06-20 8:00 ` Peter Korsgaard
1 sibling, 1 reply; 6+ messages in thread
From: Markos Chandras @ 2013-06-06 13:09 UTC (permalink / raw)
To: buildroot
On 5 June 2013 15:02, Markos Chandras <markos.chandras@gmail.com> wrote:
> From: Markos Chandras <markos.chandras@imgtec.com>
>
> Fixes linking problems on MIPS.
>
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
> package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
> create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patch
>
> diff --git a/package/wvstreams/wvstreams-0006-argp-fpic.patch b/package/wvstreams/wvstreams-0006-argp-fpic.patch
> new file mode 100644
> index 0000000..b4cf1d2
> --- /dev/null
> +++ b/package/wvstreams/wvstreams-0006-argp-fpic.patch
> @@ -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 <markos.chandras@imgtec.com>
> +
> +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
>
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC
2013-06-06 13:09 ` Markos Chandras
@ 2013-06-12 8:22 ` Markos Chandras
2013-06-19 8:23 ` Markos Chandras
0 siblings, 1 reply; 6+ messages in thread
From: Markos Chandras @ 2013-06-12 8:22 UTC (permalink / raw)
To: buildroot
On 6 June 2013 14:09, Markos Chandras <markos.chandras@gmail.com> wrote:
> On 5 June 2013 15:02, Markos Chandras <markos.chandras@gmail.com> wrote:
>> From: Markos Chandras <markos.chandras@imgtec.com>
>>
>> Fixes linking problems on MIPS.
>>
>> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>> ---
>> package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>> create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patch
>>
>> diff --git a/package/wvstreams/wvstreams-0006-argp-fpic.patch b/package/wvstreams/wvstreams-0006-argp-fpic.patch
>> new file mode 100644
>> index 0000000..b4cf1d2
>> --- /dev/null
>> +++ b/package/wvstreams/wvstreams-0006-argp-fpic.patch
>> @@ -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 <markos.chandras@imgtec.com>
>> +
>> +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
>>
>>
>> _______________________________________________
>> 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
Hi,
ping? :)
--
Regards,
Markos Chandras
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC
2013-06-12 8:22 ` Markos Chandras
@ 2013-06-19 8:23 ` Markos Chandras
0 siblings, 0 replies; 6+ messages in thread
From: Markos Chandras @ 2013-06-19 8:23 UTC (permalink / raw)
To: buildroot
On 12 June 2013 09:22, Markos Chandras <markos.chandras@gmail.com> wrote:
> On 6 June 2013 14:09, Markos Chandras <markos.chandras@gmail.com> wrote:
>> On 5 June 2013 15:02, Markos Chandras <markos.chandras@gmail.com> wrote:
>>> From: Markos Chandras <markos.chandras@imgtec.com>
>>>
>>> Fixes linking problems on MIPS.
>>>
>>> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>>> ---
>>> package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++
>>> 1 file changed, 28 insertions(+)
>>> create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patch
>>>
>>> diff --git a/package/wvstreams/wvstreams-0006-argp-fpic.patch b/package/wvstreams/wvstreams-0006-argp-fpic.patch
>>> new file mode 100644
>>> index 0000000..b4cf1d2
>>> --- /dev/null
>>> +++ b/package/wvstreams/wvstreams-0006-argp-fpic.patch
>>> @@ -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 <markos.chandras@imgtec.com>
>>> +
>>> +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
>>>
>>>
>>> _______________________________________________
>>> 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
>
> Hi,
>
> ping? :)
>
> --
> Regards,
> Markos Chandras
Hello,
any comments on this patch?
--
Regards,
Markos Chandras
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC
2013-06-05 14:02 [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC Markos Chandras
2013-06-06 13:09 ` Markos Chandras
@ 2013-06-20 8:00 ` Peter Korsgaard
2013-06-20 9:05 ` Markos Chandras
1 sibling, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2013-06-20 8:00 UTC (permalink / raw)
To: buildroot
>>>>> "Markos" == Markos Chandras <markos.chandras@gmail.com> writes:
Markos> From: Markos Chandras <markos.chandras@imgtec.com>
Markos> Fixes linking problems on MIPS.
Markos> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
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 <markos.chandras@imgtec.com>
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?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC
2013-06-20 8:00 ` Peter Korsgaard
@ 2013-06-20 9:05 ` Markos Chandras
0 siblings, 0 replies; 6+ messages in thread
From: Markos Chandras @ 2013-06-20 9:05 UTC (permalink / raw)
To: buildroot
On 20 June 2013 09:00, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Markos" == Markos Chandras <markos.chandras@gmail.com> writes:
>
> Markos> From: Markos Chandras <markos.chandras@imgtec.com>
> Markos> Fixes linking problems on MIPS.
>
> Markos> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> 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 <markos.chandras@imgtec.com>
> 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?
>
> --
> Bye, Peter Korsgaard
Hi Peter,
Yes modifying the CFLAGS is simpler. I will do that.
--
Regards,
Markos Chandras
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-06-20 9:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05 14:02 [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC Markos Chandras
2013-06-06 13:09 ` Markos Chandras
2013-06-12 8:22 ` Markos Chandras
2013-06-19 8:23 ` Markos Chandras
2013-06-20 8:00 ` Peter Korsgaard
2013-06-20 9:05 ` Markos Chandras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox