[Buildroot] svn commit: trunk/buildroot/toolchain: external-toolchain gcc

ulf at uclibc.org ulf at uclibc.org
Sat Jan 31 20:50:00 UTC 2009


Author: ulf
Date: 2009-01-31 20:49:59 +0000 (Sat, 31 Jan 2009)
New Revision: 25193

Log:
Change binary toolchain configuration, so
that the options become visible just below
the config, instead of at bottom of screen

Create a more useful default as toolchain path.

Allow generation of a script which sets up
paths to a binary toolchain generated by buildroot.



Modified:
   trunk/buildroot/toolchain/Config.in
   trunk/buildroot/toolchain/external-toolchain/Config.in.2
   trunk/buildroot/toolchain/external-toolchain/ext-tool.mk
   trunk/buildroot/toolchain/gcc/gcc-uclibc-4.x.mk


Changeset:
Modified: trunk/buildroot/toolchain/Config.in
===================================================================
--- trunk/buildroot/toolchain/Config.in	2009-01-31 20:44:04 UTC (rev 25192)
+++ trunk/buildroot/toolchain/Config.in	2009-01-31 20:49:59 UTC (rev 25193)
@@ -26,6 +26,8 @@
 	default y if BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_EXTERNAL_SOURCE
 	default n if BR2_TOOLCHAIN_EXTERNAL
 
+source "toolchain/external-toolchain/Config.in.2"
+
 source "target/device/Config.in.toolchain"
 
 source "toolchain/Config.in.1"
@@ -38,6 +40,6 @@
 comment "Common Toolchain Options"
 
 source "toolchain/Config.in.2"
-source "toolchain/external-toolchain/Config.in.2"
 
 endmenu
+

Modified: trunk/buildroot/toolchain/external-toolchain/Config.in.2
===================================================================
--- trunk/buildroot/toolchain/external-toolchain/Config.in.2	2009-01-31 20:44:04 UTC (rev 25192)
+++ trunk/buildroot/toolchain/external-toolchain/Config.in.2	2009-01-31 20:49:59 UTC (rev 25193)
@@ -3,9 +3,12 @@
 if BR2_TOOLCHAIN_EXTERNAL
 config BR2_TOOLCHAIN_EXTERNAL_PATH
 	string "External toolchain path"
-	default "/path/to/staging_dir/usr"
+	default "$(GCCROOT)"
 	help
 	  Path to where the external toolchain is installed.
+	  Either define GCCROOT in your environment
+	  or an absolute path like:
+	  "/path/to/staging_dir/usr"
 
 config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	string "External toolchain prefix"

Modified: trunk/buildroot/toolchain/external-toolchain/ext-tool.mk
===================================================================
--- trunk/buildroot/toolchain/external-toolchain/ext-tool.mk	2009-01-31 20:44:04 UTC (rev 25192)
+++ trunk/buildroot/toolchain/external-toolchain/ext-tool.mk	2009-01-31 20:49:59 UTC (rev 25193)
@@ -60,3 +60,4 @@
 		$(call copy_toolchain_lib_root, $$libs, /lib, $(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
 	done
 	$(call copy_toolchain_sysroot)
+

Modified: trunk/buildroot/toolchain/gcc/gcc-uclibc-4.x.mk
===================================================================
--- trunk/buildroot/toolchain/gcc/gcc-uclibc-4.x.mk	2009-01-31 20:44:04 UTC (rev 25192)
+++ trunk/buildroot/toolchain/gcc/gcc-uclibc-4.x.mk	2009-01-31 20:49:59 UTC (rev 25193)
@@ -498,5 +498,23 @@
 	@echo GCC_PATCH_DIR=$(GCC_PATCH_DIR)
 	@echo GCC_SITE=$(GCC_SITE)
 
+GCCSCRIPT=$(ARCH)-uclibc-gcc-$(BR2_GCC_VERSION).sh
+
+gccscript:
+	@rm -f $(GCCSCRIPT)
+	@rm -f gcc.sh
+	@echo	"#!/bin/sh"						> $(GCCSCRIPT)
+	@echo	"# $(ARCH) cross compiler toolchain created $(DATE)"	>> $(GCCSCRIPT)
+	@echo	"# gcc-$(BR2_GCC_VERSION)"				>> $(GCCSCRIPT)
+	@echo	"# binutils-$(BR2_BINUTILS_VERSION)"			>> $(GCCSCRIPT)
+	@echo	"# uClibc-$(UCLIBC_VER)"				>> $(GCCSCRIPT)
+	@echo	"export	GCCROOT=$(BR2_STAGING_DIR)/usr"			>> $(GCCSCRIPT)
+	@echo	"export	PATH=\$$GCCROOT/bin:\$$PATH"			>> $(GCCSCRIPT)
+	@echo	"export	GCCPREFIX=$(ARCH)-linux"			>> $(GCCSCRIPT)
+	@echo	"export	CROSS_COMPILE=\$$GCCPREFIX-"			>> $(GCCSCRIPT)
+	@chmod	a+x $(GCCSCRIPT)
+	@ln	-s $(GCCSCRIPT) gcc.sh
+	@echo	"$(GCCSCRIPT) created"
+	@more	$(GCCSCRIPT)
 endif
 # gcc-4.x only




More information about the buildroot mailing list