All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v3
@ 2010-07-12 20:46 Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 1/5] toolchain: move helper functions from external toolchain Yann E. MORIN
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Yann E. MORIN @ 2010-07-12 20:46 UTC (permalink / raw)
  To: buildroot

Hello All!

These are preparatory work on toolchain, laying ground to later add
crosstool-NG as a backend. Currently, these are rather an RFC, even
if it works OK for me.

Changes since v2:
- rebased againts latest tree
- enhance commit message for 3rd patch

Changes since v1:
- rebased against latest tree
- patches formatted to detect renames/copies

Yann E. MORIN (5):
      toolchain: move helper functions from external toolchain
      toolchain: rename external toolchain dir
      toolchain: move makefile includes
      toolchain: move buildroot config files
      toolchain: rename base target for external toolchains

 Makefile                                           |   17 +-
 toolchain/Config.in                                |   16 +-
 toolchain/external-toolchain/ext-tool.mk           |  356 --------------------
 toolchain/helpers.mk                               |  244 ++++++++++++++
 toolchain/toolchain-buildroot.mk                   |   12 +
 .../{Config.in.1 => toolchain-buildroot/Config.in} |    2 +-
 toolchain/toolchain-buildroot/Config.in.2          |   37 ++
 toolchain/{Config.in.2 => toolchain-common.in}     |   46 +--
 toolchain/toolchain-external.mk                    |   14 +
 .../Config.in                                      |    0
 .../Config.in.2                                    |    0
 toolchain/toolchain-external/ext-tool.mk           |  115 +++++++
 12 files changed, 440 insertions(+), 419 deletions(-)
 delete mode 100644 toolchain/external-toolchain/ext-tool.mk
 create mode 100644 toolchain/helpers.mk
 create mode 100644 toolchain/toolchain-buildroot.mk
 rename toolchain/{Config.in.1 => toolchain-buildroot/Config.in} (82%)
 create mode 100644 toolchain/toolchain-buildroot/Config.in.2
 rename toolchain/{Config.in.2 => toolchain-common.in} (84%)
 create mode 100644 toolchain/toolchain-external.mk
 rename toolchain/{external-toolchain => toolchain-external}/Config.in (100%)
 rename toolchain/{external-toolchain => toolchain-external}/Config.in.2 (100%)
 create mode 100644 toolchain/toolchain-external/ext-tool.mk

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 1/5] toolchain: move helper functions from external toolchain
  2010-07-12 20:46 [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v3 Yann E. MORIN
@ 2010-07-12 20:46 ` Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 2/5] toolchain: rename external toolchain dir Yann E. MORIN
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2010-07-12 20:46 UTC (permalink / raw)
  To: buildroot

The helper functions used for external toolchains may also be useful
to alternate toolchain backends (currently, the external toolchain is
the sole user).

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
---
 Makefile                                 |    1 +
 toolchain/external-toolchain/ext-tool.mk |  241 -----------------------------
 toolchain/helpers.mk                     |  244 ++++++++++++++++++++++++++++++
 3 files changed, 245 insertions(+), 241 deletions(-)
 create mode 100644 toolchain/helpers.mk

diff --git a/Makefile b/Makefile
index d6bcb36..e02b7db 100644
--- a/Makefile
+++ b/Makefile
@@ -306,6 +306,7 @@ include toolchain/mklibs/mklibs.mk
 include toolchain/sstrip/sstrip.mk
 include toolchain/uClibc/uclibc.mk
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
+include toolchain/helpers.mk
 include toolchain/*/*.mk
 endif
 
diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 40e3a52..6251582 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -37,247 +37,6 @@
 #  cross-compiler binaries remains external, all libraries and headers
 #  are imported into the Buildroot tree.
 
-#
-# Copy a toolchain library and its symbolic links from the sysroot
-# directory to the target directory. Also optionaly strips the
-# library.
-#
-# Most toolchains have their libraries either in /lib or /usr/lib
-# relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however,
-# have basic libraries in /lib, and libstdc++/libgcc_s in
-# /usr/<target-name>/lib(64).
-#
-# $1: arch specific sysroot directory
-# $2: library name
-# $3: destination directory of the libary, relative to $(TARGET_DIR)
-# $4: strip (y|n), default is to strip
-#
-copy_toolchain_lib_root = \
-	ARCH_SYSROOT_DIR="$(strip $1)"; \
-	LIB="$(strip $2)"; \
-	DESTDIR="$(strip $3)" ; \
-	STRIP="$(strip $4)"; \
- \
-	LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
-		find -L . -path "./lib/$${LIB}.*"     -o \
-			  -path "./usr/lib/$${LIB}.*" -o \
-			  -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
-		)` ; \
-	for FILE in $${LIBS} ; do \
-		LIB=`basename $${FILE}`; \
-		LIBDIR=`dirname $${FILE}` ; \
-		while test \! -z "$${LIB}"; do \
-			FULLPATH="$${ARCH_SYSROOT_DIR}/$${LIBDIR}/$${LIB}" ; \
-			rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \
-			mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
-			if test -h $${FULLPATH} ; then \
-				cp -d $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/; \
-			elif test -f $${FULLPATH}; then \
-				$(INSTALL) -D -m0755 $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \
-				case "$${STRIP}" in \
-				(0 | n | no) \
-;; \
-				(*) \
-					$(TARGET_CROSS)strip "$(TARGET_DIR)/$${DESTDIR}/$${LIB}"; \
-;; \
-				esac; \
-			else \
-				exit -1; \
-			fi; \
-			LIB="`readlink $${FULLPATH}`"; \
-		done; \
-	done; \
- \
-	echo -n
-
-#
-# Copy the full external toolchain sysroot directory to the staging
-# dir. The operation of this function is rendered a little bit
-# complicated by the support for multilib toolchains.
-#
-# We start by copying etc, lib, sbin and usr from the sysroot of the
-# selected architecture variant (as pointed by ARCH_SYSROOT_DIR). This
-# allows to import into the staging directory the C library and
-# companion libraries for the correct architecture variant. We
-# explictly only copy etc, lib, sbin and usr since other directories
-# might exist for other architecture variants (on Codesourcery
-# toolchain, the sysroot for the default architecture variant contains
-# the armv4t and thumb2 subdirectories, which are the sysroot for the
-# corresponding architecture variants), and we don't want to import
-# them.
-#
-# Then, if the selected architecture variant is not the default one
-# (i.e, if SYSROOT_DIR != ARCH_SYSROOT_DIR), then we :
-#
-#  * Import the header files from the default architecture
-#    variant. Header files are typically shared between the sysroots
-#    for the different architecture variants. If we use the
-#    non-default one, header files were not copied by the previous
-#    step, so we copy them here from the sysroot of the default
-#    architecture variant.
-#
-#  * Create a symbolic link that matches the name of the subdirectory
-#    for the architecture variant in the original sysroot. This is
-#    required as the compiler will by default look in
-#    sysroot_dir/arch_variant/ for libraries and headers, when the
-#    non-default architecture variant is used. Without this, the
-#    compiler fails to find libraries and headers.
-#
-# $1: main sysroot directory of the toolchain
-# $2: arch specific sysroot directory of the toolchain
-# $3: arch specific subdirectory in the sysroot
-#
-copy_toolchain_sysroot = \
-	SYSROOT_DIR="$(strip $1)"; \
-	ARCH_SYSROOT_DIR="$(strip $2)"; \
-	ARCH_SUBDIR="$(strip $3)"; \
-	for i in etc lib sbin usr ; do \
-		if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
-			cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
-		fi ; \
-	done ; \
-	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
-		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
-			cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \
-		fi ; \
-		ln -s . $(STAGING_DIR)/$(ARCH_SUBDIR) ; \
-	fi ; \
-	find $(STAGING_DIR) -type d | xargs chmod 755
-
-#
-# Create lib64 -> lib and usr/lib64 -> usr/lib symbolic links in the
-# target and staging directories. This is needed for some 64 bits
-# toolchains such as the Crosstool-NG toolchains, for which the path
-# to the dynamic loader and other libraries is /lib64, but the
-# libraries are stored in /lib.
-#
-create_lib64_symlinks = \
-	(cd $(TARGET_DIR) ;      ln -s lib lib64) ; \
-	(cd $(TARGET_DIR)/usr ;  ln -s lib lib64) ; \
-	(cd $(STAGING_DIR) ;     ln -s lib lib64) ; \
-	(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.
-#
-# $1: Buildroot option name
-# $2: feature description
-#
-check_glibc_feature = \
-	if [ x$($(1)) != x"y" ] ; then \
-		echo "$(2) available in C library, please enable $(1)" ; \
-		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
-#  2. Check that all the C library-related features are enabled in the
-#     config, since glibc always supports all of them
-#
-# $1: sysroot directory
-#
-check_glibc = \
-	SYSROOT_DIR="$(strip $1)"; \
-	if ! test -f $${SYSROOT_DIR}/lib/ld-linux*.so.* -o -f $${SYSROOT_DIR}/lib/ld.so.* ; then \
-		echo "Incorrect selection of the C library"; \
-		exit -1; \
-	fi; \
-	$(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\
-	$(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\
-	$(call check_glibc_feature,BR2_INET_RPC,RPC support) ;\
-	$(call check_glibc_feature,BR2_ENABLE_LOCALE,Locale support) ;\
-	$(call check_glibc_feature,BR2_USE_WCHAR,Wide char support) ;\
-	$(call check_glibc_feature,BR2_PROGRAM_INVOCATION,Program invocation support)
-
-#
-# Check the conformity of Buildroot configuration with regard to the
-# uClibc configuration of the external toolchain, for a particular
-# feature.
-#
-# $1: uClibc macro name
-# $2: Buildroot option name
-# $3: uClibc config file
-# $4: feature description
-#
-check_uclibc_feature = \
-	IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \
-	if [ x$($(2)) != x"y" -a x$${IS_IN_LIBC} == x"y" ] ; then \
-		echo "$(4) available in C library, please enable $(2)" ; \
-		exit 1 ; \
-	fi ; \
-	if [ x$($(2)) == x"y" -a x$${IS_IN_LIBC} != x"y" ] ; then \
-		echo "$(4) not available in C library, please disable $(2)" ; \
-		exit 1 ; \
-	fi
-
-#
-# Check the correctness of a uclibc external toolchain configuration
-#  1. Check that the C library selected in Buildroot matches the one
-#     of the external toolchain
-#  2. Check that the features enabled in the Buildroot configuration
-#     match the features available in the uClibc of the external
-#     toolchain
-#
-# $1: sysroot directory
-#
-check_uclibc = \
-	SYSROOT_DIR="$(strip $1)"; \
-	if ! test -f $${SYSROOT_DIR}/lib/ld*-uClibc.so.* ; then \
-		echo "Incorrect selection of the C library"; \
-		exit -1; \
-	fi; \
-	UCLIBC_CONFIG_FILE=$${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; \
-	$(call check_uclibc_feature,__UCLIBC_HAS_LFS__,BR2_LARGEFILE,$${UCLIBC_CONFIG_FILE},Large file support) ;\
-	$(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,BR2_INET_IPV6,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\
-	$(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_INET_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\
-	$(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
-	$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
-	$(call check_uclibc_feature,__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__,BR2_PROGRAM_INVOCATION,$${UCLIBC_CONFIG_FILE},Program invocation support) ;\
-
-#
-# Check that the Buildroot configuration of the ABI matches the
-# configuration of the external toolchain.
-#
-check_arm_abi = \
-	EXT_TOOLCHAIN_TARGET=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Target | cut -f2 -d ' ') ; \
-	if echo $${EXT_TOOLCHAIN_TARGET} | grep -q 'eabi$$' ; then \
-		EXT_TOOLCHAIN_ABI="eabi" ; \
-	else \
-		EXT_TOOLCHAIN_ABI="oabi" ; \
-	fi ; \
-	if [ x$(BR2_ARM_OABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "eabi" ] ; then \
-		echo "Incorrect ABI setting" ; \
-		exit 1 ; \
-	fi ; \
-	if [ x$(BR2_ARM_EABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "oabi" ] ; then \
-		echo "Incorrect ABI setting" ; \
-		exit 1 ; \
-	fi ; \
-
-#
-# Check that the external toolchain supports C++
-#
-check_cplusplus = \
-	$(TARGET_CXX) -v > /dev/null 2>&1 ; \
-	if test $$? -ne 0 ; then \
-		echo "BR2_INSTALL_LIBSTDCPP is selected but C++ support not available in external toolchain" ; \
-		exit 1 ; \
-	fi ; \
-
-#
-# Check that the cross-compiler given in the configuration exists
-#
-check_cross_compiler_exists = \
-	$(TARGET_CC) -v > /dev/null 2>&1 ; \
-	if test $$? -ne 0 ; then \
-		echo "Cannot execute cross-compiler '$(TARGET_CC)'" ; \
-		exit 1 ; \
-	fi ; \
-
 uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
 
 LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
new file mode 100644
index 0000000..5c87d2b
--- /dev/null
+++ b/toolchain/helpers.mk
@@ -0,0 +1,244 @@
+# This Makefile fragment declares helper functions, usefull to handle
+# non- buildroot-built toolchains, eg. purely external toolchains or
+# toolchains (internally) built using crosstool-NG.
+
+#
+# Copy a toolchain library and its symbolic links from the sysroot
+# directory to the target directory. Also optionaly strips the
+# library.
+#
+# Most toolchains have their libraries either in /lib or /usr/lib
+# relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however,
+# have basic libraries in /lib, and libstdc++/libgcc_s in
+# /usr/<target-name>/lib(64).
+#
+# $1: arch specific sysroot directory
+# $2: library name
+# $3: destination directory of the libary, relative to $(TARGET_DIR)
+# $4: strip (y|n), default is to strip
+#
+copy_toolchain_lib_root = \
+	ARCH_SYSROOT_DIR="$(strip $1)"; \
+	LIB="$(strip $2)"; \
+	DESTDIR="$(strip $3)" ; \
+	STRIP="$(strip $4)"; \
+ \
+	LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
+		find -L . -path "./lib/$${LIB}.*"     -o \
+			  -path "./usr/lib/$${LIB}.*" -o \
+			  -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
+		)` ; \
+	for FILE in $${LIBS} ; do \
+		LIB=`basename $${FILE}`; \
+		LIBDIR=`dirname $${FILE}` ; \
+		while test \! -z "$${LIB}"; do \
+			FULLPATH="$${ARCH_SYSROOT_DIR}/$${LIBDIR}/$${LIB}" ; \
+			rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \
+			mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
+			if test -h $${FULLPATH} ; then \
+				cp -d $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/; \
+			elif test -f $${FULLPATH}; then \
+				$(INSTALL) -D -m0755 $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \
+				case "$${STRIP}" in \
+				(0 | n | no) \
+;; \
+				(*) \
+					$(TARGET_CROSS)strip "$(TARGET_DIR)/$${DESTDIR}/$${LIB}"; \
+;; \
+				esac; \
+			else \
+				exit -1; \
+			fi; \
+			LIB="`readlink $${FULLPATH}`"; \
+		done; \
+	done; \
+ \
+	echo -n
+
+#
+# Copy the full external toolchain sysroot directory to the staging
+# dir. The operation of this function is rendered a little bit
+# complicated by the support for multilib toolchains.
+#
+# We start by copying etc, lib, sbin and usr from the sysroot of the
+# selected architecture variant (as pointed by ARCH_SYSROOT_DIR). This
+# allows to import into the staging directory the C library and
+# companion libraries for the correct architecture variant. We
+# explictly only copy etc, lib, sbin and usr since other directories
+# might exist for other architecture variants (on Codesourcery
+# toolchain, the sysroot for the default architecture variant contains
+# the armv4t and thumb2 subdirectories, which are the sysroot for the
+# corresponding architecture variants), and we don't want to import
+# them.
+#
+# Then, if the selected architecture variant is not the default one
+# (i.e, if SYSROOT_DIR != ARCH_SYSROOT_DIR), then we :
+#
+#  * Import the header files from the default architecture
+#    variant. Header files are typically shared between the sysroots
+#    for the different architecture variants. If we use the
+#    non-default one, header files were not copied by the previous
+#    step, so we copy them here from the sysroot of the default
+#    architecture variant.
+#
+#  * Create a symbolic link that matches the name of the subdirectory
+#    for the architecture variant in the original sysroot. This is
+#    required as the compiler will by default look in
+#    sysroot_dir/arch_variant/ for libraries and headers, when the
+#    non-default architecture variant is used. Without this, the
+#    compiler fails to find libraries and headers.
+#
+# $1: main sysroot directory of the toolchain
+# $2: arch specific sysroot directory of the toolchain
+# $3: arch specific subdirectory in the sysroot
+#
+copy_toolchain_sysroot = \
+	SYSROOT_DIR="$(strip $1)"; \
+	ARCH_SYSROOT_DIR="$(strip $2)"; \
+	ARCH_SUBDIR="$(strip $3)"; \
+	for i in etc lib sbin usr ; do \
+		if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
+			cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
+		fi ; \
+	done ; \
+	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
+		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
+			cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \
+		fi ; \
+		ln -s . $(STAGING_DIR)/$(ARCH_SUBDIR) ; \
+	fi ; \
+	find $(STAGING_DIR) -type d | xargs chmod 755
+
+#
+# Create lib64 -> lib and usr/lib64 -> usr/lib symbolic links in the
+# target and staging directories. This is needed for some 64 bits
+# toolchains such as the Crosstool-NG toolchains, for which the path
+# to the dynamic loader and other libraries is /lib64, but the
+# libraries are stored in /lib.
+#
+create_lib64_symlinks = \
+	(cd $(TARGET_DIR) ;      ln -s lib lib64) ; \
+	(cd $(TARGET_DIR)/usr ;  ln -s lib lib64) ; \
+	(cd $(STAGING_DIR) ;     ln -s lib lib64) ; \
+	(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.
+#
+# $1: Buildroot option name
+# $2: feature description
+#
+check_glibc_feature = \
+	if [ x$($(1)) != x"y" ] ; then \
+		echo "$(2) available in C library, please enable $(1)" ; \
+		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
+#  2. Check that all the C library-related features are enabled in the
+#     config, since glibc always supports all of them
+#
+# $1: sysroot directory
+#
+check_glibc = \
+	SYSROOT_DIR="$(strip $1)"; \
+	if ! test -f $${SYSROOT_DIR}/lib/ld-linux*.so.* -o -f $${SYSROOT_DIR}/lib/ld.so.* ; then \
+		echo "Incorrect selection of the C library"; \
+		exit -1; \
+	fi; \
+	$(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\
+	$(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\
+	$(call check_glibc_feature,BR2_INET_RPC,RPC support) ;\
+	$(call check_glibc_feature,BR2_ENABLE_LOCALE,Locale support) ;\
+	$(call check_glibc_feature,BR2_USE_WCHAR,Wide char support) ;\
+	$(call check_glibc_feature,BR2_PROGRAM_INVOCATION,Program invocation support)
+
+#
+# Check the conformity of Buildroot configuration with regard to the
+# uClibc configuration of the external toolchain, for a particular
+# feature.
+#
+# $1: uClibc macro name
+# $2: Buildroot option name
+# $3: uClibc config file
+# $4: feature description
+#
+check_uclibc_feature = \
+	IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \
+	if [ x$($(2)) != x"y" -a x$${IS_IN_LIBC} == x"y" ] ; then \
+		echo "$(4) available in C library, please enable $(2)" ; \
+		exit 1 ; \
+	fi ; \
+	if [ x$($(2)) == x"y" -a x$${IS_IN_LIBC} != x"y" ] ; then \
+		echo "$(4) not available in C library, please disable $(2)" ; \
+		exit 1 ; \
+	fi
+
+#
+# Check the correctness of a uclibc external toolchain configuration
+#  1. Check that the C library selected in Buildroot matches the one
+#     of the external toolchain
+#  2. Check that the features enabled in the Buildroot configuration
+#     match the features available in the uClibc of the external
+#     toolchain
+#
+# $1: sysroot directory
+#
+check_uclibc = \
+	SYSROOT_DIR="$(strip $1)"; \
+	if ! test -f $${SYSROOT_DIR}/lib/ld*-uClibc.so.* ; then \
+		echo "Incorrect selection of the C library"; \
+		exit -1; \
+	fi; \
+	UCLIBC_CONFIG_FILE=$${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; \
+	$(call check_uclibc_feature,__UCLIBC_HAS_LFS__,BR2_LARGEFILE,$${UCLIBC_CONFIG_FILE},Large file support) ;\
+	$(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,BR2_INET_IPV6,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\
+	$(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_INET_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\
+	$(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
+	$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
+	$(call check_uclibc_feature,__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__,BR2_PROGRAM_INVOCATION,$${UCLIBC_CONFIG_FILE},Program invocation support) ;\
+
+#
+# Check that the Buildroot configuration of the ABI matches the
+# configuration of the external toolchain.
+#
+check_arm_abi = \
+	EXT_TOOLCHAIN_TARGET=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Target | cut -f2 -d ' ') ; \
+	if echo $${EXT_TOOLCHAIN_TARGET} | grep -q 'eabi$$' ; then \
+		EXT_TOOLCHAIN_ABI="eabi" ; \
+	else \
+		EXT_TOOLCHAIN_ABI="oabi" ; \
+	fi ; \
+	if [ x$(BR2_ARM_OABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "eabi" ] ; then \
+		echo "Incorrect ABI setting" ; \
+		exit 1 ; \
+	fi ; \
+	if [ x$(BR2_ARM_EABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "oabi" ] ; then \
+		echo "Incorrect ABI setting" ; \
+		exit 1 ; \
+	fi ; \
+
+#
+# Check that the external toolchain supports C++
+#
+check_cplusplus = \
+	$(TARGET_CXX) -v > /dev/null 2>&1 ; \
+	if test $$? -ne 0 ; then \
+		echo "BR2_INSTALL_LIBSTDCPP is selected but C++ support not available in external toolchain" ; \
+		exit 1 ; \
+	fi ; \
+
+#
+# Check that the cross-compiler given in the configuration exists
+#
+check_cross_compiler_exists = \
+	$(TARGET_CC) -v > /dev/null 2>&1 ; \
+	if test $$? -ne 0 ; then \
+		echo "Cannot execute cross-compiler '$(TARGET_CC)'" ; \
+		exit 1 ; \
+	fi ; \
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/5] toolchain: rename external toolchain dir
  2010-07-12 20:46 [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v3 Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 1/5] toolchain: move helper functions from external toolchain Yann E. MORIN
@ 2010-07-12 20:46 ` Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 3/5] toolchain: move makefile includes Yann E. MORIN
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2010-07-12 20:46 UTC (permalink / raw)
  To: buildroot

Rename the external toolchain directory.
When new backends are here, it will be easier to sort them out
if they are all prefixed the same way.

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
---
 toolchain/Config.in                                |    4 ++--
 .../Config.in                                      |    0
 .../Config.in.2                                    |    0
 .../ext-tool.mk                                    |    0
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename toolchain/{external-toolchain => toolchain-external}/Config.in (100%)
 rename toolchain/{external-toolchain => toolchain-external}/Config.in.2 (100%)
 rename toolchain/{external-toolchain => toolchain-external}/ext-tool.mk (100%)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index ee94143..52b9d8b 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -17,7 +17,7 @@ config BR2_TOOLCHAIN_EXTERNAL
 endchoice
 
 source "toolchain/Config.in.1"
-source "toolchain/external-toolchain/Config.in"
+source "toolchain/toolchain-external/Config.in"
 
 # we want gdb config in the middle of both source and external
 # toolchains, but mconf won't let us source the same file twice,
@@ -26,6 +26,6 @@ source "toolchain/gdb/Config.in"
 comment "Common Toolchain Options"
 
 source "toolchain/Config.in.2"
-source "toolchain/external-toolchain/Config.in.2"
+source "toolchain/toolchain-external/Config.in.2"
 
 endmenu
diff --git a/toolchain/external-toolchain/Config.in b/toolchain/toolchain-external/Config.in
similarity index 100%
rename from toolchain/external-toolchain/Config.in
rename to toolchain/toolchain-external/Config.in
diff --git a/toolchain/external-toolchain/Config.in.2 b/toolchain/toolchain-external/Config.in.2
similarity index 100%
rename from toolchain/external-toolchain/Config.in.2
rename to toolchain/toolchain-external/Config.in.2
diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
similarity index 100%
rename from toolchain/external-toolchain/ext-tool.mk
rename to toolchain/toolchain-external/ext-tool.mk
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 3/5] toolchain: move makefile includes
  2010-07-12 20:46 [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v3 Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 1/5] toolchain: move helper functions from external toolchain Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 2/5] toolchain: rename external toolchain dir Yann E. MORIN
@ 2010-07-12 20:46 ` Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 4/5] toolchain: move buildroot config files Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains Yann E. MORIN
  4 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2010-07-12 20:46 UTC (permalink / raw)
  To: buildroot

Including a bunch of Makefiles with wildcard makes it impossible to add
new toolchain backends. Avoid that by namely including needed files.

The external toolchain still needs to include all the toolchain/*/*.mk
sub-makefiles, as they are needed to build a toolchain that runs on the
target. It is to be noted that the cross-toolchain is not built in this
case, as the make-targets to build the cross-toolchain are not present
in the $(BASE_TARGETS) variable, which is later used to create the
dependency rules.

Also, the comment 'Explicit ordering' has been removed, as it is mis-
leading. It is make's responsibility to create the proper ordering based
on the dependency rules it finds in the Makefiles

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
---
 Makefile                         |   16 ++--------------
 toolchain/toolchain-buildroot.mk |   12 ++++++++++++
 toolchain/toolchain-external.mk  |   14 ++++++++++++++
 3 files changed, 28 insertions(+), 14 deletions(-)
 create mode 100644 toolchain/toolchain-buildroot.mk
 create mode 100644 toolchain/toolchain-external.mk

diff --git a/Makefile b/Makefile
index e02b7db..7f6da17 100644
--- a/Makefile
+++ b/Makefile
@@ -293,21 +293,9 @@ all: world
 # each selected package to TARGETS if that package was selected
 # in the .config file.
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-# avoid pulling in external toolchain which is broken for toplvl parallel builds
-# Explicit ordering:
-include toolchain/dependencies/dependencies.mk
-include toolchain/binutils/binutils.mk
-include toolchain/ccache/ccache.mk
-include toolchain/elf2flt/elf2flt.mk
-include toolchain/gcc/gcc-uclibc-4.x.mk
-include toolchain/gdb/gdb.mk
-include toolchain/kernel-headers/kernel-headers.mk
-include toolchain/mklibs/mklibs.mk
-include toolchain/sstrip/sstrip.mk
-include toolchain/uClibc/uclibc.mk
+include toolchain/toolchain-buildroot.mk
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-include toolchain/helpers.mk
-include toolchain/*/*.mk
+include toolchain/toolchain-external.mk
 endif
 
 include package/*/*.mk
diff --git a/toolchain/toolchain-buildroot.mk b/toolchain/toolchain-buildroot.mk
new file mode 100644
index 0000000..d879697
--- /dev/null
+++ b/toolchain/toolchain-buildroot.mk
@@ -0,0 +1,12 @@
+# Include files required for the internal toolchain backend
+
+include toolchain/dependencies/dependencies.mk
+include toolchain/binutils/binutils.mk
+include toolchain/ccache/ccache.mk
+include toolchain/elf2flt/elf2flt.mk
+include toolchain/gcc/gcc-uclibc-4.x.mk
+include toolchain/gdb/gdb.mk
+include toolchain/kernel-headers/kernel-headers.mk
+include toolchain/mklibs/mklibs.mk
+include toolchain/sstrip/sstrip.mk
+include toolchain/uClibc/uclibc.mk
diff --git a/toolchain/toolchain-external.mk b/toolchain/toolchain-external.mk
new file mode 100644
index 0000000..6f1f641
--- /dev/null
+++ b/toolchain/toolchain-external.mk
@@ -0,0 +1,14 @@
+# Required includes for the external toolchain backend
+
+include toolchain/helpers.mk
+include toolchain/binutils/binutils.mk
+include toolchain/ccache/ccache.mk
+include toolchain/dependencies/dependencies.mk
+include toolchain/elf2flt/elf2flt.mk
+include toolchain/gcc/gcc-uclibc-4.x.mk
+include toolchain/gdb/gdb.mk
+include toolchain/kernel-headers/kernel-headers.mk
+include toolchain/mklibs/mklibs.mk
+include toolchain/sstrip/sstrip.mk
+include toolchain/toolchain-external/ext-tool.mk
+include toolchain/uClibc/uclibc.mk
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/5] toolchain: move buildroot config files
  2010-07-12 20:46 [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v3 Yann E. MORIN
                   ` (2 preceding siblings ...)
  2010-07-12 20:46 ` [Buildroot] [PATCH 3/5] toolchain: move makefile includes Yann E. MORIN
@ 2010-07-12 20:46 ` Yann E. MORIN
  2010-07-12 20:46 ` [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains Yann E. MORIN
  4 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2010-07-12 20:46 UTC (permalink / raw)
  To: buildroot

Handle the internal toolchain backend mechanism the
same way we handle other backends.

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
---
 toolchain/Config.in                                |   12 +----
 .../{Config.in.1 => toolchain-buildroot/Config.in} |    2 +-
 toolchain/toolchain-buildroot/Config.in.2          |   37 ++++++++++++++++
 toolchain/{Config.in.2 => toolchain-common.in}     |   46 ++++----------------
 4 files changed, 50 insertions(+), 47 deletions(-)
 rename toolchain/{Config.in.1 => toolchain-buildroot/Config.in} (82%)
 create mode 100644 toolchain/toolchain-buildroot/Config.in.2
 rename toolchain/{Config.in.2 => toolchain-common.in} (84%)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 52b9d8b..fc9a048 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -16,16 +16,10 @@ config BR2_TOOLCHAIN_EXTERNAL
 
 endchoice
 
-source "toolchain/Config.in.1"
+source "toolchain/toolchain-buildroot/Config.in"
 source "toolchain/toolchain-external/Config.in"
-
-# we want gdb config in the middle of both source and external
-# toolchains, but mconf won't let us source the same file twice,
-# so put it here instead
-source "toolchain/gdb/Config.in"
-comment "Common Toolchain Options"
-
-source "toolchain/Config.in.2"
+source "toolchain/toolchain-common.in"
+source "toolchain/toolchain-buildroot/Config.in.2"
 source "toolchain/toolchain-external/Config.in.2"
 
 endmenu
diff --git a/toolchain/Config.in.1 b/toolchain/toolchain-buildroot/Config.in
similarity index 82%
rename from toolchain/Config.in.1
rename to toolchain/toolchain-buildroot/Config.in
index 5c26858..a9dd192 100644
--- a/toolchain/Config.in.1
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -1,4 +1,4 @@
-#
+# Config entries for internal toolchain backend
 
 if BR2_TOOLCHAIN_BUILDROOT
 source "toolchain/kernel-headers/Config.in"
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
new file mode 100644
index 0000000..512a608
--- /dev/null
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -0,0 +1,37 @@
+# Buildroot backend specific options
+
+if BR2_TOOLCHAIN_BUILDROOT
+source "toolchain/elf2flt/Config.in"
+source "toolchain/mklibs/Config.in"
+source "toolchain/sstrip/Config.in"
+
+config BR2_ENABLE_MULTILIB
+	bool "Enable multilib support?"
+	help
+	    Build libraries to support different ABIs.
+
+config BR2_VFP_FLOAT
+	bool "Use ARM Vector Floating Point unit"
+	depends on !BR2_SOFT_FLOAT
+	depends on BR2_arm || BR2_armeb
+	help
+	  Setting this option will enable the "-mfpu=vfp" option.
+	  If your ARM CPU has a Vector Floating Point Unit (VFP)
+	  and the toolchain supports the option, then the
+	  code can be optimized.
+
+	  Most people will answer N.
+
+config BR2_CROSS_TOOLCHAIN_TARGET_UTILS
+	bool "Include target utils in cross toolchain"
+	default y
+	help
+	  When using buildroot to build a deployable cross toolchain,
+	  it is handy to include certain target apps with that toolchain
+	  as a convenience.
+	  Examples include ldd, gdbserver, and strace.
+
+	  Answer Y if you want these apps (if built) copied into the
+	  cross toolchain dir under <arch>-linux-uclibc/target_utils/.
+
+endif
diff --git a/toolchain/Config.in.2 b/toolchain/toolchain-common.in
similarity index 84%
rename from toolchain/Config.in.2
rename to toolchain/toolchain-common.in
index 35263ce..bea0c7c 100644
--- a/toolchain/Config.in.2
+++ b/toolchain/toolchain-common.in
@@ -1,4 +1,12 @@
-#
+# Generic toolchain options
+
+# we want gdb config in the middle of both source and external
+# toolchains, but mconf won't let us source the same file twice,
+# so put it here instead
+source "toolchain/gdb/Config.in"
+
+comment "Common Toolchain Options"
+
 config BR2_LARGEFILE
 	bool "Enable large file (files > 2 GB) support?"
 	depends on !BR2_cris
@@ -162,39 +170,3 @@ config BR2_TARGET_OPTIMIZATION
 	help
 	  Optimizations to use when building for the target host.
 	  NOTE: gcc optimization level is defined in build options.
-
-if BR2_TOOLCHAIN_BUILDROOT
-source "toolchain/elf2flt/Config.in"
-source "toolchain/mklibs/Config.in"
-source "toolchain/sstrip/Config.in"
-
-config BR2_ENABLE_MULTILIB
-	bool "Enable multilib support?"
-	help
-	    Build libraries to support different ABIs.
-
-config BR2_VFP_FLOAT
-	bool "Use ARM Vector Floating Point unit"
-	depends on !BR2_SOFT_FLOAT
-	depends on BR2_arm || BR2_armeb
-	help
-	  Setting this option will enable the "-mfpu=vfp" option.
-	  If your ARM CPU has a Vector Floating Point Unit (VFP)
-	  and the toolchain supports the option, then the 
-	  code can be optimized.
-	  
-	  Most people will answer N.
-
-config BR2_CROSS_TOOLCHAIN_TARGET_UTILS
-	bool "Include target utils in cross toolchain"
-	default y
-	help
-	  When using buildroot to build a deployable cross toolchain,
-	  it is handy to include certain target apps with that toolchain
-	  as a convenience.
-	  Examples include ldd, gdbserver, and strace.
-
-	  Answer Y if you want these apps (if built) copied into the
-	  cross toolchain dir under <arch>-linux-uclibc/target_utils/.
-
-endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains
  2010-07-12 20:46 [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v3 Yann E. MORIN
                   ` (3 preceding siblings ...)
  2010-07-12 20:46 ` [Buildroot] [PATCH 4/5] toolchain: move buildroot config files Yann E. MORIN
@ 2010-07-12 20:46 ` Yann E. MORIN
  2010-07-19  1:50   ` Mitch Davis
  4 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2010-07-12 20:46 UTC (permalink / raw)
  To: buildroot

It is misleeading to name the external toolchain make target 'uclibc', as
external toolchains can be based on other C libraries (eg. glibc or eglibc).

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
---
 Makefile                                 |    2 +-
 toolchain/toolchain-external/ext-tool.mk |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 7f6da17..d3ee730 100644
--- a/Makefile
+++ b/Makefile
@@ -230,7 +230,7 @@ PREFERRED_LIB_FLAGS:=--enable-static --enable-shared
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
 BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-BASE_TARGETS:=uclibc
+BASE_TARGETS:=toolchain-prepare
 endif
 TARGETS:=
 
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 6251582..5f6714a 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -37,7 +37,7 @@
 #  cross-compiler binaries remains external, all libraries and headers
 #  are imported into the Buildroot tree.
 
-uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
+toolchain-prepare: dependencies $(STAMP_DIR)/ext-toolchain-installed
 
 LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains
  2010-07-12 20:46 ` [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains Yann E. MORIN
@ 2010-07-19  1:50   ` Mitch Davis
  2010-07-19 20:48     ` Yann E. MORIN
  0 siblings, 1 reply; 13+ messages in thread
From: Mitch Davis @ 2010-07-19  1:50 UTC (permalink / raw)
  To: buildroot

On Tue, Jul 13, 2010 at 6:46 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> It is misleeading to name the external toolchain make target 'uclibc', as
> external toolchains can be based on other C libraries (eg. glibc or eglibc).

I understand your point about uclibc not being a suitable generic
name, but I'm not sure toolchain-prepare is the ideal name.  To me,
what this target does is guarantees the presence of the C run time
library (whether that be uClibc, glibc, etc).  Might "c-rtl" or
similar be a better name?  (Of course, in order to generate the RTL,
the toolchain will need to be there, as usual).

I can also imagine a scenario where one is building such a minimal
system that one needs the toolchain, but not the RTL.  What are good
target names to guarantee the toolchain, and the RTL, as separate
targets?

Mitch.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains
  2010-07-19  1:50   ` Mitch Davis
@ 2010-07-19 20:48     ` Yann E. MORIN
  2010-07-19 22:44       ` Michael S. Zick
  2010-07-20  0:13       ` Mitch Davis
  0 siblings, 2 replies; 13+ messages in thread
From: Yann E. MORIN @ 2010-07-19 20:48 UTC (permalink / raw)
  To: buildroot

Mitch, All,

On Monday 19 July 2010 03:50:54 Mitch Davis wrote:
> On Tue, Jul 13, 2010 at 6:46 AM, Yann E. MORIN
> <yann.morin.1998@anciens.enib.fr> wrote:
> > It is misleeading to name the external toolchain make target 'uclibc', as
> > external toolchains can be based on other C libraries (eg. glibc or eglibc).

> I understand your point about uclibc not being a suitable generic
> name, but I'm not sure toolchain-prepare is the ideal name.  To me,
> what this target does is guarantees the presence of the C run time
> library (whether that be uClibc, glibc, etc).  Might "c-rtl" or
> similar be a better name?  (Of course, in order to generate the RTL,
> the toolchain will need to be there, as usual).

OK, I agree that we can drop this patch for now, and do the rename later.
"c-rtl" is not that descriptive either... Even in-contect, it took me a
while to see what it meant...

Maybe smthg like:
fill-me-that-fscking-staging-and-target-with-the-fscking-runtime-from-toolchain-and-dont-forget-headers-and-statics-for-staging-please-oh-and-build-the-toolchain-if-needed-while-youre-at-it-if-you-dont-care-you-are-such-a-lovely-pet

Hehe! Yes, I like that one! :-)

[ Thomas, I bet you, this time! :) ]

> I can also imagine a scenario where one is building such a minimal
> system that one needs the toolchain, but not the RTL.  What are good
> target names to guarantee the toolchain, and the RTL, as separate
> targets?

Well, it will require some thinking...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 13+ messages in thread

* [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains
  2010-07-19 20:48     ` Yann E. MORIN
@ 2010-07-19 22:44       ` Michael S. Zick
  2010-07-20  0:13       ` Mitch Davis
  1 sibling, 0 replies; 13+ messages in thread
From: Michael S. Zick @ 2010-07-19 22:44 UTC (permalink / raw)
  To: buildroot

On Mon July 19 2010, Yann E. MORIN wrote:
> Mitch, All,
> 
> On Monday 19 July 2010 03:50:54 Mitch Davis wrote:
> > On Tue, Jul 13, 2010 at 6:46 AM, Yann E. MORIN
> > <yann.morin.1998@anciens.enib.fr> wrote:
> > > It is misleeading to name the external toolchain make target 'uclibc', as
> > > external toolchains can be based on other C libraries (eg. glibc or eglibc).
> 
> > I understand your point about uclibc not being a suitable generic
> > name, but I'm not sure toolchain-prepare is the ideal name.  To me,
> > what this target does is guarantees the presence of the C run time
> > library (whether that be uClibc, glibc, etc).  Might "c-rtl" or
> > similar be a better name?  (Of course, in order to generate the RTL,
> > the toolchain will need to be there, as usual).
> 
> OK, I agree that we can drop this patch for now, and do the rename later.
> "c-rtl" is not that descriptive either... Even in-contect, it took me a
> while to see what it meant...
> 
> Maybe smthg like:
> fill-me-that-fscking-staging-and-target-with-the-fscking-runtime-from-toolchain-and-dont-forget-headers-and-statics-for-staging-please-oh-and-build-the-toolchain-if-needed-while-youre-at-it-if-you-dont-care-you-are-such-a-lovely-pet
> 
> Hehe! Yes, I like that one! :-)
> 

This is supposed to be computer science, acronyms only may be applied -

How about:
My-Software, Vital-C, Run-Time. Direct, Digital Loading libraries? 
or which would be MSVCRT.DLL as an acronym?

Something short, sweet and descriptive; such as found in en_OpenSSL:
EXP-EDH-RSA-DES-CBC-SHA
Which, believe it or not, is the plain text version of an acronym used.
Tack a: BR2- on the front of something like that and call it decision made.
;-)

Mike
> [ Thomas, I bet you, this time! :) ]
> 
> > I can also imagine a scenario where one is building such a minimal
> > system that one needs the toolchain, but not the RTL.  What are good
> > target names to guarantee the toolchain, and the RTL, as separate
> > targets?
> 
> Well, it will require some thinking...
> 
> Regards,
> Yann E. MORIN.
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains
  2010-07-19 20:48     ` Yann E. MORIN
  2010-07-19 22:44       ` Michael S. Zick
@ 2010-07-20  0:13       ` Mitch Davis
  1 sibling, 0 replies; 13+ messages in thread
From: Mitch Davis @ 2010-07-20  0:13 UTC (permalink / raw)
  To: buildroot

On Tue, Jul 20, 2010 at 6:48 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
>
> Maybe smthg like:
> fill-me-that-fscking-staging-and-target-with-the-fscking-runtime-from-toolchain-and-dont-forget-headers-and-statics-for-staging-please-oh-and-build-the-toolchain-if-needed-while-youre-at-it-if-you-dont-care-you-are-such-a-lovely-pet

Got my vote :-)

Seriously, how about just "c"?  The idea being that once you've made
that target, you can build things written in C.  After all, we already
have packages with dependencies of "php", "python", "lua" and
"microperl"...

Mitch.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains
  2010-06-25 22:15 ` [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains Yann E. MORIN
@ 2010-06-27 21:08   ` Peter Korsgaard
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2010-06-27 21:08 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 Yann> It is misleeading to name the external toolchain make target 'uclibc', as
 Yann> external toochains can be based on other C libraries (eg. glibc or eglibc).

Typo - s/toochains/toolchains/

Otherwise looks good.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains
  2010-06-25 22:15 [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v2 Yann E. MORIN
@ 2010-06-25 22:15 ` Yann E. MORIN
  2010-06-27 21:08   ` Peter Korsgaard
  0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2010-06-25 22:15 UTC (permalink / raw)
  To: buildroot

It is misleeading to name the external toolchain make target 'uclibc', as
external toochains can be based on other C libraries (eg. glibc or eglibc).

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
---
 Makefile                                 |    2 +-
 toolchain/toolchain-external/ext-tool.mk |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index a167826..5b28cbd 100644
--- a/Makefile
+++ b/Makefile
@@ -230,7 +230,7 @@ PREFERRED_LIB_FLAGS:=--enable-static --enable-shared
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
 BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-BASE_TARGETS:=uclibc
+BASE_TARGETS:=toolchain-prepare
 endif
 TARGETS:=
 
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index c8e7892..d6a759c 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -35,7 +35,7 @@
 #  cross-compiler binaries remains external, all libraries and headers
 #  are imported into the Buildroot tree.
 
-uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
+toolchain-prepare: dependencies $(STAMP_DIR)/ext-toolchain-installed
 
 EXTERNAL_LIBS=libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains
  2010-06-01 21:52 [Buildroot] [pull request] Preparatory work on toolchains Yann E. MORIN
@ 2010-06-01 21:53 ` Yann E. MORIN
  0 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2010-06-01 21:53 UTC (permalink / raw)
  To: buildroot

It is misleeading to name the external toolchain make target 'uclibc', as
external toochains can be based on other C libraries (eg. glibc or eglibc).

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
---
 Makefile                                 |    2 +-
 toolchain/toolchain-external/ext-tool.mk |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 035c7ec..6e59a30 100644
--- a/Makefile
+++ b/Makefile
@@ -202,7 +202,7 @@ PREFERRED_LIB_FLAGS:=--enable-static --enable-shared
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
 BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-BASE_TARGETS:=uclibc
+BASE_TARGETS:=toolchain-prepare
 endif
 TARGETS:=
 
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index c8e7892..d6a759c 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -35,7 +35,7 @@
 #  cross-compiler binaries remains external, all libraries and headers
 #  are imported into the Buildroot tree.
 
-uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
+toolchain-prepare: dependencies $(STAMP_DIR)/ext-toolchain-installed
 
 EXTERNAL_LIBS=libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
-- 
1.6.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-07-20  0:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-12 20:46 [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v3 Yann E. MORIN
2010-07-12 20:46 ` [Buildroot] [PATCH 1/5] toolchain: move helper functions from external toolchain Yann E. MORIN
2010-07-12 20:46 ` [Buildroot] [PATCH 2/5] toolchain: rename external toolchain dir Yann E. MORIN
2010-07-12 20:46 ` [Buildroot] [PATCH 3/5] toolchain: move makefile includes Yann E. MORIN
2010-07-12 20:46 ` [Buildroot] [PATCH 4/5] toolchain: move buildroot config files Yann E. MORIN
2010-07-12 20:46 ` [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains Yann E. MORIN
2010-07-19  1:50   ` Mitch Davis
2010-07-19 20:48     ` Yann E. MORIN
2010-07-19 22:44       ` Michael S. Zick
2010-07-20  0:13       ` Mitch Davis
  -- strict thread matches above, loose matches on Subject: below --
2010-06-25 22:15 [Buildroot] [PATCH 0/5] Preparatory work on toolchains - v2 Yann E. MORIN
2010-06-25 22:15 ` [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains Yann E. MORIN
2010-06-27 21:08   ` Peter Korsgaard
2010-06-01 21:52 [Buildroot] [pull request] Preparatory work on toolchains Yann E. MORIN
2010-06-01 21:53 ` [Buildroot] [PATCH 5/5] toolchain: rename base target for external toolchains Yann E. MORIN

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.