From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25092 invoked by alias); 15 Jan 2009 02:39:26 -0000 Received: (qmail 25074 invoked by uid 48); 15 Jan 2009 02:39:13 -0000 Date: Thu, 15 Jan 2009 02:39:00 -0000 Message-ID: <20090115023913.25073.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug bootstrap/37660] [4.4 Regression] Error Building libssp, recent update In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dannysmith at users dot sourceforge dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-01/txt/msg01568.txt.bz2 ------- Comment #3 from dannysmith at users dot sourceforge dot net 2009-01-15 02:39 ------- I believe that this failure reflects the fact that PE_COFF dll's do not allow undefined symbols. Because of that, the rule to decide shared vs static libgcc in gcc.c init_gcc_spec, namely the case for building a shared lib: "%{shared:", shared_name, "}" is not quite right. It should be (I think) "%{shared:", shared_name, , static_name "}" However, since a shared libgcc is a new thing on cygwin and mingw, it may be better for this release to actually require an explicit -shared-libgcc to get the shared lib. That is what mingw32 does, by defining its own REAL_LIBGCC_SPEC. Does this patch fix the problem for you? Index: config/i386/cygwin.h =================================================================== --- config/i386/cygwin.h (revision 143259) +++ config/i386/cygwin.h (working copy) @@ -49,9 +49,17 @@ GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled by calling the init function from main. */ -#undef LIBGCC_SPEC -#define LIBGCC_SPEC \ - "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc \ +# +#ifdef ENABLE_SHARED_LIBGCC +#define SHARED_LIBGCC_SPEC "%{shared-libgcc:-lgcc_s} %{!shared-libgcc:-lgcc_eh}" +#else +#define SHARED_LIBGCC_SPEC /*empty*/ +#endif +#undef REAL_LIBGCC_SPEC +#define REAL_LIBGCC_SPEC \ + "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} \ + "SHARED_LIBGCC_SPEC" \ + -lgcc \ %{mno-cygwin:-lmoldname -lmingwex -lmsvcrt}" /* We have to dynamic link to get to the system DLLs. All of libc, libm and -- dannysmith at users dot sourceforge dot net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dannysmith at users dot | |sourceforge dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37660