[SeaBIOS] problem building from Windows using msys

Scott Duplichan scott at notabs.org
Mon Jun 2 05:31:39 CEST 2014


Building SeaBIOS from Windows using mingw has been broken for
a long time. The problem is that in this environment, line 100
of the makefile:

   $(Q)printf '$(foreach i,$2,#include "$(CURDIR)/$i"\n)' > $3.tmp.c

creates an include statement that the mingw port of gcc rejects:

   #include "/D/coreboot/build/seabios/src/misc.c"

Msys converts the Windows drive letter D:\ to a more
Unix-like /D/. But the mingw port of gcc needs D:\, not /d/.
While this problem might not be easy to solve, I did find
a work-around: use relative paths in the include statements
rather than absolute paths. In other words, change makefile
line 100 from this:

   $(Q)printf '$(foreach i,$2,#include "$(CURDIR)/$i"\n)' > $3.tmp.c
to this:
   $(Q)printf '$(foreach i,$2,#include "../$i"\n)' > $3.tmp.c

This solves the problem for Windows. Would it break the build
in Linux environments? If so, I could just use this change
locally. But even that is not easy. The way the coreboot 
makefile is written causes git to enforce use of unmodified
SeaBIOS. To work around this, I tried to make a sed command
to apply this change temporarily. But I cannot figure out
the needed quoting to pass $(CURDIR) to sed without expansion.

Thanks,
Scott
 







More information about the SeaBIOS mailing list