toolchain: detect external glibc in merged /usr
PATCH v2 1/1 toolchain: detect external glibc in merged /usr
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.
---
Changes v1 -> v2:
- Reworded commit message (suggested by Yann)
toolchain/helpers.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/helpers.mk +1 -1
@@ -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; \
Signature · 1 line
2.11.0
PATCH v2 1/1 toolchain: detect external glibc in merged /usr
Cam, All,
On 2017-09-04 07:00 +1000, Cam Hutchison spake thusly:
Quoted 6 lines
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_glibcmacro limits the depth it is looking for the dynamic linker, and misses it when it is in/usr/libbecause it is too deep.
Quoted 7 lines
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 <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Thomas De Schampheleire <[email protected]>Cc "Yann E. MORIN" <[email protected]>
Regards,
Yann E. MORIN.
Quoted 23 lines
---
Changes v1 -> v2:
- Reworded commit message (suggested by Yann)toolchain/helpers.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)toolchain/helpers.mk +1
-1@@ -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; \Signature · 1 line
2.11.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
Arnout Vandecappelle
AppliedPATCH v2 1/1 toolchain: detect external glibc in merged /usr
In reply to Cam HutchisonQuoted 6 lines · Cam Hutchison
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_glibcmacro limits the depth it is looking for the dynamic linker, and misses it when it is in/usr/libbecause it is too deep.
Quoted 7 lines
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 <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Thomas De Schampheleire <[email protected]>Cc "Yann E. MORIN" <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Signature · 6 lines
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
PATCH v2 1/1 toolchain: detect external glibc in merged /usr
In reply to Cam HutchisonQuoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Cam" == Cam Hutchison <[email protected]> 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_glibcmacro limits the depth it is looking for the dynamic linker, and misses it when it is in/usr/libbecause 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.
Quoted 7 lines
Signed-off-by Cam Hutchison <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Thomas De Schampheleire <[email protected]>Cc "Yann E. MORIN" <[email protected]>---
Changes v1 -> v2:
- Reworded commit message (suggested by Yann)
Committed to 2017.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard