[PATCH] Fix PR38904: mis-named libgcc DLL on cygwin.

Dave Korn dave.korn.cygwin@googlemail.com
Thu Jan 22 17:38:00 GMT 2009


    Hello list,

  PR38904 details how mainline GCC currently builds a non-standard shared
libgcc that doesn't conform to the target environment's standards on Cygwin.
As I explained earlier[*], this is a bug in a newly-implemented feature that
will cause a horrible ABI break if we have to wait until 4.5 to fix it.

  The attached patch resolves PR38904 on Cygwin, and MinGW too (at the
request of the maintainers), as it turns out that the naming wasn't quite
right for their usage either.

  This patch is target specific; although it touches two global files outside
the backend config dir, it touches them in places that can be seen by trivial
inspection to be entirely target-specific; nonetheless I obviously still need
approval from a build machinery maintainer as well as the target maintainers.

  The patch passes bootstrap for both DW2 and SjLj EH on Cygwin, tests are
currently running.  Danny is testing it against MinGW.  Assuming no
regressions, OK to apply?

gcc/ChangeLog

	* mkmap-flat.awk (END):  Use pe_dll command-line arg to pass
	LIBRARY name in, instead of hard-coding it.
	* config.gcc (i[34567]86-*-pe | i[34567]86-*-cygwin*):  Add an
	extra target make frag to tmake_files according to EH model.
	(i[34567]86-*-mingw* | x86_64-*-mingw*):  Likewise.
	* config/i386/t-dw2-eh, config/i386/t-sjlj-eh:  Add new target
	frags that define makefile variable EH_MODEL appropriately.
	* config/i386/cygming.h (DWARF2_UNWIND_INFO):  Add comment.
	* config/i386/cygwin.h (LIBGCC_EH_EXTN):  Define to nothing or
	to "-sjlj" according to type of EH configured.
	(LIBGCC_SONAME):  Concatenate it to shared library base name.
	* config/i386/mingw32.h (LIBGCC_EH_EXTN):  Define to "_dw2" or
	to "_sjlj" according to type of EH configured.
	(LIBGCC_SONAME):  Concatenate it to shared library base name.
	* config/i386/t-cygming (SHLIB_SONAME):  Use EH_MODEL.
	(SHLIB_LINK):  Add missing semicolon to if-else construct.
	(SHLIB_MKMAP_OPTS):  Pass library name to mkmap-flat.awk as
	string value of "pe_dll" command-line option.
	* config/i386/t-cygwin (SHLIB_EH_EXTENSION):  New helper.
	(SHLIB_SONAME):  Use it when overriding t-cygming default.
	(SHLIB_IMPLIB):  Override t-cygming default.
	(SHLIB_MKMAP_OPTS):  Pass library name to mkmap-flat.awk as
	string value of "pe_dll" command-line option.

    cheers,
      DaveK
-- 
[*] - http://gcc.gnu.org/ml/gcc/2009-01/msg00265.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr38904-fix-take2.diff
Type: application/octet-stream
Size: 6789 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090122/3cad726d/attachment.obj>


More information about the Gcc-patches mailing list