Browse Source

add a Kconfig option for setting the $(CROSS) build variable

Mike Frysinger 19 years ago
parent
commit
05827f4cb0
2 changed files with 12 additions and 0 deletions
  1. 4 0
      Rules.mak
  2. 8 0
      extra/Configs/Config.in

+ 4 - 0
Rules.mak

@@ -84,6 +84,10 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
 -include $(TOPDIR).config
 endif
 
+ifndef CROSS
+CROSS=$(subst ",, $(strip $(CROSS_COMPILE)))
+endif
+
 # A nifty macro to make testing gcc features easier
 check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
 	then echo "$(1)"; else echo "$(2)"; fi)

+ 8 - 0
extra/Configs/Config.in

@@ -1215,6 +1215,14 @@ endmenu
 
 menu "uClibc development/debugging options"
 
+config CROSS_COMPILE
+	string "Cross-compiling toolchain prefix"
+	default ""
+	help
+	  The prefix used to execute your cross-compiling toolchain.  For 
+	  example, if you run 'arm-linux-uclibc-gcc' to compile something, 
+	  then enter 'arm-linux-uclibc-' here.
+
 config DODEBUG
 	bool "Build uClibc with debugging symbols"
 	default n