summaryrefslogtreecommitdiff
path: root/gcc/config/sol2.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/sol2.h')
-rw-r--r--gcc/config/sol2.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
index 23a5bf51770..4c9b334e7a7 100644
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -181,6 +181,11 @@ along with GCC; see the file COPYING3. If not see
%(link_arch) \
%{Qy:} %{!Qn:-Qy}"
+/* Use --as-needed/-z ignore -lgcc_s for eh support. */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
#ifdef USE_GLD
/* Solaris 11 build 135+ implements dl_iterate_phdr. GNU ld needs
--eh-frame-hdr to create the required .eh_frame_hdr sections. */