summaryrefslogtreecommitdiff
path: root/lang/gcc49/patches/patch-libgcc_crtstuff.c
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2014-09-04 18:43:11 +0000
committerjperkin <jperkin@pkgsrc.org>2014-09-04 18:43:11 +0000
commit66f5e90cf80009cb20a1e625f6538c937549bf94 (patch)
treebfc143d2c52b45b8967ffee5445b1ed3d1ab747f /lang/gcc49/patches/patch-libgcc_crtstuff.c
parentb2234a912856eec29ba6bf363f3e97c9c84dbdcc (diff)
downloadpkgsrc-66f5e90cf80009cb20a1e625f6538c937549bf94.tar.gz
Initial import of gcc49-4.9.1 as lang/gcc49.
Changes, New Features, and Fixes in GCC 4.9 can be found here: https://gcc.gnu.org/gcc-4.9/changes.html This is based heavily on lang/gcc47 but updated for GCC 4.9.1. Tested on SmartOS (32-bit and 64-bit) and NetBSD 6.1.4/amd64.
Diffstat (limited to 'lang/gcc49/patches/patch-libgcc_crtstuff.c')
-rw-r--r--lang/gcc49/patches/patch-libgcc_crtstuff.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/lang/gcc49/patches/patch-libgcc_crtstuff.c b/lang/gcc49/patches/patch-libgcc_crtstuff.c
new file mode 100644
index 00000000000..c6699fecb70
--- /dev/null
+++ b/lang/gcc49/patches/patch-libgcc_crtstuff.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-libgcc_crtstuff.c,v 1.1 2014/09/04 18:43:11 jperkin Exp $
+
+Currently dl_iterate_phdr error handling is hardcoded for FreeBSD 7+
+Expand code to handle all BSDs even though detection is only active for
+FreeBSD and DragonFly currently.
+
+--- libgcc/crtstuff.c.orig 2014-03-10 18:31:20.000000000 +0000
++++ libgcc/crtstuff.c
+@@ -79,11 +79,19 @@ call_ ## FUNC (void) \
+ }
+ #endif
+
++#if defined(TARGET_DL_ITERATE_PHDR) && \
++ ( defined(__FreeBSD__) \
++ || defined(__OpenBSD__) \
++ || defined(__NetBSD__) \
++ || defined(__DragonFly__))
++#define BSD_DL_ITERATE_PHDR_AVAILABLE
++#endif
++
+ #if defined(OBJECT_FORMAT_ELF) \
+ && !defined(OBJECT_FORMAT_FLAT) \
+ && defined(HAVE_LD_EH_FRAME_HDR) \
+ && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
+- && defined(__FreeBSD__) && __FreeBSD__ >= 7
++ && defined(BSD_DL_ITERATE_PHDR_AVAILABLE)
+ #include <link.h>
+ # define USE_PT_GNU_EH_FRAME
+ #endif