[Toybox] [PATCH] Clean warnings generated by scripts/genconfig.sh

Rob Landley rob at landley.net
Mon Feb 27 22:42:20 PST 2012


On 02/28/2012 12:20 AM, Georgi Chorbadzhiyski wrote:
> The build environment is slackware-current with gcc 4.6.2, glibc
> 2.14.1 and kernel-headers-3.2.2. The interesting thing is that the build
> do not fail it just prints the above mentioned errors about CLONE_xxx
> flags but toybox is built. The following patch works as well:

The warnings are actually from the feature test probe in
scripts/genconfig.sh that generated the TOYBOX_CONTAINER config symbol
to indicate whether or not the build environment supports containers:

  http://lxc.sourceforge.net/index.php/about/kernel-namespaces/

Then CONFIG_UNSHARE depends on that, so the unshare command drops out if
the build environment doesn't support it.  (The goal is "make defconfig"
should always compile.)

The test should be piping its output to NULL, but 3.2 kernel headers
have all the stuff so the test _should_ succeed...

> diff -r 763d581badae scripts/genconfig.sh
> --- a/scripts/genconfig.sh      Sun Feb 26 22:04:37 2012 -0600
> +++ b/scripts/genconfig.sh      Tue Feb 28 08:17:23 2012 +0200
> @@ -14,7 +14,7 @@
> 
>    echo -e "# container support\nconfig TOYBOX_CONTAINER\n\tbool" ||
> return 1
>    $CC -c -xc -o /dev/null - << EOF
> -    #include <sched.h>
> +    #include <linux/sched.h>
>      int x=CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET;
>  EOF
>    [ $? -eq 0 ] && DEFAULT=y || DEFAULT=n

Works for me, but I would like to figure out why your build environment
wasn't already getting it.  _USE_BSD should enable it __USE_MISC, and
you should get _USE_BSD by default unless your command line said -ansi.

Rob

 1330411340.0


More information about the Toybox mailing list