public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dannysmith at users dot sourceforge dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/37660] [4.4 Regression] Error Building libssp, recent update
Date: Thu, 15 Jan 2009 02:39:00 -0000	[thread overview]
Message-ID: <20090115023913.25073.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37660-6183@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2009-01-15  2:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-27 16:37 [Bug bootstrap/37660] New: " mckelvey at maskull dot com
2008-11-29 19:00 ` [Bug bootstrap/37660] " mckelvey at maskull dot com
2009-01-14 15:20 ` piotr dot wyderski at gmail dot com
2009-01-15  1:10 ` [Bug bootstrap/37660] [4.4 Regression] " pinskia at gcc dot gnu dot org
2009-01-15  2:39 ` dannysmith at users dot sourceforge dot net [this message]
2009-01-15 15:54 ` rguenth at gcc dot gnu dot org
2009-01-15 19:08 ` dave dot korn dot cygwin at gmail dot com
2009-01-16  7:14 ` dannysmith at users dot sourceforge dot net
2009-01-16 13:41 ` dave dot korn dot cygwin at gmail dot com
2009-01-18  5:57 ` dave dot korn dot cygwin at gmail dot com
2009-01-19  4:22 ` dannysmith at users dot sourceforge dot net
2009-01-19  4:54 ` dave dot korn dot cygwin at gmail dot com
2009-01-19 22:29 ` mckelvey at maskull dot com
2009-01-20  4:33 ` dave dot korn dot cygwin at gmail dot com
2009-01-21 19:20 ` davek at gcc dot gnu dot org
2009-01-24  8:23 ` billingd at gcc dot gnu dot org
2009-01-24 16:56 ` jakub at gcc dot gnu dot org
2009-01-24 18:21 ` dave dot korn dot cygwin at gmail dot com
2009-01-24 23:14 ` billingd at gcc dot gnu dot org
2009-01-24 23:15 ` dave dot korn dot cygwin at gmail dot com
2009-01-24 23:22 ` dave dot korn dot cygwin at gmail dot com
2009-01-25  1:22 ` mckelvey at maskull dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090115023913.25073.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).