wgcc is a cross-compiler tool primarily written for Microsoft's Interix. Its primary purpose is to produce native Windows binaries (internally using the Microsoft Tool chain), and to mimic the behaviour of the GNU compiler collection. This means that wgcc understands many of GCC's command line arguments, and in most cases delivers the same results as expected, sometimes manipulating the underlying tool's input and output.
Even though wgcc was written for Interix only, it can be used on native Windows (without Interix), and other Systems, like Cygwin. The only restriction is that on Platforms other than Interix, only Windows style paths are understood. With the release of version 2.0.1 this changed. Now Cygwin too is able to convert paths correctly. On Interix (and now Cygwin) wgcc automatically converts UNIX style paths to Windows style ones (i.e. /wgcc to C:\SFU\wgcc).
wgcc abstracts away lots of inconveniences that are introduced by building static libraries, shared libraries (DLL's) and executables with any possible combination of those three. When using wgcc both static and shared libraries behave exactly the same on Windows, and this makes tons of defines unnecessary. The only thing that still has to be done is to give all Data symbols (i.e. Variables) an import attribute (__declspec(dllimport)) when using them (i.e. in the library header files) in an executable. For a simple example take a look at the file tests/shared.test inside the wgcc distribution.
This major release of wgcc fixes lots of small and not so small bugs. First a critical big in the Environment handling was fixed that cause wgcc to crash, when CPATH or any other Environment Variable grew larger than 4096 bytes. Regarding the build Environment there where also problems handling a default installation of Visual Studio, since it has Whitespaces in the pathname. Whitespaces are now supported, but for the Visual Studio installation *only*. None of the paths passed on the command line should have spaces in them.
If wgcc fails to resolve a library passed on the command line, it now aborts, and does not issue a warning only. This is because wgcc would fail anyway a few actions later, since all other tasks rely on the existance of the library. If wgcc cannot resolve it, nobody should be able to do so.
The Microsoft Tool dumpbin.exe cannot handle large commandlines (really large ones), so wgcc now uses the @file sheme to pass arguments.
Wgcc no passes the /Zc:wchar_t Option to the compiler by default. This is default on Visual Studio 2005 anyways, but on older versions this brought up some issues with the boost library and wide charackter support.
Libraries that resolve to a path that includes "/usr/" somewhere in it are now ignored, and a warning is issued. One should not install wgcc in /usr/... since this creates big confusion. Additionally to avoid such confusion the pxwc library installs it's header files in $prefix/include/pxwc instead of $prefix/include, since the old behaviour was able to overwrite the interix unistd.h if a bad prefix was chosen.
The import generator now listens for a configuration option import-filter. This filter is applied to library names. Each name that matches gets excluded from import trampoline generation. This means that neither explicit nor implicit exports are searched to create import pointers for static libraries. Use this if you don't want references to specific object files in a library. Without this you really need to be carefull with global variables! The value for the option can be something like "libsomething*|libsecond*" without the quotes. The star (*) is allowed as first and/or last charackter of one filter. Filters are delimited by the bar (|) sign.
Optimized code generated using wgcc now does not include global optimization (/Og) anymore, since this brought up some issues in a few special cases. Since it does not work allways it is disabled by default. It can still be enabled by passing -X/Og to wgcc on the command line, or by adding /Og to the compiler default options in the .wgccrc configuration file.
Wgcc now supports dependency tracking (gcc3 style). All Commandline Options regarding dependency tracking are implemented. There still are a few issues with this feature: the -MQ option does exactly the same as -MT, and does not as expected generate a quoted target name. Also wgcc does not take into account any #define's and #if's. It only looks at #include's and resolves them. Whenever a file is not found, wgcc issues a warning, and ignores that file. All other files are added to the dependencies. Therefore one may have more dependencies as expected, but they should not break anything. The last thing is, that wgcc, by default, allways ignores system directories, even with -M and -MD. This is reflected by the "dep-no-system" configuration option. If you need system directories too, disable this option in .wgccrc.
The "ln" utility that comes wiwth wgcc has been changed to allways create hard links which work for windows too. This means that only the "-s" option is stripped, so that for example cl.exe can handle include files that are just links.
The pxwc library now includes some more symbols, and a very much improved version of the getenv replacement. This Version of __pxwc_getenv uses the psxwcl32.dll on Interix 3.5 and the psxdll.dll on all greater Versions of Interix to compute the windows equivalent of a unix path name. As a fallback the old mechanism is still available. For the old mechanism to function in all situations one should install hotfix 841121 when using Interix 3.5.
UCL now uses /Zc:wchar_t option too, as wgcc does, to create compatible binaries.
To continue improving wgcc and pxwc packages, we now need your help in testing them. Please download wgcc and try to compile your software using it. If something goes wrong please contact mduft or open an issue using the Sourceforge Tracker at http://sourceforge.net/tracker/?group_id=158081&atid=806404, or ask your questions at the forums at http://sourceforge.net/forum/?group_id=158081.
You can browse the Subversion Repository here: http://svn.sourceforge.net/viewvc/interix-wgcc/trunks/
Documentation can be found here: http://sourceforge.net/project/showfiles.php?group_id=158081&package_id=203917&release_id=446943
Source Packages can be found here: http://sourceforge.net/project/showfiles.php?group_id=158081&package_id=177049&release_id=445894
The Patch for Libtool can be found here: http://sourceforge.net/project/showfiles.php?group_id=158081&package_id=196163&release_id=446510
The PXWC library can be found here: http://sourceforge.net/project/showfiles.php?group_id=158081&package_id=195309&release_id=449425