* [Buildroot] [PATCH] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+
@ 2013-09-16 17:39 Greg Beresford
2013-09-17 6:23 ` Arnout Vandecappelle
0 siblings, 1 reply; 8+ messages in thread
From: Greg Beresford @ 2013-09-16 17:39 UTC (permalink / raw)
To: buildroot
From: Henry Luis <henry@echelon.com>
Arch-specific libraries, including libc.so.6, are expected to be in a
subdirectory of /lib (e.g. /lib/arm-linux-gnueabihf). This patch
changes copy_toolchain_lib_root() in helper.mk to preserve the
toolchain sysroot's lib directory structure, except for SUPPORT_LIB_DIR
which are still copied directly under DESTDIR.
Signed-off-by: Greg Beresford <greg.beresford@zbdsolutions.com>
---
I've copied and reformatted Henry Luis' patch from the attachment to
https://bugs.busybox.net/show_bug.cgi?id=6452. I've given it a test
with Linaro ARM 2013.08 and CodeSourcery ARM 2013.05 toolchains and
it seems to work ok. It does result in a non-hf ld-linux.so being
copied in addition to the correct one on the linaro toolchain, but
the target still works. (I think that this is because buildroot checks
for both versions, and copies everything it successfully finds.)
Also, this is my first submission to anything using git. I've tried to
follow the instructions in the manual, so I hope everything is in order!
Regards
Greg
toolchain/helpers.mk | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 0e270ee..b2b1b2f 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -50,11 +50,12 @@ copy_toolchain_lib_root = \
LIB="$(strip $4)"; \
DESTDIR="$(strip $5)" ; \
\
+ pushd $${ARCH_SYSROOT_DIR} > /dev/null; \
for dir in \
- $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR}/$(TOOLCHAIN_EXTERNAL_PREFIX) \
- $${ARCH_SYSROOT_DIR}/usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} \
- $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR} \
- $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \
+ ./$${ARCH_LIB_DIR}/$(TOOLCHAIN_EXTERNAL_PREFIX) \
+ ./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} \
+ ./$${ARCH_LIB_DIR} \
+ ./usr/$${ARCH_LIB_DIR} \
$${SUPPORT_LIB_DIR} ; do \
LIBSPATH=`find $${dir} -maxdepth 1 -name "$${LIB}.*" 2>/dev/null` ; \
if test -n "$${LIBSPATH}" ; then \
@@ -66,18 +67,25 @@ copy_toolchain_lib_root = \
LIBDIR=`dirname $${LIBPATH}` ; \
while test \! -z "$${LIBNAME}" ; do \
LIBPATH=$${LIBDIR}/$${LIBNAME} ; \
- rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
- mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
+ if [ "$${dir}" = "$${SUPPORT_LIB_DIR}" ]; then \
+ DDIR=$${DESTDIR} ; \
+ else \
+ DDIR=$${LIBDIR} ; \
+ fi; \
+ rm -fr $(TARGET_DIR)/$${DDIR}/$${LIBNAME}; \
+ mkdir -p $(TARGET_DIR)/$${DDIR}; \
if test -h $${LIBPATH} ; then \
- cp -d $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/; \
+ cp -d $${LIBPATH} $(TARGET_DIR)/$${DDIR}/; \
elif test -f $${LIBPATH}; then \
- $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
+ $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DDIR}/$${LIBNAME}; \
else \
+ popd > /dev/null; \
exit -1; \
fi; \
LIBNAME="`readlink $${LIBPATH}`"; \
done; \
done; \
+ popd > /dev/null; \
\
echo -n
--
1.8.4
Disclaimer: This email contains proprietary information some or all of which may be legally privileged and/or is confidential. It is for the intended recipient only. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email. If you are not the intended recipient, you must not use, disclose, distribute, copy or print this email. Any views expressed in this message are those of the individual sender, except where the message states otherwise. ZBD Displays accepts no responsibility for any computer virus which might be transferred by way of this email. We may monitor all email communication through our networks. If you contact us by email, we may store your name and address to facilitate communication. ZBD Displays Ltd is registered in England and Wales, company registration number: 03929602. Registered Office: Malvern Hills Science Park, Geraldine Road, Malvern, Worcestershire, WR14 3SZ, UK
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
^ permalink raw reply related [flat|nested] 8+ messages in thread* [Buildroot] [PATCH] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+
2013-09-16 17:39 [Buildroot] [PATCH] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+ Greg Beresford
@ 2013-09-17 6:23 ` Arnout Vandecappelle
2013-09-17 9:44 ` [Buildroot] [PATCH v2] " Greg Beresford
0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2013-09-17 6:23 UTC (permalink / raw)
To: buildroot
On 16/09/13 19:39, Greg Beresford wrote:
> From: Henry Luis <henry@echelon.com>
>
> Arch-specific libraries, including libc.so.6, are expected to be in a
> subdirectory of /lib (e.g. /lib/arm-linux-gnueabihf). This patch
> changes copy_toolchain_lib_root() in helper.mk to preserve the
> toolchain sysroot's lib directory structure, except for SUPPORT_LIB_DIR
> which are still copied directly under DESTDIR.
>
> Signed-off-by: Greg Beresford <greg.beresford@zbdsolutions.com>
> ---
> I've copied and reformatted Henry Luis' patch from the attachment to
> https://bugs.busybox.net/show_bug.cgi?id=6452. I've given it a test
> with Linaro ARM 2013.08 and CodeSourcery ARM 2013.05 toolchains and
> it seems to work ok. It does result in a non-hf ld-linux.so being
> copied in addition to the correct one on the linaro toolchain, but
> the target still works. (I think that this is because buildroot checks
> for both versions, and copies everything it successfully finds.)
>
> Also, this is my first submission to anything using git. I've tried to
> follow the instructions in the manual, so I hope everything is in order!
The way you did it is perfect! I'm glad to see that documentation works :-)
>
> Regards
> Greg
>
> toolchain/helpers.mk | 24 ++++++++++++++++--------
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 0e270ee..b2b1b2f 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -50,11 +50,12 @@ copy_toolchain_lib_root = \
> LIB="$(strip $4)"; \
> DESTDIR="$(strip $5)" ; \
> \
> + pushd $${ARCH_SYSROOT_DIR} > /dev/null; \
I don't see why this pushd change is needed, and I think it makes
things even less clear.
Regards,
Arnout
> for dir in \
> - $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR}/$(TOOLCHAIN_EXTERNAL_PREFIX) \
> - $${ARCH_SYSROOT_DIR}/usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} \
> - $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR} \
> - $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \
> + ./$${ARCH_LIB_DIR}/$(TOOLCHAIN_EXTERNAL_PREFIX) \
> + ./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} \
> + ./$${ARCH_LIB_DIR} \
> + ./usr/$${ARCH_LIB_DIR} \
> $${SUPPORT_LIB_DIR} ; do \
> LIBSPATH=`find $${dir} -maxdepth 1 -name "$${LIB}.*" 2>/dev/null` ; \
> if test -n "$${LIBSPATH}" ; then \
> @@ -66,18 +67,25 @@ copy_toolchain_lib_root = \
> LIBDIR=`dirname $${LIBPATH}` ; \
> while test \! -z "$${LIBNAME}" ; do \
> LIBPATH=$${LIBDIR}/$${LIBNAME} ; \
> - rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
> - mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
> + if [ "$${dir}" = "$${SUPPORT_LIB_DIR}" ]; then \
> + DDIR=$${DESTDIR} ; \
> + else \
> + DDIR=$${LIBDIR} ; \
> + fi; \
> + rm -fr $(TARGET_DIR)/$${DDIR}/$${LIBNAME}; \
> + mkdir -p $(TARGET_DIR)/$${DDIR}; \
> if test -h $${LIBPATH} ; then \
> - cp -d $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/; \
> + cp -d $${LIBPATH} $(TARGET_DIR)/$${DDIR}/; \
> elif test -f $${LIBPATH}; then \
> - $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
> + $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DDIR}/$${LIBNAME}; \
> else \
> + popd > /dev/null; \
> exit -1; \
> fi; \
> LIBNAME="`readlink $${LIBPATH}`"; \
> done; \
> done; \
> + popd > /dev/null; \
> \
> echo -n
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 8+ messages in thread* [Buildroot] [PATCH v2] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+
2013-09-17 6:23 ` Arnout Vandecappelle
@ 2013-09-17 9:44 ` Greg Beresford
2013-09-17 17:01 ` Frank Hunleth
0 siblings, 1 reply; 8+ messages in thread
From: Greg Beresford @ 2013-09-17 9:44 UTC (permalink / raw)
To: buildroot
From: Henry Luis <henry@echelon.com>
Arch-specific libraries, including libc.so.6, are expected to be in a
subdirectory of /lib (e.g. /lib/arm-linux-gnueabihf). This patch
changes copy_toolchain_lib_root() in helper.mk to preserve the
toolchain sysroot's lib directory structure, except for SUPPORT_LIB_DIR
which are still copied directly under DESTDIR.
Signed-off-by: Greg Beresford <greg.beresford@zbdsolutions.com>
---
I couldn't initially see a particularly clear way of removing the pushd
and popd commands, but the below worked (once I figured out how escape
it properly.)
Regards
Greg
toolchain/helpers.mk | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 0e270ee..3b4900d 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -66,12 +66,17 @@ copy_toolchain_lib_root = \
LIBDIR=`dirname $${LIBPATH}` ; \
while test \! -z "$${LIBNAME}" ; do \
LIBPATH=$${LIBDIR}/$${LIBNAME} ; \
- rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
- mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
+ if [ "$${dir}" = "$${SUPPORT_LIB_DIR}" ]; then \
+ DDIR=$${DESTDIR} ; \
+ else \
+ DDIR=$${LIBDIR\#$${ARCH_SYSROOT_DIR}} ; \
+ fi; \
+ rm -fr $(TARGET_DIR)/$${DDIR}/$${LIBNAME}; \
+ mkdir -p $(TARGET_DIR)/$${DDIR}; \
if test -h $${LIBPATH} ; then \
- cp -d $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/; \
+ cp -d $${LIBPATH} $(TARGET_DIR)/$${DDIR}/; \
elif test -f $${LIBPATH}; then \
- $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
+ $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DDIR}/$${LIBNAME}; \
else \
exit -1; \
fi; \
--
1.8.4
Disclaimer: This email contains proprietary information some or all of which may be legally privileged and/or is confidential. It is for the intended recipient only. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email. If you are not the intended recipient, you must not use, disclose, distribute, copy or print this email. Any views expressed in this message are those of the individual sender, except where the message states otherwise. ZBD Displays accepts no responsibility for any computer virus which might be transferred by way of this email. We may monitor all email communication through our networks. If you contact us by email, we may store your name and address to facilitate communication. ZBD Displays Ltd is registered in England and Wales, company registration number: 03929602. Registered Office: Malvern Hills Science Park, Geraldine Road, Malvern, Worcestershire, WR14 3SZ, UK
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
^ permalink raw reply related [flat|nested] 8+ messages in thread* [Buildroot] [PATCH v2] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+
2013-09-17 9:44 ` [Buildroot] [PATCH v2] " Greg Beresford
@ 2013-09-17 17:01 ` Frank Hunleth
2013-09-17 18:50 ` Thomas Petazzoni
2013-09-18 9:32 ` Greg Beresford
0 siblings, 2 replies; 8+ messages in thread
From: Frank Hunleth @ 2013-09-17 17:01 UTC (permalink / raw)
To: buildroot
Hi Greg,
On Tue, Sep 17, 2013 at 5:44 AM, Greg Beresford
<greg.beresford@zbdsolutions.com> wrote:
> From: Henry Luis <henry@echelon.com>
>
> Arch-specific libraries, including libc.so.6, are expected to be in a
> subdirectory of /lib (e.g. /lib/arm-linux-gnueabihf). This patch
> changes copy_toolchain_lib_root() in helper.mk to preserve the
> toolchain sysroot's lib directory structure, except for SUPPORT_LIB_DIR
> which are still copied directly under DESTDIR.
>
> Signed-off-by: Greg Beresford <greg.beresford@zbdsolutions.com>
> ---
Thanks for posting the patch. I've been trying it out, but I think
that I'm running into a bigger problem of how the shared library
search path works now. I.e. /usr/lib is not searched by default
anymore even though that's where many buildroot packages install their
libraries.
Here's the new search path:
/lib/arm-linux-gnueabihf/
/usr/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/
/usr/lib/arm-linux-gnueabihf/tls/v7l/neon/
/usr/lib/arm-linux-gnueabihf/tls/v7l/vfp/
/usr/lib/arm-linux-gnueabihf/tls/v7l/
/usr/lib/arm-linux-gnueabihf/tls/neon/vfp/
/usr/lib/arm-linux-gnueabihf/tls/neon/
/usr/lib/arm-linux-gnueabihf/tls/vfp/
/usr/lib/arm-linux-gnueabihf/tls/
/usr/lib/arm-linux-gnueabihf/v7l/neon/vfp/
/usr/lib/arm-linux-gnueabihf/v7l/neon/
/usr/lib/arm-linux-gnueabihf/v7l/vfp/
/usr/lib/arm-linux-gnueabihf/v7l/
/usr/lib/arm-linux-gnueabihf/neon/vfp/
I can think of a few hacks to get around this, but is there a right
way that I should be configuring buildroot to deal with this
multiarch/multilib toolchain feature?
Thanks,
Frank
>
> I couldn't initially see a particularly clear way of removing the pushd
> and popd commands, but the below worked (once I figured out how escape
> it properly.)
>
> Regards
> Greg
>
> toolchain/helpers.mk | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 0e270ee..3b4900d 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -66,12 +66,17 @@ copy_toolchain_lib_root = \
> LIBDIR=`dirname $${LIBPATH}` ; \
> while test \! -z "$${LIBNAME}" ; do \
> LIBPATH=$${LIBDIR}/$${LIBNAME} ; \
> - rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
> - mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
> + if [ "$${dir}" = "$${SUPPORT_LIB_DIR}" ]; then \
> + DDIR=$${DESTDIR} ; \
> + else \
> + DDIR=$${LIBDIR\#$${ARCH_SYSROOT_DIR}} ; \
> + fi; \
> + rm -fr $(TARGET_DIR)/$${DDIR}/$${LIBNAME}; \
> + mkdir -p $(TARGET_DIR)/$${DDIR}; \
> if test -h $${LIBPATH} ; then \
> - cp -d $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/; \
> + cp -d $${LIBPATH} $(TARGET_DIR)/$${DDIR}/; \
> elif test -f $${LIBPATH}; then \
> - $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
> + $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DDIR}/$${LIBNAME}; \
> else \
> exit -1; \
> fi; \
> --
> 1.8.4
>
>
>
> Disclaimer: This email contains proprietary information some or all of which may be legally privileged and/or is confidential. It is for the intended recipient only. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email. If you are not the intended recipient, you must not use, disclose, distribute, copy or print this email. Any views expressed in this message are those of the individual sender, except where the message states otherwise. ZBD Displays accepts no responsibility for any computer virus which might be transferred by way of this email. We may monitor all email communication through our networks. If you contact us by email, we may store your name and address to facilitate communication. ZBD Displays Ltd is registered in England and Wales, company registration number: 03929602. Registered Office: Malvern Hills Science Park, Geraldine Road, Malvern, Worcestershire, WR14 3SZ, UK
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
Frank Hunleth
Troodon Software LLC
http://troodon-software.com/
^ permalink raw reply [flat|nested] 8+ messages in thread* [Buildroot] [PATCH v2] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+
2013-09-17 17:01 ` Frank Hunleth
@ 2013-09-17 18:50 ` Thomas Petazzoni
2013-09-27 15:06 ` Frank Hunleth
2013-09-18 9:32 ` Greg Beresford
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2013-09-17 18:50 UTC (permalink / raw)
To: buildroot
Dear Frank Hunleth,
On Tue, 17 Sep 2013 13:01:14 -0400, Frank Hunleth wrote:
> Thanks for posting the patch. I've been trying it out, but I think
> that I'm running into a bigger problem of how the shared library
> search path works now. I.e. /usr/lib is not searched by default
> anymore even though that's where many buildroot packages install their
> libraries.
>
> Here's the new search path:
>
> /lib/arm-linux-gnueabihf/
> /usr/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/
> /usr/lib/arm-linux-gnueabihf/tls/v7l/neon/
> /usr/lib/arm-linux-gnueabihf/tls/v7l/vfp/
> /usr/lib/arm-linux-gnueabihf/tls/v7l/
> /usr/lib/arm-linux-gnueabihf/tls/neon/vfp/
> /usr/lib/arm-linux-gnueabihf/tls/neon/
> /usr/lib/arm-linux-gnueabihf/tls/vfp/
> /usr/lib/arm-linux-gnueabihf/tls/
> /usr/lib/arm-linux-gnueabihf/v7l/neon/vfp/
> /usr/lib/arm-linux-gnueabihf/v7l/neon/
> /usr/lib/arm-linux-gnueabihf/v7l/vfp/
> /usr/lib/arm-linux-gnueabihf/v7l/
> /usr/lib/arm-linux-gnueabihf/neon/vfp/
>
> I can think of a few hacks to get around this, but is there a right
> way that I should be configuring buildroot to deal with this
> multiarch/multilib toolchain feature?
I haven't had the time yet to try the patch and experiment with this
problem specifically, but I believe one of the possible solutions is to
continue to install the libraries in /lib and /usr/lib, and
creates /lib/arm-linux-gnueabihf/ -> /lib
and /usr/lib/arm-linux-gnueabihf/ -> /usr/lib symbolic links.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+
2013-09-17 18:50 ` Thomas Petazzoni
@ 2013-09-27 15:06 ` Frank Hunleth
0 siblings, 0 replies; 8+ messages in thread
From: Frank Hunleth @ 2013-09-27 15:06 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Tue, Sep 17, 2013 at 2:50 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Frank Hunleth,
>
> On Tue, 17 Sep 2013 13:01:14 -0400, Frank Hunleth wrote:
>
>> Thanks for posting the patch. I've been trying it out, but I think
>> that I'm running into a bigger problem of how the shared library
>> search path works now. I.e. /usr/lib is not searched by default
>> anymore even though that's where many buildroot packages install their
>> libraries.
>>
>> Here's the new search path:
>>
>> /lib/arm-linux-gnueabihf/
>> /usr/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/
>> /usr/lib/arm-linux-gnueabihf/tls/v7l/neon/
>> /usr/lib/arm-linux-gnueabihf/tls/v7l/vfp/
>> /usr/lib/arm-linux-gnueabihf/tls/v7l/
>> /usr/lib/arm-linux-gnueabihf/tls/neon/vfp/
>> /usr/lib/arm-linux-gnueabihf/tls/neon/
>> /usr/lib/arm-linux-gnueabihf/tls/vfp/
>> /usr/lib/arm-linux-gnueabihf/tls/
>> /usr/lib/arm-linux-gnueabihf/v7l/neon/vfp/
>> /usr/lib/arm-linux-gnueabihf/v7l/neon/
>> /usr/lib/arm-linux-gnueabihf/v7l/vfp/
>> /usr/lib/arm-linux-gnueabihf/v7l/
>> /usr/lib/arm-linux-gnueabihf/neon/vfp/
>>
>> I can think of a few hacks to get around this, but is there a right
>> way that I should be configuring buildroot to deal with this
>> multiarch/multilib toolchain feature?
>
> I haven't had the time yet to try the patch and experiment with this
> problem specifically, but I believe one of the possible solutions is to
> continue to install the libraries in /lib and /usr/lib, and
> creates /lib/arm-linux-gnueabihf/ -> /lib
> and /usr/lib/arm-linux-gnueabihf/ -> /usr/lib symbolic links.
I'm not sure if you had a chance to revisit this, but I wanted to
report that using symlinks works. Here's what I've temporarily added
to my rootfs post build script:
if [ -d $TARGETDIR/lib/arm-linux-gnueabihf -a ! -h
$TARGETDIR/lib/arm-linux-gnueabihf ]; then
mv $TARGETDIR/lib/arm-linux-gnueabihf/* $TARGETDIR/lib
rm -fr $TARGETDIR/lib/arm-linux-gnueabihf
rm -fr $TARGETDIR/lib/arm-linux-gnueabi
ln -fs . $TARGETDIR/lib/arm-linux-gnueabihf
ln -fs . $TARGETDIR/usr/lib/arm-linux-gnueabihf
fi
I'm not sure how best to integrate this with buildroot, but I've
haven't had much time to work on it. I'm hoping that this may be
helpful to someone fixing armhf builds when using the external
toolchain option.
Frank
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
--
Frank Hunleth
Troodon Software LLC
http://troodon-software.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+
2013-09-17 17:01 ` Frank Hunleth
2013-09-17 18:50 ` Thomas Petazzoni
@ 2013-09-18 9:32 ` Greg Beresford
2013-09-18 12:35 ` Frank Hunleth
1 sibling, 1 reply; 8+ messages in thread
From: Greg Beresford @ 2013-09-18 9:32 UTC (permalink / raw)
To: buildroot
Hi Frank
> -----Original Message-----
> From: Frank Hunleth [mailto:fhunleth at troodon-software.com]
> Sent: 17 September 2013 18:01
> To: Greg Beresford
> Cc: buildroot; Henry Luis
> Subject: Re: [Buildroot] [PATCH v2] Add support for eglibc-2.17 multiarch
> layout, from Linaro 2013.07+
>
> Hi Greg,
>
> On Tue, Sep 17, 2013 at 5:44 AM, Greg Beresford
> <greg.beresford@zbdsolutions.com> wrote:
> > From: Henry Luis <henry@echelon.com>
> >
> > Arch-specific libraries, including libc.so.6, are expected to be in a
> > subdirectory of /lib (e.g. /lib/arm-linux-gnueabihf). This patch
> > changes copy_toolchain_lib_root() in helper.mk to preserve the
> > toolchain sysroot's lib directory structure, except for SUPPORT_LIB_DIR
> > which are still copied directly under DESTDIR.
> >
> > Signed-off-by: Greg Beresford <greg.beresford@zbdsolutions.com>
> > ---
>
> Thanks for posting the patch. I've been trying it out, but I think
> that I'm running into a bigger problem of how the shared library
> search path works now. I.e. /usr/lib is not searched by default
> anymore even though that's where many buildroot packages install their
> libraries.
>
> Here's the new search path:
>
> /lib/arm-linux-gnueabihf/
> /usr/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/
> /usr/lib/arm-linux-gnueabihf/tls/v7l/neon/
> /usr/lib/arm-linux-gnueabihf/tls/v7l/vfp/
> /usr/lib/arm-linux-gnueabihf/tls/v7l/
> /usr/lib/arm-linux-gnueabihf/tls/neon/vfp/
> /usr/lib/arm-linux-gnueabihf/tls/neon/
> /usr/lib/arm-linux-gnueabihf/tls/vfp/
> /usr/lib/arm-linux-gnueabihf/tls/
> /usr/lib/arm-linux-gnueabihf/v7l/neon/vfp/
> /usr/lib/arm-linux-gnueabihf/v7l/neon/
> /usr/lib/arm-linux-gnueabihf/v7l/vfp/
> /usr/lib/arm-linux-gnueabihf/v7l/
> /usr/lib/arm-linux-gnueabihf/neon/vfp/
>
> I can think of a few hacks to get around this, but is there a right
> way that I should be configuring buildroot to deal with this
> multiarch/multilib toolchain feature?
>
I've investigated a little more and found that the only reason my setup works is because one of my packages is running ldconfig in my target directory, so the dynamic linker is finding my libraries correctly because they're all listed in /etc/ld.so.cache.
If we're not going to make use of the multi-abi feature of the recent linaro toolchains we should probably have a symlink-based solution as Thomas has suggested.
Regards
Greg
Disclaimer: This email contains proprietary information some or all of which may be legally privileged and/or is confidential. It is for the intended recipient only. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email. If you are not the intended recipient, you must not use, disclose, distribute, copy or print this email. Any views expressed in this message are those of the individual sender, except where the message states otherwise. ZBD Displays accepts no responsibility for any computer virus which might be transferred by way of this email. We may monitor all email communication through our networks. If you contact us by email, we may store your name and address to facilitate communication. ZBD Displays Ltd is registered in England and Wales, company registration number: 03929602. Registered Office: Malvern Hills Science Park, Geraldine Road, Malvern, Worcestershire, WR14 3SZ, UK
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+
2013-09-18 9:32 ` Greg Beresford
@ 2013-09-18 12:35 ` Frank Hunleth
0 siblings, 0 replies; 8+ messages in thread
From: Frank Hunleth @ 2013-09-18 12:35 UTC (permalink / raw)
To: buildroot
Hi Greg and Thomas,
On Wed, Sep 18, 2013 at 5:32 AM, Greg Beresford
<greg.beresford@zbdsolutions.com> wrote:
> Hi Frank
>
>> -----Original Message-----
>> From: Frank Hunleth [mailto:fhunleth at troodon-software.com]
>> Sent: 17 September 2013 18:01
>> To: Greg Beresford
>> Cc: buildroot; Henry Luis
>> Subject: Re: [Buildroot] [PATCH v2] Add support for eglibc-2.17 multiarch
>> layout, from Linaro 2013.07+
>>
>> Hi Greg,
>>
>> On Tue, Sep 17, 2013 at 5:44 AM, Greg Beresford
>> <greg.beresford@zbdsolutions.com> wrote:
>> > From: Henry Luis <henry@echelon.com>
>> >
>> > Arch-specific libraries, including libc.so.6, are expected to be in a
>> > subdirectory of /lib (e.g. /lib/arm-linux-gnueabihf). This patch
>> > changes copy_toolchain_lib_root() in helper.mk to preserve the
>> > toolchain sysroot's lib directory structure, except for SUPPORT_LIB_DIR
>> > which are still copied directly under DESTDIR.
>> >
>> > Signed-off-by: Greg Beresford <greg.beresford@zbdsolutions.com>
>> > ---
>>
>> Thanks for posting the patch. I've been trying it out, but I think
>> that I'm running into a bigger problem of how the shared library
>> search path works now. I.e. /usr/lib is not searched by default
>> anymore even though that's where many buildroot packages install their
>> libraries.
>>
>> Here's the new search path:
>>
>> /lib/arm-linux-gnueabihf/
>> /usr/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/
>> /usr/lib/arm-linux-gnueabihf/tls/v7l/neon/
>> /usr/lib/arm-linux-gnueabihf/tls/v7l/vfp/
>> /usr/lib/arm-linux-gnueabihf/tls/v7l/
>> /usr/lib/arm-linux-gnueabihf/tls/neon/vfp/
>> /usr/lib/arm-linux-gnueabihf/tls/neon/
>> /usr/lib/arm-linux-gnueabihf/tls/vfp/
>> /usr/lib/arm-linux-gnueabihf/tls/
>> /usr/lib/arm-linux-gnueabihf/v7l/neon/vfp/
>> /usr/lib/arm-linux-gnueabihf/v7l/neon/
>> /usr/lib/arm-linux-gnueabihf/v7l/vfp/
>> /usr/lib/arm-linux-gnueabihf/v7l/
>> /usr/lib/arm-linux-gnueabihf/neon/vfp/
>>
>> I can think of a few hacks to get around this, but is there a right
>> way that I should be configuring buildroot to deal with this
>> multiarch/multilib toolchain feature?
>>
>
> I've investigated a little more and found that the only reason my setup works is because one of my packages is running ldconfig in my target directory, so the dynamic linker is finding my libraries correctly because they're all listed in /etc/ld.so.cache.
>
> If we're not going to make use of the multi-abi feature of the recent linaro toolchains we should probably have a symlink-based solution as Thomas has suggested.
>
I agree. Symlinks sound good to me.
Frank
> Regards
> Greg
>
>
> Disclaimer: This email contains proprietary information some or all of which may be legally privileged and/or is confidential. It is for the intended recipient only. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email. If you are not the intended recipient, you must not use, disclose, distribute, copy or print this email. Any views expressed in this message are those of the individual sender, except where the message states otherwise. ZBD Displays accepts no responsibility for any computer virus which might be transferred by way of this email. We may monitor all email communication through our networks. If you contact us by email, we may store your name and address to facilitate communication. ZBD Displays Ltd is registered in England and Wales, company registration number: 03929602. Registered Office: Malvern Hills Science Park, Geraldine Road, Malvern, Worcestershire, WR14 3SZ, UK
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-09-27 15:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16 17:39 [Buildroot] [PATCH] Add support for eglibc-2.17 multiarch layout, from Linaro 2013.07+ Greg Beresford
2013-09-17 6:23 ` Arnout Vandecappelle
2013-09-17 9:44 ` [Buildroot] [PATCH v2] " Greg Beresford
2013-09-17 17:01 ` Frank Hunleth
2013-09-17 18:50 ` Thomas Petazzoni
2013-09-27 15:06 ` Frank Hunleth
2013-09-18 9:32 ` Greg Beresford
2013-09-18 12:35 ` Frank Hunleth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox