* [PATCH] um: Add back support for extra userspace libraries
@ 2019-10-16 14:13 Anton Ivanov
2019-10-17 11:32 ` Ritesh Raj Sarraf
2019-12-07 1:24 ` Brendan Higgins
0 siblings, 2 replies; 5+ messages in thread
From: Anton Ivanov @ 2019-10-16 14:13 UTC (permalink / raw)
To: linux-um; +Cc: richard, Anton Ivanov, 938962
PCAP and VDE network transports require linking with userspace
libraries. The current build system has no means of passing these
as arguments.
This patch adds a script to expand the library list for linking
for these transports as well as any future driver that needs to
rely on additional libraries on the userspace side.
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
---
| 10 ++++++++++
scripts/link-vmlinux.sh | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
create mode 100644 arch/um/scripts/extra-libs.sh
--git a/arch/um/scripts/extra-libs.sh b/arch/um/scripts/extra-libs.sh
new file mode 100644
index 000000000000..0592485e0675
--- /dev/null
+++ b/arch/um/scripts/extra-libs.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# This file should be included from link-vmlinux, not executed!!!
+
+if [ "${CONFIG_UML_NET_VDE}" = "y" ] ; then
+ UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lvde -lvdeplug"
+fi
+if [ "${CONFIG_UML_NET_PCAP}" = "y" ] ; then
+ UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lpcap"
+fi
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 06495379fcd8..15f9e5096da0 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -90,11 +90,13 @@ vmlinux_link()
-Wl,--end-group \
${@}"
+ . arch/um/scripts/extra-libs.sh
+
${CC} ${CFLAGS_vmlinux} \
-o ${output} \
-Wl,-T,${lds} \
${objects} \
- -lutil -lrt -lpthread
+ -lutil -lrt -lpthread ${UML_EXTRA_LIBS}
rm -f linux
fi
}
--
2.20.1
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] um: Add back support for extra userspace libraries
2019-10-16 14:13 [PATCH] um: Add back support for extra userspace libraries Anton Ivanov
@ 2019-10-17 11:32 ` Ritesh Raj Sarraf
2019-11-25 21:32 ` Richard Weinberger
2019-12-07 1:24 ` Brendan Higgins
1 sibling, 1 reply; 5+ messages in thread
From: Ritesh Raj Sarraf @ 2019-10-17 11:32 UTC (permalink / raw)
To: Anton Ivanov, linux-um; +Cc: richard, 938962
[-- Attachment #1.1.1: Type: text/plain, Size: 2218 bytes --]
Hello Anton,
Thank you so much for working on this fix. I tested this patch and it
works. Some comments below though.
On Wed, 2019-10-16 at 15:13 +0100, Anton Ivanov wrote:
> PCAP and VDE network transports require linking with userspace
> libraries. The current build system has no means of passing these
> as arguments.
>
> This patch adds a script to expand the library list for linking
> for these transports as well as any future driver that needs to
> rely on additional libraries on the userspace side.
>
> Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
> ---
> arch/um/scripts/extra-libs.sh | 10 ++++++++++
> scripts/link-vmlinux.sh | 4 +++-
> 2 files changed, 13 insertions(+), 1 deletion(-)
> create mode 100644 arch/um/scripts/extra-libs.sh
>
> diff --git a/arch/um/scripts/extra-libs.sh b/arch/um/scripts/extra-
> libs.sh
> new file mode 100644
> index 000000000000..0592485e0675
> --- /dev/null
> +++ b/arch/um/scripts/extra-libs.sh
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +
> +# This file should be included from link-vmlinux, not executed!!!
> +
> +if [ "${CONFIG_UML_NET_VDE}" = "y" ] ; then
> + UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lvde -lvdeplug"
> +fi
> +if [ "${CONFIG_UML_NET_PCAP}" = "y" ] ; then
> + UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lpcap"
> +fi
-lvde is not understood. I added the build dependency to libvde-dev on
Debian but that still did not help.
So instead I dropped it to get the build going. And my tests about
networking look fine.
The revised patch that I'm using is attached with this email.
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index 06495379fcd8..15f9e5096da0 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -90,11 +90,13 @@ vmlinux_link()
> -Wl,--end-group \
> ${@}"
>
> + . arch/um/scripts/extra-libs.sh
> +
> ${CC} ${CFLAGS_vmlinux} \
> -o ${output} \
> -Wl,-T,${lds} \
> ${objects} \
> - -lutil -lrt -lpthread
> + -lutil -lrt -lpthread ${UML_EXTRA_LIBS}
> rm -f linux
> fi
> }
--
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[-- Attachment #1.1.2: 08-fix-pcap-linkage.patch --]
[-- Type: text/x-patch, Size: 1270 bytes --]
PCAP and VDE network transports require linking with userspace
libraries. The current build system has no means of passing these
as arguments.
This patch adds a script to expand the library list for linking
for these transports as well as any future driver that needs to
rely on additional libraries on the userspace side.
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
---
| 10 ++++++++++
scripts/link-vmlinux.sh | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
create mode 100644 arch/um/scripts/extra-libs.sh
--- /dev/null
+++ b/arch/um/scripts/extra-libs.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# This file should be included from link-vmlinux, not executed!!!
+
+if [ "${CONFIG_UML_NET_VDE}" = "y" ] ; then
+ UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lvdeplug"
+fi
+if [ "${CONFIG_UML_NET_PCAP}" = "y" ] ; then
+ UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lpcap"
+fi
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -83,10 +83,12 @@
-Wl,--end-group \
${1}"
+ . arch/um/scripts/extra-libs.sh
+
${CC} ${CFLAGS_vmlinux} -o ${2} \
-Wl,-T,${lds} \
${objects} \
- -lutil -lrt -lpthread
+ -lutil -lrt -lpthread ${UML_EXTRA_LIBS}
rm -f linux
fi
}
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] um: Add back support for extra userspace libraries
2019-10-17 11:32 ` Ritesh Raj Sarraf
@ 2019-11-25 21:32 ` Richard Weinberger
2019-11-25 21:54 ` Anton Ivanov
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2019-11-25 21:32 UTC (permalink / raw)
To: Ritesh Raj Sarraf; +Cc: 938962, Richard Weinberger, linux-um, Anton Ivanov
On Thu, Oct 17, 2019 at 1:32 PM Ritesh Raj Sarraf <rrs@debian.org> wrote:
>
> Hello Anton,
>
> Thank you so much for working on this fix. I tested this patch and it
> works. Some comments below though.
>
> On Wed, 2019-10-16 at 15:13 +0100, Anton Ivanov wrote:
> > PCAP and VDE network transports require linking with userspace
> > libraries. The current build system has no means of passing these
> > as arguments.
> >
> > This patch adds a script to expand the library list for linking
> > for these transports as well as any future driver that needs to
> > rely on additional libraries on the userspace side.
> >
> > Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
> > ---
> > arch/um/scripts/extra-libs.sh | 10 ++++++++++
> > scripts/link-vmlinux.sh | 4 +++-
> > 2 files changed, 13 insertions(+), 1 deletion(-)
> > create mode 100644 arch/um/scripts/extra-libs.sh
> >
> > diff --git a/arch/um/scripts/extra-libs.sh b/arch/um/scripts/extra-
> > libs.sh
> > new file mode 100644
> > index 000000000000..0592485e0675
> > --- /dev/null
> > +++ b/arch/um/scripts/extra-libs.sh
> > @@ -0,0 +1,10 @@
> > +#!/bin/sh
> > +
> > +# This file should be included from link-vmlinux, not executed!!!
> > +
> > +if [ "${CONFIG_UML_NET_VDE}" = "y" ] ; then
> > + UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lvde -lvdeplug"
> > +fi
> > +if [ "${CONFIG_UML_NET_PCAP}" = "y" ] ; then
> > + UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lpcap"
> > +fi
>
> -lvde is not understood. I added the build dependency to libvde-dev on
> Debian but that still did not help.
>
> So instead I dropped it to get the build going. And my tests about
> networking look fine.
>
> The revised patch that I'm using is attached with this email.
>
>
> > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> > index 06495379fcd8..15f9e5096da0 100755
> > --- a/scripts/link-vmlinux.sh
> > +++ b/scripts/link-vmlinux.sh
> > @@ -90,11 +90,13 @@ vmlinux_link()
> > -Wl,--end-group \
> > ${@}"
> >
> > + . arch/um/scripts/extra-libs.sh
> > +
> > ${CC} ${CFLAGS_vmlinux} \
> > -o ${output} \
> > -Wl,-T,${lds} \
> > ${objects} \
> > - -lutil -lrt -lpthread
> > + -lutil -lrt -lpthread ${UML_EXTRA_LIBS}
> > rm -f linux
> > fi
> > }
I fear without an ACK from kbuild folks I'm unable to monkey this patch.
No need to worry, this one can be merged after -rc1.
--
Thanks,
//richard
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] um: Add back support for extra userspace libraries
2019-11-25 21:32 ` Richard Weinberger
@ 2019-11-25 21:54 ` Anton Ivanov
0 siblings, 0 replies; 5+ messages in thread
From: Anton Ivanov @ 2019-11-25 21:54 UTC (permalink / raw)
To: Richard Weinberger, Ritesh Raj Sarraf
Cc: Richard Weinberger, linux-um, 938962
On 25/11/2019 21:32, Richard Weinberger wrote:
> On Thu, Oct 17, 2019 at 1:32 PM Ritesh Raj Sarraf <rrs@debian.org> wrote:
>>
>> Hello Anton,
>>
>> Thank you so much for working on this fix. I tested this patch and it
>> works. Some comments below though.
>>
>> On Wed, 2019-10-16 at 15:13 +0100, Anton Ivanov wrote:
>>> PCAP and VDE network transports require linking with userspace
>>> libraries. The current build system has no means of passing these
>>> as arguments.
>>>
>>> This patch adds a script to expand the library list for linking
>>> for these transports as well as any future driver that needs to
>>> rely on additional libraries on the userspace side.
>>>
>>> Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
>>> ---
>>> arch/um/scripts/extra-libs.sh | 10 ++++++++++
>>> scripts/link-vmlinux.sh | 4 +++-
>>> 2 files changed, 13 insertions(+), 1 deletion(-)
>>> create mode 100644 arch/um/scripts/extra-libs.sh
>>>
>>> diff --git a/arch/um/scripts/extra-libs.sh b/arch/um/scripts/extra-
>>> libs.sh
>>> new file mode 100644
>>> index 000000000000..0592485e0675
>>> --- /dev/null
>>> +++ b/arch/um/scripts/extra-libs.sh
>>> @@ -0,0 +1,10 @@
>>> +#!/bin/sh
>>> +
>>> +# This file should be included from link-vmlinux, not executed!!!
>>> +
>>> +if [ "${CONFIG_UML_NET_VDE}" = "y" ] ; then
>>> + UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lvde -lvdeplug"
>>> +fi
>>> +if [ "${CONFIG_UML_NET_PCAP}" = "y" ] ; then
>>> + UML_EXTRA_LIBS="$UML_EXTRA_LIBS -lpcap"
>>> +fi
>>
>> -lvde is not understood. I added the build dependency to libvde-dev on
>> Debian but that still did not help.
>>
>> So instead I dropped it to get the build going. And my tests about
>> networking look fine.
>>
>> The revised patch that I'm using is attached with this email.
>>
>>
>>> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
>>> index 06495379fcd8..15f9e5096da0 100755
>>> --- a/scripts/link-vmlinux.sh
>>> +++ b/scripts/link-vmlinux.sh
>>> @@ -90,11 +90,13 @@ vmlinux_link()
>>> -Wl,--end-group \
>>> ${@}"
>>>
>>> + . arch/um/scripts/extra-libs.sh
>>> +
>>> ${CC} ${CFLAGS_vmlinux} \
>>> -o ${output} \
>>> -Wl,-T,${lds} \
>>> ${objects} \
>>> - -lutil -lrt -lpthread
>>> + -lutil -lrt -lpthread ${UML_EXTRA_LIBS}
>>> rm -f linux
>>> fi
>>> }
>
> I fear without an ACK from kbuild folks I'm unable to monkey this patch.
> No need to worry, this one can be merged after -rc1.
>
Ack, this needs to be forwarded to the kbuild maintainers as well.
--
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] um: Add back support for extra userspace libraries
2019-10-16 14:13 [PATCH] um: Add back support for extra userspace libraries Anton Ivanov
2019-10-17 11:32 ` Ritesh Raj Sarraf
@ 2019-12-07 1:24 ` Brendan Higgins
1 sibling, 0 replies; 5+ messages in thread
From: Brendan Higgins @ 2019-12-07 1:24 UTC (permalink / raw)
To: jdike, richard, anton.ivanov
Cc: Brendan Higgins, linux-um, linux-kernel, johannes.berg
> PCAP and VDE network transports require linking with userspace
> libraries. The current build system has no means of passing these
> as arguments.
>
> This patch adds a script to expand the library list for linking
> for these transports as well as any future driver that needs to
> rely on additional libraries on the userspace side.
>
> Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-07 1:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-16 14:13 [PATCH] um: Add back support for extra userspace libraries Anton Ivanov
2019-10-17 11:32 ` Ritesh Raj Sarraf
2019-11-25 21:32 ` Richard Weinberger
2019-11-25 21:54 ` Anton Ivanov
2019-12-07 1:24 ` Brendan Higgins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).