summaryrefslogtreecommitdiffstats
path: root/toolchain/helpers.mk
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-11-03 18:47:50 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2012-11-04 01:22:43 +0100
commit9fbdf062b93c6c2ed7e35897bcb0ad4c60f29d41 (patch)
tree2ac4115064b9d5f1537e9b8c450a0e9eea934f59 /toolchain/helpers.mk
parent5a457ff6cc3129af97f2fdcaa5f88bd5ff02b500 (diff)
downloadbuildroot-novena-9fbdf062b93c6c2ed7e35897bcb0ad4c60f29d41.tar.gz
buildroot-novena-9fbdf062b93c6c2ed7e35897bcb0ad4c60f29d41.zip
toolchain-external: improve glibc support to test availability of RPC
Basically, the BR2_TOOLCHAIN_EXTERNAL_GLIBC option no longer unconditionally selects BR2_TOOLCHAIN_HAS_NATIVE_RPC since there are glibc toolchains that don't have RPC support. All the predefined toolchain profiles are updated to take into account this change: for the moment, all glibc toolchains that have pre-defined toolchains have RPC support, but further patches in the series add pre-defined glibc toolchains that don't have RPC support. In the case of custom glibc toolchains, a question is asked to the user so that he can say whether the external glibc toolchain has RPC support or not. The validity of this configuration option is checked by the new check_glibc_rpc_feature function in helpers.mk. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/helpers.mk')
-rw-r--r--toolchain/helpers.mk27
1 files changed, 22 insertions, 5 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 34e9c179d..1509ff8b7 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -172,9 +172,10 @@ create_lib64_symlinks = \
(cd $(STAGING_DIR)/usr ; ln -s lib lib64)
#
-# Check the availability of a particular glibc feature. We assume that
-# all Buildroot toolchain options are supported by glibc, so we just
-# check that they are enabled.
+# Check the availability of a particular glibc feature. This function
+# is used to check toolchain options that are always supported by
+# glibc, so we simply check that the corresponding option is properly
+# enabled.
#
# $1: Buildroot option name
# $2: feature description
@@ -186,6 +187,22 @@ check_glibc_feature = \
fi
#
+# Check the availability of RPC support in a glibc toolchain
+#
+# $1: sysroot directory
+#
+check_glibc_rpc_feature = \
+ IS_IN_LIBC=`test -f $(1)/usr/include/rpc/rpc.h && echo y` ; \
+ if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \
+ echo "RPC support available in C library, please enable BR2_TOOLCHAIN_HAS_NATIVE_RPC" ; \
+ exit 1 ; \
+ fi ; \
+ if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \
+ echo "RPC support not available in C library, please disable BR2_TOOLCHAIN_HAS_NATIVE_RPC" ; \
+ exit 1 ; \
+ fi
+
+#
# Check the correctness of a glibc external toolchain configuration.
# 1. Check that the C library selected in Buildroot matches the one
# of the external toolchain
@@ -202,10 +219,10 @@ check_glibc = \
fi; \
$(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\
$(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\
- $(call check_glibc_feature,BR2_TOOLCHAIN_HAS_NATIVE_RPC,RPC support) ;\
$(call check_glibc_feature,BR2_ENABLE_LOCALE,Locale support) ;\
$(call check_glibc_feature,BR2_USE_MMU,MMU support) ;\
- $(call check_glibc_feature,BR2_USE_WCHAR,Wide char support)
+ $(call check_glibc_feature,BR2_USE_WCHAR,Wide char support) ;\
+ $(call check_glibc_rpc_feature,$${SYSROOT_DIR})
#
# Check the conformity of Buildroot configuration with regard to the