public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Handle -rdynamic on OpenBSD
@ 2011-10-22 15:19 Jonathan Gray
  0 siblings, 0 replies; only message in thread
From: Jonathan Gray @ 2011-10-22 15:19 UTC (permalink / raw)
  To: gcc-patches

The following lets -rdynamic work on OpenBSD.
Added to every OpenBSD target that defines LIB_SPEC.

Gerald Pfeifer has previously volunteered to apply my patches based
on maintainer approval.

2011-10-22  Jonathan Gray  <jsg@openbsd.org>

	* config/openbsd.opt (rdynamic): New Driver option.
	* config/sparc/openbsd64.h (LINK_SPEC): Handle -rdynamic.
	* config/i386/openbsdelf.h (LINK_SPEC): Handle -rdynamic.
	* config/mips/openbsd.h (LINK_SPEC): Handle -rdynamic.

Index: gcc/config/sparc/openbsd64.h
===================================================================
--- gcc/config/sparc/openbsd64.h	(revision 180322)
+++ gcc/config/sparc/openbsd64.h	(working copy)
@@ -70,6 +70,7 @@
    %{shared:-shared} %{R*} \
    %{static:-Bstatic} \
    %{!static:-Bdynamic} \
+   %{rdynamic:-export-dynamic} \
    %{assert*} \
    -dynamic-linker /usr/libexec/ld.so"
 
Index: gcc/config/i386/openbsdelf.h
===================================================================
--- gcc/config/i386/openbsdelf.h	(revision 180322)
+++ gcc/config/i386/openbsdelf.h	(working copy)
@@ -128,6 +128,7 @@
    %{shared:-shared} %{R*} \
    %{static:-Bstatic} \
    %{!static:-Bdynamic} \
+   %{rdynamic:-export-dynamic} \
    %{assert*} \
    -dynamic-linker /usr/libexec/ld.so"
 
Index: gcc/config/openbsd.opt
===================================================================
--- gcc/config/openbsd.opt	(revision 180322)
+++ gcc/config/openbsd.opt	(working copy)
@@ -33,4 +33,7 @@
 pthread
 Driver
 
+rdynamic
+Driver
+
 ; This comment is to ensure we retain the blank line above.
Index: gcc/config/mips/openbsd.h
===================================================================
--- gcc/config/mips/openbsd.h	(revision 180322)
+++ gcc/config/mips/openbsd.h	(working copy)
@@ -81,7 +81,10 @@
    %{!shared: -non_shared} \
    -dynamic-linker /usr/libexec/ld.so \
    %{!nostdlib:%{!r:%{!e*:-e __start}}} -dc -dp \
-   %{static:-Bstatic} %{!static:-Bdynamic} %{assert*}"
+   %{static:-Bstatic} \
+   %{!static:-Bdynamic} \
+   %{rdynamic:-export-dynamic} \
+   %{assert*}"
 
 /* -G is incompatible with -KPIC which is the default, so only allow objects
    in the small data section if the user explicitly asks for it.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-22 13:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-22 15:19 Handle -rdynamic on OpenBSD Jonathan Gray

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