Patch from Shaun Jackman to replace CFLAGS_EXTRA with .config.mak
This commit is contained in:
parent
67d4943393
commit
1fa4a9448b
@ -307,15 +307,6 @@ config CROSS_COMPILER_PREFIX
|
|||||||
then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here,
|
then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here,
|
||||||
which will ensure the correct compiler is used.
|
which will ensure the correct compiler is used.
|
||||||
|
|
||||||
config EXTRA_CFLAGS_OPTIONS
|
|
||||||
string "Any extra CFLAGS options for the compiler?"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Do you want to pass any extra CFLAGS options to the compiler as
|
|
||||||
you build BusyBox? If so, this is the option for you... For example,
|
|
||||||
if you want to add some simple compiler switches (like -march=i686),
|
|
||||||
or check for warnings using -Werror, just those options here.
|
|
||||||
|
|
||||||
config CONFIG_BUILD_AT_ONCE
|
config CONFIG_BUILD_AT_ONCE
|
||||||
bool "Compile all sources at once"
|
bool "Compile all sources at once"
|
||||||
default n
|
default n
|
||||||
|
22
Rules.mak
22
Rules.mak
@ -52,26 +52,6 @@ TARGET_OS=linux
|
|||||||
# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
|
# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
|
||||||
LC_ALL:= C
|
LC_ALL:= C
|
||||||
|
|
||||||
# If you want to add some simple compiler switches (like -march=i686),
|
|
||||||
# especially from the command line, use this instead of CFLAGS directly.
|
|
||||||
# For optimization overrides, it's better still to set OPTIMIZATION.
|
|
||||||
CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS)))
|
|
||||||
# be gentle to vi coloring.. ")
|
|
||||||
|
|
||||||
# To compile vs some other alternative libc, you may need to use/adjust
|
|
||||||
# the following lines to meet your needs...
|
|
||||||
#
|
|
||||||
# If you are using Red Hat 6.x with the compatible RPMs (for developing under
|
|
||||||
# Red Hat 5.x and glibc 2.0) uncomment the following. Be sure to read about
|
|
||||||
# using the compatible RPMs (compat-*) at http://www.redhat.com !
|
|
||||||
#LIBCDIR:=/usr/i386-glibc20-linux
|
|
||||||
#
|
|
||||||
# For other libraries, you are on your own. But these may (or may not) help...
|
|
||||||
#LDFLAGS+=-nostdlib
|
|
||||||
#LIBRARIES:=$(LIBCDIR)/lib/libc.a -lgcc
|
|
||||||
#CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR) -funsigned-char
|
|
||||||
#GCCINCDIR:=$(shell gcc -print-search-dirs | $(SED) -ne "s/install: \(.*\)/\1include/gp")
|
|
||||||
|
|
||||||
# This must bind late because srcdir is reset for every source subdirectory.
|
# This must bind late because srcdir is reset for every source subdirectory.
|
||||||
INCS:=-I$(top_builddir)/include -I$(top_srcdir)/include
|
INCS:=-I$(top_builddir)/include -I$(top_srcdir)/include
|
||||||
CFLAGS=$(INCS) -I$(srcdir) -D_GNU_SOURCE
|
CFLAGS=$(INCS) -I$(srcdir) -D_GNU_SOURCE
|
||||||
@ -343,7 +323,7 @@ endif
|
|||||||
|
|
||||||
# Put user-supplied flags at the end, where they
|
# Put user-supplied flags at the end, where they
|
||||||
# have a chance of winning.
|
# have a chance of winning.
|
||||||
CFLAGS += $(CFLAGS_EXTRA)
|
-include $(top_builddir)/.config.mak
|
||||||
|
|
||||||
#------------------------------------------------------------
|
#------------------------------------------------------------
|
||||||
# Installation options
|
# Installation options
|
||||||
|
2
TODO
2
TODO
@ -179,7 +179,7 @@ Memory Allocation
|
|||||||
allocation on the stack or the heap. Unfortunately, we're not using it much.
|
allocation on the stack or the heap. Unfortunately, we're not using it much.
|
||||||
We need to audit our memory allocations and turn a lot of malloc/free calls
|
We need to audit our memory allocations and turn a lot of malloc/free calls
|
||||||
into RESERVE_CONFIG_BUFFER/RELEASE_CONFIG_BUFFER.
|
into RESERVE_CONFIG_BUFFER/RELEASE_CONFIG_BUFFER.
|
||||||
For a start, see e.g. make CFLAGS_EXTRA=-Wlarger-than-64
|
For a start, see e.g. make EXTRA_CFLAGS=-Wlarger-than-64
|
||||||
|
|
||||||
And while we're at it, many of the CONFIG_FEATURE_CLEAN_UP #ifdefs will be
|
And while we're at it, many of the CONFIG_FEATURE_CLEAN_UP #ifdefs will be
|
||||||
optimized out by the compiler in the stack allocation case (since there's no
|
optimized out by the compiler in the stack allocation case (since there's no
|
||||||
|
@ -174,7 +174,7 @@ typedef unsigned long long int uintmax_t;
|
|||||||
/* uclibc does not implement daemon for no-mmu systems.
|
/* uclibc does not implement daemon for no-mmu systems.
|
||||||
* For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably.
|
* For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably.
|
||||||
* For earlier versions there is no reliable way to check if we are building
|
* For earlier versions there is no reliable way to check if we are building
|
||||||
* for a mmu-less system; the user should pass CFLAGS_EXTRA="-DBB_NOMMU"
|
* for a mmu-less system; the user should pass EXTRA_CFLAGS="-DBB_NOMMU"
|
||||||
* on his own.
|
* on his own.
|
||||||
*/
|
*/
|
||||||
#if defined __UCLIBC__ && __UCLIBC_MAJOR__ >= 0 && __UCLIBC_MINOR__ >= 9 && \
|
#if defined __UCLIBC__ && __UCLIBC_MAJOR__ >= 0 && __UCLIBC_MINOR__ >= 9 && \
|
||||||
|
Loading…
Reference in New Issue
Block a user