[Buildroot] [PATCH 2/3] toolchain-external: handle a special case where glibc check needs TOOLCHAIN_EXTERNAL_CFLAGS

Romain Naour romain.naour at openwide.fr
Sun Jul 13 18:45:59 UTC 2014


With the Sourcery Codebench standard edition, the sysroot returned
point to a non existant directory if no CFLAGS are specified.

Add a test to use ARCH_SYSROOT_DIR for glibc check if SYSROOT_DIR is not a
directory.

Signed-off-by: Romain Naour <romain.naour at openwide.fr>
---
 toolchain/toolchain-external/toolchain-external.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 8280b84..f6e51a1 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -477,7 +477,11 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
 	elif test "$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \
 		$(call check_musl,$${SYSROOT_DIR}) ; \
 	else \
-		$(call check_glibc,$${SYSROOT_DIR}) ; \
+		if test -d "$${SYSROOT_DIR}"  ; then \
+			$(call check_glibc,$${SYSROOT_DIR}) ; \
+		else \
+			$(call check_glibc,$${ARCH_SYSROOT_DIR}) ; \
+		fi \
 	fi
 endef
 
-- 
1.9.3




More information about the buildroot mailing list