Skip to contentSkip to conversation

toolchain: have check_glibc to search deeper for ld-linux

PATCH New Jean-Mickael Guerin 3 participants 3 messages Oct 12, 2012 – Oct 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain: have check_glibc to search deeper for ld-linux

ld-linux*.so may not be present in lib/ directory, it could be in lib32 and/or lib64 only. But check_glibc reports "Incorrect selection of the C library" in this case, which is not true.
Fixed by extending the search to SYSROOT/*/*.

---
 toolchain/helpers.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/helpers.mk +1 -1
index d5ab91b..497cfff 100644
@@ -196,7 +196,7 @@ check_glibc_feature = \
 #
 check_glibc = \
 	SYSROOT_DIR="$(strip $1)"; \
-	if test `find $${SYSROOT_DIR}/lib/ -maxdepth 1 -name 'ld-linux*.so.*' -o -name 'ld.so.*' | wc -l` -eq 0 ; then \
+	if test `find $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' | wc -l` -eq 0 ; then \
 		echo "Incorrect selection of the C library"; \
 		exit -1; \
 	fi; \
Signature · 1 line
1.7.12
#1 lore raw

PATCH 1/1 toolchain: have check_glibc to search deeper for ld-linux

Quoted 7 lines · Jean-Mickael Guerin

ld-linux*.so may not be present in lib/ directory, it could be in lib32 and/or lib64 only. But check_glibc reports "Incorrect selection of the C library" in this case, which is not true.
Fixed by extending the search to SYSROOT/*/*.

Quoted 9 lines
---
  toolchain/helpers.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/helpers.mk +0 -0
index d5ab91b..497cfff 100644

toolchain/helpers.mk check_glibc_feature = \ · line 199

Quoted 5 lines
toolchain/helpers.mk +1 -1
@@ -196,7 +196,7 @@ check_glibc_feature = \
  #
  check_glibc = \
  	SYSROOT_DIR="$(strip $1)"; \
-	if test `find $${SYSROOT_DIR}/lib/ -maxdepth 1 -name 'ld-linux*.so.*' -o -name 'ld.so.*' | wc -l` -eq 0 ; then \
+	if test `find $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' | wc -l` -eq 0 ; then \

Maybe it's better to search in /lib*/ ? Not that it really matters that much.

Regards,
Arnout

Quoted 3 lines
toolchain/helpers.mk +0 -0
  		echo "Incorrect selection of the C library"; \
  		exit -1; \
  	fi; \
Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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
#2 lore raw

PATCH 1/1 toolchain: have check_glibc to search deeper for ld-linux

In reply to Jean-Mickael Guerin
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jean-Mickael" == Jean-Mickael Guerin <[email protected]> writes:

Jean-Mickael> ld-linux*.so may not be present in lib/ directory, it could be Jean-Mickael> in lib32 and/or lib64 only. But check_glibc reports Jean-Mickael> "Incorrect selection of the C library" in this case, which is Jean-Mickael> not true.
Jean-Mickael> Fixed by extending the search to SYSROOT/*/*.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard