From: Michael K. <mic...@gm...> - 2008-09-26 20:51:46
|
Sam Steingold wrote: > Reini Urban wrote: >> 2008/9/25 Reini Urban <ru...@x-...>: >>> So it must be the linker pulling in the cygwin version for _errno(). >> The reason for this failure is >> # **HACK**: utilities must run locally >> UTILCC=cc >> in Makefile. > > this is a cross-compiling hack. > mingw sets UTILCC=gcc 2 lines above. > >> Linking a mingw32 gllib/malloc.o with the cygwin compiled utils does >> not work. > > I thought we agreed that a file compiled for mingw is just an ordinary windows > object and CAN be linked into a cygwin executable. > <http://article.gmane.org/gmane.lisp.clisp.devel/19095> Yes, but I think the required mingw libs must be linked with the proper lib(s) manually (because they are not included via the compiler specs when linking without -mno-cygwin) !? Linking with -L/usr/i686-pc-mingw32/lib -lcrtdll worked for me, ie ./configure and then edit Makefile: # **HACK**: avoid -mno-cygwin so that utilities understand symbolic links UTILCC=gcc comment5.exe : ../utils/comment5.c $(UTILCC) $(CPPFLAGS) $(CFLAGS) $(CLFLAGS) gllib/malloc.o -L/usr/i686-pc-mingw32/lib -lcrtdll ../utils/comment5.c -o comment5.exe gctrigger.exe : ../utils/gctrigger.c $(UTILCC) $(CPPFLAGS) $(CFLAGS) $(CLFLAGS) gllib/malloc.o -L/usr/i686-pc-mingw32/lib -lcrtdll ../utils/gctrigger.c -o gctrigger.exe varbrace.exe : ../utils/varbrace.c $(UTILCC) $(CPPFLAGS) $(CFLAGS) $(CLFLAGS) gllib/malloc.o -L/usr/i686-pc-mingw32/lib -lcrtdll ../utils/varbrace.c -o varbrace.exe txt2c.exe : ../utils/txt2c.c $(UTILCC) $(CPPFLAGS) $(CFLAGS) $(CLFLAGS) gllib/malloc.o -L/usr/i686-pc-mingw32/lib -lcrtdll ../utils/txt2c.c -o txt2c.exe ccmp2c.exe : ../utils/ccmp2c.c $(UTILCC) $(CPPFLAGS) $(CFLAGS) $(CLFLAGS) gllib/malloc.o -L/usr/i686-pc-mingw32/lib -lcrtdll ../utils/ccmp2c.c -o ccmp2c.exe This gets me to the same point as yesterday: lisp.exe is built but creating calls.o fails (conflicting types for __p___argv in calls.c, see <news://news.gmane.org:119/48D...@gm...>) I get the same result on two different machines. Yaroslav cannot help btw, he does not use cygwin. Any opinions? Regards Michael |