Menu

wgcc 2.2.1 released

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.

Release 2.2.1 fixes some bugs from 2.2.0 and improves wgcc a lot in some places regarding the shared library loading and handling mechanisms.

The runpath section generator now checks for sufficant space to avoid overflows, and corrupted binaries. Also the list of runpaths is made unique (not sorted) to save space. Also since this release the usage of the LD_LIBRARY_PATH environment is allowed.

LD_PRELOAD now supports preloading system libraries (all except kernel32.dll which is linked explicitly). This makes it possible to create "sandboxes" by overloading Runtime functionality. Still, you should know what you're doing, and the -Y/FORCE switch will be needed for functions like malloc and free when building the preload-libraries.

wgcc now supports "lazy loading" for functions. This means that functions are resolved at execution time, not at startup, which makes startup faster in certain situations. On the other hand, whenever calling a function for the first time (!), the function first needs to be resolved, which takes a small amount of time (the per-function time is a little longer as if it was resolved at startup).

The wchrpath utility has been improved a lot by adding a --cleanup switch, which makes all runpath lists unique, just like wgcc now does. Additionally there is the new --radical switch, which even reads the list of shared libraries requested by the given binary, and removes all runpaths that don't contain any of those libraries.

The wldd utility now defaults to a more "ldd" like behaviour, but still supports the old, long display format. Additionally in the long display mode, the depth of recursion while traversing dependencies can be given. Also wldd is now capable of filtering symbol output by collapsing symbol lists for given libraries. As a little help for clearer output wldd is now capable of omitting the location of dependencies in the output, by only writing wether it found the library or not.

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/

Source Packages can be found here: http://sourceforge.net/project/showfiles.php?group_id=158081&package_id=177049
The Patch for Libtool and automake can be found here: http://sourceforge.net/project/showfiles.php?group_id=158081&package_id=196163
The PXWC library can be found here: http://sourceforge.net/project/showfiles.php?group_id=158081&package_id=195309

Posted by Markus Duft 2007-05-14

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.