mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
gcc: Pass --eh-frame-hdr to linker by default (#7038)
This commit is contained in:
@@ -5,7 +5,7 @@ HOMEPAGE="https://gcc.gnu.org/"
|
||||
COPYRIGHT="1988-2021 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v3
|
||||
GNU LGPL v3"
|
||||
REVISION="7"
|
||||
REVISION="8"
|
||||
gccVersion="${portVersion%%_*}"
|
||||
SOURCE_URI="https://ftpmirror.gnu.org/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz
|
||||
https://ftp.gnu.org/gnu/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz"
|
||||
|
||||
@@ -3627,3 +3627,38 @@ index 000000000..efa187289
|
||||
--
|
||||
2.35.1
|
||||
|
||||
|
||||
From 4dfaf5b96eaa934b487a83f9deb9eee0dde3a100 Mon Sep 17 00:00:00 2001
|
||||
From: Trung Nguyen <trungnt282910@gmail.com>
|
||||
Date: Wed, 6 Jul 2022 23:57:55 +0700
|
||||
Subject: [PATCH] gcc: Pass --eh-frame-hdr to linker by default
|
||||
|
||||
This creates a PT_EH_FRAME section in Haiku binaries,
|
||||
allowing 3rd party unwind libraries (libunwind) to obtain
|
||||
frame information for unwind procedures.
|
||||
|
||||
Change-Id: If475909d182bcac11024ebbc8220456733330fe8
|
||||
---
|
||||
gcc/config/haiku.h | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/haiku.h b/gcc/config/haiku.h
|
||||
index 316d38469..37adf4081 100644
|
||||
--- a/gcc/config/haiku.h
|
||||
+++ b/gcc/config/haiku.h
|
||||
@@ -67,6 +67,12 @@ Boston, MA 02111-1307, USA. */
|
||||
#define USE_LD_AS_NEEDED 1
|
||||
#endif
|
||||
|
||||
+/* Pass --eh-frame-hdr to provide a PT_EH_FRAME section, allowing unwind
|
||||
+ libraries to get frame information. */
|
||||
+#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
+#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
|
||||
+#endif
|
||||
+
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "crti.o%s crtbeginS.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s"
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user