[coreboot] mingw build problem with seabios/tools/kconfig

Kevin O'Connor kevin at koconnor.net
Sun Mar 13 23:52:53 CET 2011

On Sat, Mar 12, 2011 at 09:47:56PM -0600, Scott Duplichan wrote:
> Hello,
> I am trying to overcome problems building seabios/tools/kconfig from
> the windows/mingw environment. Here are the failures:
> 1) Link step for tools/kconfig/conf fails to find regcomp/regexec/regfree.
>    In the mingw environment these functions are available in libregex, 
>    but libregex is not included in the standard library search. I have
>    not found a way to add '-lregex' to the link command line:
>    $(Q)$(HOSTCC) $(HOSTLDFLAGS) -o $@ $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
>    HOSTLDFLAGS occurs too early in the file list for this use.

Can you add it to HOST_LOADLIBES?

> 2) Link step for tools/kconfig/conf fails to find function uname().
>    I can come up with a library to provide this function but need
>    help passing it to the linker, same as with item 1.
> 3) Function mkdir() takes only one argument in the mingw environment,
>    yet takes 2 arguments otherwise. I have not found a good way to 
>    overcome this difference.

What about making a file "mingw_fixups.h" and changing the HOSTCFLAGS
to add "-include mingw_fixups.h".  The header can then do something

#define uname(arg1) memset(arg1, 0, sizeof(*arg1))
#define mkdir(arg1,arg2) mkdir(arg1)


More information about the coreboot mailing list