From: Greg C. <chi...@co...> - 2005-08-07 22:32:48
|
On 2005-8-7 16:59 UTC, Jonathan Turkanis wrote: > > Hugh Perkins wrote: > >>Well, I've been playing with using an adapted version of cccl, and >>setting CC to cccl and CXX to cccl prior to running configure. >> >>This way, cccl handles the // escaping for you. > > Thanks for mentioning cccl; I wasn't aware of it. Neither was I. Here's a brief summary for the list: http://cccl.sourceforge.net/ | cccl is a wrapper around Microsoft Visual C++'s cl.exe and link.exe. It | converts Unix compiler parameters into parameters understood by cl and link. | cccl's main use is for using Unix build processes with Microsoft compilers. > Unfortunately, in addition to > the Microsoft compiler, I need to handle Borland and Comeau for Windows, which > also use '/' switches. I'd like to know how you're supporting other compilers. I'm sort of supporting borland and comeau for my main project (although borland's so out of date that I've given up on using it with modern C++). For borland, years ago I wrote wrappers that sound just like cccl. Maybe I should publish them. For comeau, I've gotten sort of stuck. The thorniest problem is that the msw 'como' driver seems to be calling system() in a way that requires $(ComSpec) to point to an ms shell like CMD.EXE . My notes say: http://savannah.nongnu.org/cgi-bin/viewcvs/*checkout*/lmi/lmi/como_4_3_3.make?rev=1.5 # Comeau C++ for msw expects its bin/ directory to be on the path and # the environment to contain a path to gcc. Furthermore, it expects # to invoke msw subshells. However, we prefer *nix shells and want to # put nothing compiler specific in the environment. and go on to explain how I concluded that something like sh -c "ComSpec=C:\\\\WINDOWS\\\\SYSTEM32\\\\CMD.EXE; $(MAKE) -f makefile" is the least yicky workaround. But it's still yicky, and I'd very much like to know if you've found something better. I fear I'm veering off topic for this list: these quirks are probably very specific to Comeau C++. If this isn't the place, I'd welcome your thoughts in email or on my list here: http://lists.nongnu.org/mailman/listinfo/lmi I did bring this up with Comeau, but it's not something many of their customers are interested in. |