thanks, mkflags is working now. i still need this to build "defconfig" out of the box at your ToT on glibc though:
Fix glibc build. ./lib/portability.h:265:1: error: unknown type name 'ssize_t' ssize_t fgetxattr (int fd, char *name, void *value, size_t size); diff --git a/lib/portability.h b/lib/portability.h index b25048f..91dc2ec 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -28,6 +28,9 @@ #include <features.h> +// Ensure types such as ssize_t are available for the prototypes below. +#include <sys/types.h> + // Various constants old build environments might not have even if kernel does #ifndef AT_FDCWD On Sun, May 3, 2015 at 11:27 AM, Rob Landley <[email protected]> wrote: > On 05/02/2015 02:54 PM, enh wrote: >> anyone else having trouble with "make menuconfig"? getprop and setprop >> aren't showing up for me, and i don't see where to set >> CONFIG_TOYBOX_ON_ANDROID and generated/mkflags segfaults if i have ls >> configured and... >> >> actually, downloading a clean toybox git repo, "make defconfig && >> make" reproduces the segfault, so at least it's not Android-specific. >> posting early in case anyone's already debugged this... > > FYI I had a test wrong in the config parser. It was triggered by > configuring out a command line option that was the last (leftmost) short > option in a config that also had bare longopts. > > The option parsing gets an option string for the current config, and > another option string for allyesconfig (so it can stick in #define > FLAG_switchedoff 0" for the disabled stuff). It parses each one into its > own linked list (flist for flag list, alist for allyesconfig flag list), > and then traverses the two lists together comparing them to see whether > a config entry is enabled or disabled. > > When it got to the above case, flist wasn't NULL because there were > still longopts, but flist->command was null because those longopts > weren't an alias for a shortopt. (They were bare --longopts with no > corresponding -x shortopt.) > > The segfaulting line was: > > if (flist && (alist->command && *flist->command==*alist->command)) > > Which is wrong because flist->command was NULL and got dereferenced. The > middle test there should be flist->command, not alist->command. (You > should never have alist->command null when flist->command isn't, because > allyesconfig should never be _missing_ anything that's in the current > config.) > > So yeah, strightforward outright bug. Just took a bit to track down. Fix > checked in now. > > Rob -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Android native code/tools questions? Mail me/drop by/add me as a reviewer. _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
