public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Krister Walfridsson <krister.walfridsson@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: committed: Fix NetBSD problem PR80600
Date: Sun, 14 May 2017 23:12:00 -0000	[thread overview]
Message-ID: <Pine.NEB.4.64.1705150108140.15972@gateway.kwa> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 337 bytes --]

I have committed the attached patch to make NetBSD handle -lgcc correctly
for shared libraries.

gcc/ChangeLog:

         PR target/80600
         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.

libgcc/ChangeLog:

         PR target/80600
         * config.host (*-*-netbsd*): Add t-slibgcc-libgcc to tmake_file.

    /Krister

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1238 bytes --]

Index: gcc/config/netbsd.h
===================================================================
--- gcc/config/netbsd.h	(revision 248036)
+++ gcc/config/netbsd.h	(working copy)
@@ -120,8 +120,7 @@
 #undef LIB_SPEC
 #define LIB_SPEC NETBSD_LIB_SPEC
 
-/* Provide a LIBGCC_SPEC appropriate for NetBSD.  We also want to exclude
-   libgcc with -symbolic.  */
+/* Provide a LIBGCC_SPEC appropriate for NetBSD.  */
 
 #ifdef NETBSD_NATIVE
 #define NETBSD_LIBGCC_SPEC	\
@@ -133,7 +132,7 @@
      %{p: -lgcc_p}		\
      %{pg: -lgcc_p}}"
 #else
-#define NETBSD_LIBGCC_SPEC "%{!shared:%{!symbolic: -lgcc}}"
+#define NETBSD_LIBGCC_SPEC "-lgcc"
 #endif
 
 #undef LIBGCC_SPEC
Index: libgcc/config.host
===================================================================
--- libgcc/config.host	(revision 248036)
+++ libgcc/config.host	(working copy)
@@ -249,6 +249,7 @@
 *-*-netbsd*)
   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
   tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
+  tmake_file="$tmake_file t-slibgcc-libgcc"
   # NetBSD 1.7 and later are set up to use GCC's crtstuff for
   # ELF configurations.  We will clear extra_parts in the
   # a.out configurations.

             reply	other threads:[~2017-05-14 23:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-14 23:12 Krister Walfridsson [this message]
2017-05-15  1:12 ` Krister Walfridsson

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=Pine.NEB.4.64.1705150108140.15972@gateway.kwa \
    --to=krister.walfridsson@gmail.com \
    --cc=gcc-patches@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).