⛏️ index : buildtools.git

author Jessica Hamilton <jessica.l.hamilton@gmail.com> 2023-05-04 11:46:05.0 +12:00:00
committer Jessica Hamilton <jessica.l.hamilton@gmail.com> 2023-05-08 22:27:04.0 +12:00:00
commit
9866b1a47a32306b1660ebff0efbec067545cf7f [patch]
tree
54891394e1a311e6bbc5de0ba07123239115ae23
parent
a877b4dce9c864aedf08275d804d36fee65ccf9d
download
9866b1a47a32306b1660ebff0efbec067545cf7f.tar.gz

Add `-rdynamic` as a no-op, similar to `-pthread`.

Haiku binaries already export their symbols, which is the same
behaviour as using `-rdynamic` on other platforms; so add
`-rdynamic` as a no-op to simplify porting software that depends
on the behaviour of `-rdynamic`.

Diff

 gcc/gcc/config/haiku.opt           | 3 +++
 legacy/gcc/gcc/config/i386/haiku.h | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/gcc/config/haiku.opt b/gcc/gcc/config/haiku.opt
index efa1872..5b22f3b 100644
--- a/gcc/gcc/config/haiku.opt
+++ a/gcc/gcc/config/haiku.opt
@@ -26,4 +26,7 @@
pthread
Driver

rdynamic
Driver

; This comment is to ensure we retain the blank line above.
diff --git a/legacy/gcc/gcc/config/i386/haiku.h b/legacy/gcc/gcc/config/i386/haiku.h
index 5508fbb..f1e0f33 100644
--- a/legacy/gcc/gcc/config/i386/haiku.h
+++ a/legacy/gcc/gcc/config/i386/haiku.h
@@ -163,7 +163,7 @@
-Asystem(haiku)"

#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{!fno-pic:%{!fno-PIC:-D__PIC__ -D__pic__}} %{pthread:}"
#define CPP_SPEC "%(cpp_cpu) %{!fno-pic:%{!fno-PIC:-D__PIC__ -D__pic__}} %{pthread:} %{rdynamic}"

/* Haiku uses lots of multichars, so don't warn about them unless the
   user explicitly asks for the warnings with -Wmultichar.  Note that