On 8 December 2011 14:02, Dave Korn wrote: > > Hi again guys, > > After the previous patch, there's still another bug remaining in the Ada > makefile, relating to how it builds and installs the gnat/gnarl shared > libraries. > > Windows doesn't have any concept of an rpath in executables, nor of > LD_LIBRARY_PATH; all required DLLs must be found on the PATH when an exe is > invoked. The Ada shared libraries are currently installed into adaobj/ in the > gcc private dir, which is not (and should not be) on users' PATHs, so the > result is that executables compiled with the -shared binder option don't work. > > The attached patch fixes Windows DLLs to be installed into $bindir, and > while it does that it also generates import libraries, which live in the > private adaobj/ directory and serve for linking executables to the DLLs (it's > actually preferred to link against an import library than directly against the > DLL itself). Finally it adjusts the name of the DLLs on Cygwin to match the > cyg*.dll naming scheme used there to avoid clashes with MinGW DLLs. > > libada/ChangeLog: > > * Makefile.in (bindir): Import from autoconf and pass down to submake. > > gcc/ada/ChangeLog: > > * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New > Windows-specific make variable. > (WIN_SO_INSTALL_DIR [windows targets]): Likewise. > (install-gnatlib): Respect the above during installation when set, > and also install any windows import library that has been built. > (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also > build a corresponding import library. > > Built, tested, installed on i686-pc-cygwin and x86_64-unknown-linux-gnu, no > regressions anywhere, verified that DLL install locations are corrected on > windows and the .so install locations unchanged on Linux. Ok?
I am happily using this patch and await this to be committed. I can add that I also, manually, copy the lto-plugin/.libs/cyglto_plugin-0.dll into $bindir too. -- Cheers, /ChJ