[patch] Fix cygwin ada install [was Re: Yet another issue with gcc current trunk with ada on cygwin]

Dave Korn dave.korn.cygwin@gmail.com
Thu Dec 8 13:03:00 GMT 2011


    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?

    cheers,
      DaveK


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-ada-lib-fixes.diff
Type: text/x-c
Size: 4538 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111208/81284923/attachment.bin>


More information about the Gcc-patches mailing list