[Toybox] Make Errors
Isaac Dunham
ibid.ag at gmail.com
Sun Aug 30 21:59:27 PDT 2015
On Sun, Aug 30, 2015 at 06:57:42PM -0700, Brent Hostetler wrote:
> I could use some help trying to build toybox.
>
>
> I have tried building the last three versions and get the same basic errors:
>
> [rking at rkmini toybox-0.5.2]$ make defconfig
> cc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
> -DPROJECT_NAME=\"ToyBox\"
> In file included from kconfig/zconf.tab.c:158:0:
> kconfig/zconf.hash.c:161:43: warning: ‘kconf_id_strings_contents’ is static
> but used in inline function ‘kconf_id_lookup’ which is not static
> #define kconf_id_strings ((const char *) &kconf_id_strings_contents)
> ^
> kconfig/zconf.hash.c:233:44: note: in expansion of macro ‘kconf_id_strings’
> register const char *s = o + kconf_id_strings;
> ^
> kconfig/zconf.hash.c:226:26: warning: ‘kconf_id_hash’ is static but used in
> inline function ‘kconf_id_lookup’ which is not static
> register int key = kconf_id_hash (str, len);
> ^
> kconfig/zconf.hash.c:177:26: warning: ‘wordlist’ is static but declared in
> inline function ‘kconf_id_lookup’ which is not static
> static struct kconf_id wordlist[] =
> ^
> /tmp/cc8dkAWm.o: In function `zconfparse':
> zconf.tab.c:(.text+0xa59): undefined reference to `kconf_id_lookup'
[snip]
> [rking at rkmini toybox-0.5.2]$ gcc --version
> gcc (GCC) 5.2.0
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Evidently, GCC 5.2, at least as shipped by your distro (Arch? I don't
know who else is that bleeding edge) has found a new way to break things:
refuse to accept use of static variables in non-static inline functions.
This is breaking kconfig (note: we use an old version from Linux 2.6.12
via Busybox that's going to get ripped out and replaced eventually).
I'm not sure about how much sense any of this makes, given that "static"
means different things depending on scope:
-an otherise global object is limited to per-file visibility
-a local object becomes persistent across calls to the function
But it *should* be possible to add a "static" to kconf_id_lookup (in
kconfig/zconf.hash.c_shipped); I have not tested this.
HTH,
Isaac
1440997167.0
More information about the Toybox
mailing list