* [Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in merged /usr
@ 2017-09-03 21:00 Cam Hutchison
2017-09-04 16:09 ` Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Cam Hutchison @ 2017-09-03 21:00 UTC (permalink / raw)
To: buildroot
When using an external toolchain that was built with Buildroot and a
merged /usr, the dynamic linker is actually in /usr/lib.
But the check_glibc macro limits the depth it is looking for the dynamic
linker, and misses it when it is in /usr/lib because it is too deep.
We could fix that in two ways: increase the depth in which we look
for it, or follow symlinks. We choose the second solution.
Signed-off-by: Cam Hutchison <camh@xdna.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1 -> v2:
- Reworded commit message (suggested by Yann)
toolchain/helpers.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index e9e36d2069..63ef6fb4b0 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -227,7 +227,7 @@ check_glibc_rpc_feature = \
#
check_glibc = \
SYSROOT_DIR="$(strip $1)"; \
- if test `find $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \
+ if test `find -L $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \
echo "Incorrect selection of the C library"; \
exit -1; \
fi; \
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in merged /usr
2017-09-03 21:00 [Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in merged /usr Cam Hutchison
@ 2017-09-04 16:09 ` Yann E. MORIN
2017-09-19 21:00 ` Arnout Vandecappelle
2017-10-16 21:58 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2017-09-04 16:09 UTC (permalink / raw)
To: buildroot
Cam, All,
On 2017-09-04 07:00 +1000, Cam Hutchison spake thusly:
> When using an external toolchain that was built with Buildroot and a
> merged /usr, the dynamic linker is actually in /usr/lib.
>
> But the check_glibc macro limits the depth it is looking for the dynamic
> linker, and misses it when it is in /usr/lib because it is too deep.
>
> We could fix that in two ways: increase the depth in which we look
> for it, or follow symlinks. We choose the second solution.
>
> Signed-off-by: Cam Hutchison <camh@xdna.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> Changes v1 -> v2:
> - Reworded commit message (suggested by Yann)
>
> toolchain/helpers.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index e9e36d2069..63ef6fb4b0 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -227,7 +227,7 @@ check_glibc_rpc_feature = \
> #
> check_glibc = \
> SYSROOT_DIR="$(strip $1)"; \
> - if test `find $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \
> + if test `find -L $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \
> echo "Incorrect selection of the C library"; \
> exit -1; \
> fi; \
> --
> 2.11.0
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in merged /usr
2017-09-03 21:00 [Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in merged /usr Cam Hutchison
2017-09-04 16:09 ` Yann E. MORIN
@ 2017-09-19 21:00 ` Arnout Vandecappelle
2017-10-16 21:58 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2017-09-19 21:00 UTC (permalink / raw)
To: buildroot
On 03-09-17 23:00, Cam Hutchison wrote:
> When using an external toolchain that was built with Buildroot and a
> merged /usr, the dynamic linker is actually in /usr/lib.
>
> But the check_glibc macro limits the depth it is looking for the dynamic
> linker, and misses it when it is in /usr/lib because it is too deep.
>
> We could fix that in two ways: increase the depth in which we look
> for it, or follow symlinks. We choose the second solution.
>
> Signed-off-by: Cam Hutchison <camh@xdna.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Applied to master, thanks.
Regards,
Arnout
--
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: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in merged /usr
2017-09-03 21:00 [Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in merged /usr Cam Hutchison
2017-09-04 16:09 ` Yann E. MORIN
2017-09-19 21:00 ` Arnout Vandecappelle
@ 2017-10-16 21:58 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2017-10-16 21:58 UTC (permalink / raw)
To: buildroot
>>>>> "Cam" == Cam Hutchison <camh@xdna.net> writes:
> When using an external toolchain that was built with Buildroot and a
> merged /usr, the dynamic linker is actually in /usr/lib.
> But the check_glibc macro limits the depth it is looking for the dynamic
> linker, and misses it when it is in /usr/lib because it is too deep.
> We could fix that in two ways: increase the depth in which we look
> for it, or follow symlinks. We choose the second solution.
> Signed-off-by: Cam Hutchison <camh@xdna.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> Changes v1 -> v2:
> - Reworded commit message (suggested by Yann)
Committed to 2017.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-16 21:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-03 21:00 [Buildroot] [PATCH v2 1/1] toolchain: detect external glibc in merged /usr Cam Hutchison
2017-09-04 16:09 ` Yann E. MORIN
2017-09-19 21:00 ` Arnout Vandecappelle
2017-10-16 21:58 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.