[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] LDFLAGS configuration
From: "Shaun Jackman" <sjackman () gmail ! com>
Date: 2006-06-30 22:19:56
Message-ID: 7f45d9390606301519n54768df5nbeae4b5856f713e5 () mail ! gmail ! com
[Download RAW message or body]
On 6/9/06, Rob Landley <rob@landley.net> wrote:
> On Thursday 08 June 2006 6:22 pm, Shaun Jackman wrote:
> > On 6/8/06, Shaun Jackman <sjackman@gmail.com> wrote:
> > > I agree. I'd also like to see CROSS_COMPILER_PREFIX renamed to
> > > CROSS_COMPILE, as Linux names it. It makes sense to do it at the same
> > > time it's remove from .config.
> >
> > I just noticed that although the config option was named
> > CROSS_COMPILER_PREFIX, the make variable was named CROSS. So, do the
> > maintainers prefer to keep the make variable named CROSS, or switch to
> > the Linux name, CROSS_COMPILE? I can see benefits to both, but we
> > should pick one definitively.
>
> Go with CROSS_COMPILE. You only have to build three things for a minimal
> embedded system: the Linux Kernel, uClibc, and BusyBox. It would be nice if
> they all worked roughly the same way...
As discussed above. Please apply.
Cheers,
Shaun
2006-06-30 Shaun Jackman <sjackman@gmail.com>
* (CROSS) Rename to CROSS_COMPILE and move its configuration to
.config.mak.
--- Config.in b10dee40886da70ea8ecffe5c30160ecc4b3a272
+++ Config.in 80723d0826e02f192ef8715a6bc86f1af0e83bb5
@@ -289,24 +289,6 @@
cp, mount, tar, and many others. If you want to access files larger
than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
-config USING_CROSS_COMPILER
- bool "Do you want to build BusyBox with a Cross Compiler?"
- default n
- help
- Do you want to build BusyBox with a Cross Compiler? If so,
- then enable this option. Otherwise leave it set to 'N'.
-
-config CROSS_COMPILER_PREFIX
- string "Cross Compiler prefix"
- default "/usr/i386-linux-uclibc/bin/i386-uclibc-"
- depends on USING_CROSS_COMPILER
- help
- If you want to build BusyBox with a cross compiler, then you
- will need to set this to the cross-compiler prefix. For example,
- if my cross-compiler is /usr/i386-linux-uclibc/bin/i386-uclibc-gcc
- then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here,
- which will ensure the correct compiler is used.
-
config CONFIG_BUILD_AT_ONCE
bool "Compile all sources at once"
default n
============================================================
--- Makefile 4df29d31115b5c0169d05aec13176ad729730655
+++ Makefile 04f799f965031624109a130c6a94d83fffd1fd8c
@@ -216,8 +216,6 @@
allyesconfig: scripts/config/conf
@./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
- @$(SED) -i -r -e "s/^(USING_CROSS_COMPILER)=.*/# \1 is not set/" .config
- @./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
allnoconfig: scripts/config/conf
@./scripts/config/conf -n $(CONFIG_CONFIG_IN) > /dev/null
@@ -228,13 +226,13 @@
defconfig: scripts/config/conf
@./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
- @$(SED) -i -r -e
"s/^(USING_CROSS_COMPILER|CONFIG_(DEBUG.*|STATIC|SELINUX|BUILD_(AT_ONCE|LIBBUSYBOX)|FE \
ATURE_(DEVFS|FULL_LIBBUSYBOX|SHARED_BUSYBOX|MTAB_SUPPORT|CLEAN_UP|UDHCP_DEBUG)|INSTALL_NO_USR))=.*/#
\1 is not set/" .config
+ @$(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
@./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
allbareconfig: scripts/config/conf
@./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
- @$(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
+ @$(SED) -i -r -e
"s/^(CONFIG_(DEBUG|STATIC|SELINUX|DEVFSD|NC_GAPING_SECURITY_HOLE|BUILD_AT_ONCE)).*/#
\1 is not set/" .config
@$(SED) -i -e "/FEATURE/s/=.*//;/^[^#]/s/.*FEATURE.*/# \0 is not
set/;" .config
@echo "CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y" >> .config
@yes n | ./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
============================================================
--- Rules.mak 0d45bd5300f0dab73b6c5eebb6bf125f2842eaf5
+++ Rules.mak 3cc3486b4ffa1784ec5b6e524e609d50e177e04e
@@ -24,22 +24,20 @@
# With a modern GNU make(1) (highly recommended, that's what all the
# developers use), all of the following configuration values can be
# overridden at the command line. For example:
-# make CROSS=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app
+# make CROSS_COMPILE=powerpc-linux- top_srcdir="$HOME/busybox"
PREFIX=/mnt/app
#--------------------------------------------------------
-# If you are running a cross compiler, you will want to set 'CROSS'
+# If you are running a cross compiler, you will want to set CROSS_COMPILE
# to something more interesting... Target architecture is determined
# by asking the CC compiler what arch it compiles things for, so unless
# your compiler is broken, you should not need to specify TARGET_ARCH
-CROSS =$(strip $(subst ",, $(strip $(CROSS_COMPILER_PREFIX))))
-# be gentle to vi coloring.. "))
-CC = $(CROSS)gcc
-AR = $(CROSS)ar
-AS = $(CROSS)as
-LD = $(CROSS)ld
-NM = $(CROSS)nm
-STRIP = $(CROSS)strip
-ELF2FLT = $(CROSS)elf2flt
+CC = $(CROSS_COMPILE)gcc
+AR = $(CROSS_COMPILE)ar
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+NM = $(CROSS_COMPILE)nm
+STRIP = $(CROSS_COMPILE)strip
+ELF2FLT = $(CROSS_COMPILE)elf2flt
CPP = $(CC) -E
SED ?= sed
BZIP2 ?= bzip2
@@ -64,7 +62,7 @@
CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC)
-E -xc - | tail -n 1))
#--------------------------------------------------------
-export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP
+export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS_COMPILE CC AR AS LD
NM STRIP CPP
ifeq ($(strip $(TARGET_ARCH)),)
TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \
-e 's/i.86/i386/' \
["busybox-cross.diff" (text/plain)]
2006-06-30 Shaun Jackman <sjackman@gmail.com>
* (CROSS) Rename to CROSS_COMPILE and move its configuration to
.config.mak.
--- Config.in b10dee40886da70ea8ecffe5c30160ecc4b3a272
+++ Config.in 80723d0826e02f192ef8715a6bc86f1af0e83bb5
@@ -289,24 +289,6 @@
cp, mount, tar, and many others. If you want to access files larger
than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
-config USING_CROSS_COMPILER
- bool "Do you want to build BusyBox with a Cross Compiler?"
- default n
- help
- Do you want to build BusyBox with a Cross Compiler? If so,
- then enable this option. Otherwise leave it set to 'N'.
-
-config CROSS_COMPILER_PREFIX
- string "Cross Compiler prefix"
- default "/usr/i386-linux-uclibc/bin/i386-uclibc-"
- depends on USING_CROSS_COMPILER
- help
- If you want to build BusyBox with a cross compiler, then you
- will need to set this to the cross-compiler prefix. For example,
- if my cross-compiler is /usr/i386-linux-uclibc/bin/i386-uclibc-gcc
- then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here,
- which will ensure the correct compiler is used.
-
config CONFIG_BUILD_AT_ONCE
bool "Compile all sources at once"
default n
============================================================
--- Makefile 4df29d31115b5c0169d05aec13176ad729730655
+++ Makefile 04f799f965031624109a130c6a94d83fffd1fd8c
@@ -216,8 +216,6 @@
allyesconfig: scripts/config/conf
@./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
- @$(SED) -i -r -e "s/^(USING_CROSS_COMPILER)=.*/# \1 is not set/" .config
- @./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
allnoconfig: scripts/config/conf
@./scripts/config/conf -n $(CONFIG_CONFIG_IN) > /dev/null
@@ -228,13 +226,13 @@
defconfig: scripts/config/conf
@./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
- @$(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 + @$(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 @./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
allbareconfig: scripts/config/conf
@./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
- @$(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 + @$(SED) -i -r -e \
"s/^(CONFIG_(DEBUG|STATIC|SELINUX|DEVFSD|NC_GAPING_SECURITY_HOLE|BUILD_AT_ONCE)).*/# \
\1 is not set/" .config @$(SED) -i -e "/FEATURE/s/=.*//;/^[^#]/s/.*FEATURE.*/# \0 is \
not set/;" .config @echo "CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y" >> .config
@yes n | ./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
============================================================
--- Rules.mak 0d45bd5300f0dab73b6c5eebb6bf125f2842eaf5
+++ Rules.mak 3cc3486b4ffa1784ec5b6e524e609d50e177e04e
@@ -24,22 +24,20 @@
# With a modern GNU make(1) (highly recommended, that's what all the
# developers use), all of the following configuration values can be
# overridden at the command line. For example:
-# make CROSS=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app
+# make CROSS_COMPILE=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app
#--------------------------------------------------------
-# If you are running a cross compiler, you will want to set 'CROSS'
+# If you are running a cross compiler, you will want to set CROSS_COMPILE
# to something more interesting... Target architecture is determined
# by asking the CC compiler what arch it compiles things for, so unless
# your compiler is broken, you should not need to specify TARGET_ARCH
-CROSS =$(strip $(subst ",, $(strip $(CROSS_COMPILER_PREFIX))))
-# be gentle to vi coloring.. "))
-CC = $(CROSS)gcc
-AR = $(CROSS)ar
-AS = $(CROSS)as
-LD = $(CROSS)ld
-NM = $(CROSS)nm
-STRIP = $(CROSS)strip
-ELF2FLT = $(CROSS)elf2flt
+CC = $(CROSS_COMPILE)gcc
+AR = $(CROSS_COMPILE)ar
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+NM = $(CROSS_COMPILE)nm
+STRIP = $(CROSS_COMPILE)strip
+ELF2FLT = $(CROSS_COMPILE)elf2flt
CPP = $(CC) -E
SED ?= sed
BZIP2 ?= bzip2
@@ -64,7 +62,7 @@
CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail \
-n 1))
#--------------------------------------------------------
-export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP
+export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS_COMPILE CC AR AS LD NM STRIP CPP
ifeq ($(strip $(TARGET_ARCH)),)
TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \
-e 's/i.86/i386/' \
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic