[LinuxBIOS] buildrom: bin/mklibs.py

Jordan Crouse jordan.crouse at amd.com
Thu Sep 6 04:45:01 CEST 2007

On 05/09/07 18:22 -0400, Ward Vandewege wrote:
> OK, so this one is a workaround. I'm not sure what the proper fix would be.
> I'd be grateful for comments on how to solve this in a better way. The
> mklibs.py script is stripping one symbol too much (__ctype_toupper) from the
> uclibc libc, which breaks busybox. This might be toolchain dependent - I've
> done my testing on Gnewsense Deltad (aka Ubuntu Dapper Drake) with GCC 4.1.0.

sigh - we've seen issues with ctype functions before, and I'm just not really
clear on the best way to handle them.  It seems that there is some sort of
obfustication going on in the ctype.h header file that somehow filters
down to pain in uclibc/busybox.  This work around is as good as any - if 
anything, it costs us a few bytes in an extra possibly not needed function,
but thats not so bad.

Acked-by: Jordan Crouse <jordan.crouse at amd.com>

> Thanks,
> Ward.
> -- 
> Ward Vandewege <ward at fsf.org>
> Free Software Foundation - Senior System Administrator

> This is a workaround for a bug in the mklibs.py script.
> Signed-off-by: Ward Vandewege <ward at gnu.org>
> Index: bin/mklibs.py
> ===================================================================
> --- bin/mklibs.py       (revision 17)
> +++ bin/mklibs.py       (working copy)
> @@ -472,6 +472,10 @@
>  # to be the only one and including it on alpha as well
>  # doesn't hurt. I guess all archs can live with this.
>  needed_symbols.add(("sys_siglist", 1))
> +# For some reason this symbol is needed by busybox but not included in the
> +# stripped libc...
> +# Ward Vandewege, 2007-08-30
> +needed_symbols.add(("__ctype_toupper", 1))
>  while True:
>      debug(DEBUG_NORMAL, "library reduction pass", `passnr`)

> -- 
> linuxbios mailing list
> linuxbios at linuxbios.org
> http://www.linuxbios.org/mailman/listinfo/linuxbios

Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.

More information about the coreboot mailing list