CONFIG_* defines
Allan Clark
allanc at chickenandporn.com
Wed Sep 7 07:38:13 UTC 2005
Rob Landley wrote:
>On Tuesday 06 September 2005 12:39, Allan Clark wrote:
>
>
>>Busybox may co-exist with other projects that use Kconfig.
>>
>>
>
>Although only the kernel is likely to accidentally pollute the
>standard /usr/include namespace with CONFIG_ symbols, and for the kernel
>symbols to be in there is a BUG in the glibc headers.
>
>Any other projects that use Kconfig can call their symbols whatever they like
>and it won't affect us because we're not going to suck in their source code
>unmodified.
>
>
>
>>In short, I agree that BB_* or BUSYBOX_* is probably a good idea...
>>
>>
>
>I'm not attached to the ENABLE_ prefix, but I AM moving forward with the
>switch to 0 and 1 based configuration symbols you can use in C code rather
>than #ifdef and #ifndef stuff that turns C code into chop suey.
>
>http://www.literateprogramming.com/ifdefs.pdf
>
You're preaching to the choir here... but then, the Makefile hack is
still just a hack. Someone said they needed some make-fu... :)
I asusme you are not arguing for
const unsigned char bb_var = 1;
Is it therefore possible to implement
#define BB_var {0|1}
If there is a move, do it for the last time, with some bbconfig.h -foo
that lets us continue to build, then slowly weed-out the #defines that
do not conform. I assume I'm simply retelling another's wisdom here,
rather than inventing a fabulous labour-saving device called "wheel".
My real concern is the .config, Kconfig, Config.in stuff: something like
this does not clash with buildroot, so buildroot could include busybox
Config.in directly, reducing configuration to a (wow!) single config
file again. Granted, a REALLY BIG config file, but dependencies upon
BB_* variables could actually be done then, allowing, for example,
Qtopia's QPE to require BB_INIT (ie CONFIG_INIT in busybox).
> allanc at bj-0-11-d8-c7-7a-85:~/src/buildroot> head -20
> $(pwd)/build_arm/busybox/.config
> #
> # Automatically generated make config: don't edit
> #
> HAVE_DOT_CONFIG=y
> BB_HAVE_DOT_CONFIG=y
>
> #
> # General Configuration
> #
> # BB_FEATURE_BUFFERS_USE_MALLOC is not set
> BB_FEATURE_BUFFERS_GO_ON_STACK=y
> # BB_FEATURE_BUFFERS_GO_IN_BSS is not set
> BB_FEATURE_VERBOSE_USAGE=y
> # BB_FEATURE_INSTALLER is not set
> # BB_LOCALE_SUPPORT is not set
> # BB_FEATURE_DEVFS is not set
> BB_FEATURE_DEVPTS=y
> # BB_FEATURE_CLEAN_UP is not set
> BB_FEATURE_SUID=y
> # BB_FEATURE_SUID_CONFIG is not set
> # BB_SELINUX is not set
Allan
More information about the busybox
mailing list