aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-07-04 08:26:55 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-07-04 08:26:55 +0000
commit273430aa8d3ca6946bf12267320375dcb4945256 (patch)
tree61a0837a99fb16a88089507596d786f60ea43c08
parentc773ac8a79b3be93b5ab3930e3896235e7a1578b (diff)
downloadbusybox-w32-273430aa8d3ca6946bf12267320375dcb4945256.tar.gz
busybox-w32-273430aa8d3ca6946bf12267320375dcb4945256.tar.bz2
busybox-w32-273430aa8d3ca6946bf12267320375dcb4945256.zip
- Pull r15593:
Rename to CROSS_COMPILE and move its configuration to .config.mak. (Shaun Jackman)
-rw-r--r--Config.in18
-rw-r--r--Makefile6
-rw-r--r--Rules.mak22
3 files changed, 12 insertions, 34 deletions
diff --git a/Config.in b/Config.in
index b664508f6..3a661e274 100644
--- a/Config.in
+++ b/Config.in
@@ -289,24 +289,6 @@ config CONFIG_LFS
289 cp, mount, tar, and many others. If you want to access files larger 289 cp, mount, tar, and many others. If you want to access files larger
290 than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'. 290 than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
291 291
292config USING_CROSS_COMPILER
293 bool "Do you want to build BusyBox with a Cross Compiler?"
294 default n
295 help
296 Do you want to build BusyBox with a Cross Compiler? If so,
297 then enable this option. Otherwise leave it set to 'N'.
298
299config CROSS_COMPILER_PREFIX
300 string "Cross Compiler prefix"
301 default "/usr/i386-linux-uclibc/bin/i386-uclibc-"
302 depends on USING_CROSS_COMPILER
303 help
304 If you want to build BusyBox with a cross compiler, then you
305 will need to set this to the cross-compiler prefix. For example,
306 if my cross-compiler is /usr/i386-linux-uclibc/bin/i386-uclibc-gcc
307 then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here,
308 which will ensure the correct compiler is used.
309
310config CONFIG_BUILD_AT_ONCE 292config CONFIG_BUILD_AT_ONCE
311 bool "Compile all sources at once" 293 bool "Compile all sources at once"
312 default n 294 default n
diff --git a/Makefile b/Makefile
index 82bcca62f..e5f31d85e 100644
--- a/Makefile
+++ b/Makefile
@@ -216,8 +216,6 @@ randconfig: scripts/config/conf
216 216
217allyesconfig: scripts/config/conf 217allyesconfig: scripts/config/conf
218 @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null 218 @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
219 @$(SED) -i -r -e "s/^(USING_CROSS_COMPILER)=.*/# \1 is not set/" .config
220 @./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
221 219
222allnoconfig: scripts/config/conf 220allnoconfig: scripts/config/conf
223 @./scripts/config/conf -n $(CONFIG_CONFIG_IN) > /dev/null 221 @./scripts/config/conf -n $(CONFIG_CONFIG_IN) > /dev/null
@@ -228,13 +226,13 @@ allnoconfig: scripts/config/conf
228 226
229defconfig: scripts/config/conf 227defconfig: scripts/config/conf
230 @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null 228 @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
231 @$(SED) -i -r -e "s/^(USING_CROSS_COMPILER|CONFIG_(DEBUG.*|STATIC|SELINUX|BUILD_(AT_ONCE|LIBBUSYBOX)|FEATURE_(DEVFS|FULL_LIBBUSYBOX|SHARED_BUSYBOX|MTAB_SUPPORT|CLEAN_UP|UDHCP_DEBUG)|INSTALL_NO_USR))=.*/# \1 is not set/" .config 229 @$(SED) -i -r -e "s/^(CONFIG_(DEBUG.*|STATIC|SELINUX|BUILD_(AT_ONCE|LIBBUSYBOX)|FEATURE_(DEVFS|FULL_LIBBUSYBOX|SHARED_BUSYBOX|MTAB_SUPPORT|CLEAN_UP|UDHCP_DEBUG)|INSTALL_NO_USR))=.*/# \1 is not set/" .config
232 @./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null 230 @./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
233 231
234 232
235allbareconfig: scripts/config/conf 233allbareconfig: scripts/config/conf
236 @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null 234 @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
237 @$(SED) -i -r -e "s/^(USING_CROSS_COMPILER|CONFIG_(DEBUG|STATIC|SELINUX|DEVFSD|NC_GAPING_SECURITY_HOLE|BUILD_AT_ONCE)).*/# \1 is not set/" .config 235 @$(SED) -i -r -e "s/^(CONFIG_(DEBUG|STATIC|SELINUX|DEVFSD|NC_GAPING_SECURITY_HOLE|BUILD_AT_ONCE)).*/# \1 is not set/" .config
238 @$(SED) -i -e "/FEATURE/s/=.*//;/^[^#]/s/.*FEATURE.*/# \0 is not set/;" .config 236 @$(SED) -i -e "/FEATURE/s/=.*//;/^[^#]/s/.*FEATURE.*/# \0 is not set/;" .config
239 @echo "CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y" >> .config 237 @echo "CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y" >> .config
240 @yes n | ./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null 238 @yes n | ./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
diff --git a/Rules.mak b/Rules.mak
index 61f056661..58a4c3e70 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -24,22 +24,20 @@ BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
24# With a modern GNU make(1) (highly recommended, that's what all the 24# With a modern GNU make(1) (highly recommended, that's what all the
25# developers use), all of the following configuration values can be 25# developers use), all of the following configuration values can be
26# overridden at the command line. For example: 26# overridden at the command line. For example:
27# make CROSS=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app 27# make CROSS_COMPILE=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app
28#-------------------------------------------------------- 28#--------------------------------------------------------
29 29
30# If you are running a cross compiler, you will want to set 'CROSS' 30# If you are running a cross compiler, you will want to set CROSS_COMPILE
31# to something more interesting... Target architecture is determined 31# to something more interesting... Target architecture is determined
32# by asking the CC compiler what arch it compiles things for, so unless 32# by asking the CC compiler what arch it compiles things for, so unless
33# your compiler is broken, you should not need to specify TARGET_ARCH 33# your compiler is broken, you should not need to specify TARGET_ARCH
34CROSS =$(strip $(subst ",, $(strip $(CROSS_COMPILER_PREFIX)))) 34CC = $(CROSS_COMPILE)gcc
35# be gentle to vi coloring.. ")) 35AR = $(CROSS_COMPILE)ar
36CC = $(CROSS)gcc 36AS = $(CROSS_COMPILE)as
37AR = $(CROSS)ar 37LD = $(CROSS_COMPILE)ld
38AS = $(CROSS)as 38NM = $(CROSS_COMPILE)nm
39LD = $(CROSS)ld 39STRIP = $(CROSS_COMPILE)strip
40NM = $(CROSS)nm 40ELF2FLT = $(CROSS_COMPILE)elf2flt
41STRIP = $(CROSS)strip
42ELF2FLT = $(CROSS)elf2flt
43CPP = $(CC) -E 41CPP = $(CC) -E
44SED ?= sed 42SED ?= sed
45BZIP2 ?= bzip2 43BZIP2 ?= bzip2
@@ -64,7 +62,7 @@ CC_MAJOR:=$(shell printf "%02d" $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n
64CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1)) 62CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1))
65 63
66#-------------------------------------------------------- 64#--------------------------------------------------------
67export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP 65export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS_COMPILE CC AR AS LD NM STRIP CPP
68ifeq ($(strip $(TARGET_ARCH)),) 66ifeq ($(strip $(TARGET_ARCH)),)
69TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \ 67TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \
70 -e 's/i.86/i386/' \ 68 -e 's/i.86/i386/' \