[PATCH] .config.mak and CROSS_COMPILE fails with check_cc

Rob Landley rob at landley.net
Tue Jul 11 15:45:20 UTC 2006


On Monday 10 July 2006 1:17 pm, Shaun Jackman wrote:
> .config.mak is included after the check_cc macros run. The check_cc
> macro requires that CROSS_COMPILE be defined. The best solution I have
> is to move the inclusion of .config.mak up before the check_cc macro.
> Please apply or suggest an alternative solution.

I have another todo item here, which is cacheing the output of check_cc 
because it's really slow now that we're running dozens of them, and it runs 
even when you do "make help".

The check_cc or check_ld macros are used to set the following variables:
HOSTFLAGS
CHECKED_LDFLAGS
CHECKED_CFLAGS
OPTIMIZATION
LIB_LDFLAGS
STRIPCMD
CFLAGS_PIC

And here's what actually happens when it runs:

landley at driftwood:~/busybox/busybox$ make menuconfig BUILD_VERBOSE=2
CC="gcc" check_cc -Wall
CC="gcc" check_cc -Wstrict-prototypes
CC="gcc" check_cc -O2
CC="gcc" check_cc -fomit-frame-pointer
LD="ld" check_ld --warn-common
CC="gcc" check_cc -Wall
CC="gcc" check_cc -Wstrict-prototypes
CC="gcc" check_cc -Wshadow
CC="gcc" check_cc -funsigned-char
CC="gcc" check_cc -mmax-stack-frame=256
CC="gcc" check_cc -fno-builtin-strlen
CC="gcc" check_cc -finline-limit=0
CC="gcc" check_cc -Os
LD="ld" check_ld --enable-new-dtags
CC="gcc" check_cc -march=i386
CC="gcc" check_cc -mpreferred-stack-boundary=2
CC="gcc" check_cc -falign-functions=1 -falign-jumps=1 -falign-loops=1
CC="gcc" check_cc -fomit-frame-pointer
CC="gcc" check_cc -ffunction-sections -fdata-sections
LD="ld" check_ld --sort-common
LD="--gc-sections" check_ld
STRIPCMD="strip" 
check_strip -s --remove-section=.note --remove-section=.comment
CC="gcc" check_cc -shared
make -C /home/landley/busybox/busybox \
        top_srcdir=/home/landley/busybox/busybox \
        top_builddir=/home/landley/busybox/busybox \
        BUILD_SRC=/home/landley/busybox/busybox \
        -f /home/landley/busybox/busybox/Makefile menuconfig
CC="gcc" check_cc -Wall
CC="gcc" check_cc -Wstrict-prototypes
CC="gcc" check_cc -O2
CC="gcc" check_cc -fomit-frame-pointer
LD="ld" check_ld --warn-common
CC="gcc" check_cc -Wall
CC="gcc" check_cc -Wstrict-prototypes
CC="gcc" check_cc -Wshadow
CC="gcc" check_cc -funsigned-char
CC="gcc" check_cc -mmax-stack-frame=256
CC="gcc" check_cc -fno-builtin-strlen
CC="gcc" check_cc -finline-limit=0
CC="gcc" check_cc -Os
LD="ld" check_ld --enable-new-dtags
CC="gcc" check_cc -march=i386
CC="gcc" check_cc -mpreferred-stack-boundary=2
CC="gcc" check_cc -falign-functions=1 -falign-jumps=1 -falign-loops=1
CC="gcc" check_cc -fomit-frame-pointer
CC="gcc" check_cc -ffunction-sections -fdata-sections
LD="ld" check_ld --sort-common
LD="--gc-sections" check_ld
STRIPCMD="strip" 
check_strip -s --remove-section=.note --remove-section=.comment
CC="gcc" check_cc -shared
make -C scripts/config ncurses conf mconf
CC="gcc" check_cc -Wall
CC="gcc" check_cc -Wstrict-prototypes
CC="gcc" check_cc -O2
CC="gcc" check_cc -fomit-frame-pointer
LD="ld" check_ld --warn-common
CC="gcc" check_cc -Wall
CC="gcc" check_cc -Wstrict-prototypes
CC="gcc" check_cc -Wshadow
CC="gcc" check_cc -funsigned-char
CC="gcc" check_cc -mmax-stack-frame=256
CC="gcc" check_cc -fno-builtin-strlen
CC="gcc" check_cc -finline-limit=0
CC="gcc" check_cc -Os
LD="ld" check_ld --enable-new-dtags
CC="gcc" check_cc -march=i386
CC="gcc" check_cc -mpreferred-stack-boundary=2
CC="gcc" check_cc -falign-functions=1 -falign-jumps=1 -falign-loops=1
CC="gcc" check_cc -fomit-frame-pointer
CC="gcc" check_cc -ffunction-sections -fdata-sections
LD="ld" check_ld --sort-common
LD="--gc-sections" check_ld
STRIPCMD="strip" 
check_strip -s --remove-section=.note --remove-section=.comment
CC="gcc" check_cc -shared

Sad, isn't it?

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list