aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2004-09-04 00:15:42 +0000
committerH.J. Lu <hongjiu.lu@intel.com>2004-09-04 00:15:42 +0000
commit0a9719da36270d485f767ba7a529a2b7ae710ffd (patch)
tree7f137e56cfc324eb4fa83beb9e5fe8ca4d670570 /gcc/config
parentebae54a9e26793ebf753144de44e5b08d9f8193e (diff)
2004-09-03 H.J. Lu <hongjiu.lu@intel.com>
PR target/14925: Makefile.in (LIB2ADDEHSTATIC): New. (LIB2ADDEHSHARED): New. (LIBUNWIND): New. (LIBUNWINDDEP): New. (SHLIBUNWIND_LINK): New. (SHLIBUNWIND_INSTALL): New. (libgcc.mk): Pass LIB2ADDEHSTATIC, LIB2ADDEHSHARED, LIBUNWIND, LIBUNWINDDEP, SHLIBUNWIND_LINK and SHLIBUNWIND_INSTALL. (clean): Remove libunwind* (stage1-start): Remove and copy stage1/libunwind*. (stage2-start): Remove and copy stage2/libunwind*. (stage3-start): Remove and copy stage3/libunwind*. (stage4-start): Remove and copy stage4/libunwind*. (stageprofile-start): Remove and copy stageprofile/libunwind*. (stagefeedback-start): Remove and copy stagefeedback/libunwind*. * config.gcc (ia64*-*-linux*): Always add t-libunwind to tmake_file. Add t-libunwind-elf and ia64/t-glibc-libunwind to tmake_file if --with-system-libunwind isn't used. * config/ia64/t-glibc-libunwind: New file. * config/t-libunwind-elf: Likewise. * unwind-compat.c: Likewise. * unwind-compat.h: Likewise. * unwind-dw2-fde-compat.c: Likewise. * config/ia64/t-glibc (LIB2ADDEH): Updated. * config/ia64/t-hpux (T_CFLAGS): Add -DUSE_LIBUNWIND_EXCEPTIONS. * config/ia64/unwind-ia64.c: Include "unwind-compat.h". Define aliases if needed. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * config/t-libunwind (LIB2ADDEH): Updated. (LIB2ADDEHSTATIC): New. (T_CFLAGS): Add -DUSE_LIBUNWIND_EXCEPTIONS. (TARGET_LIBGCC2_CFLAGS): Set to -DUSE_GAS_SYMVER. * configure.ac: Change --enable-libunwind-exceptions to --with-system-libunwind. Don't define USE_LIBUNWIND_EXCEPTIONS. * configure: Regenerated. * config.in: Updated. * doc/install.texi (ia64-*-linux): Require libunwind 0.98 or above and mention --with-system-libunwind. (ia64-*-hpux*): Mention --enable-libunwind-exceptions is removed in gcc 3.4.3 and later. * gcc.c (init_spec): Add -lunwind to -lgcc_s if USE_LIBUNWIND_EXCEPTIONS is defined. * mklibgcc.in: Support libunwind. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@87066 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/ia64/t-glibc4
-rw-r--r--gcc/config/ia64/t-glibc-libunwind4
-rw-r--r--gcc/config/ia64/t-hpux2
-rw-r--r--gcc/config/ia64/unwind-ia64.c21
-rw-r--r--gcc/config/t-libunwind9
-rw-r--r--gcc/config/t-libunwind-elf26
6 files changed, 64 insertions, 2 deletions
diff --git a/gcc/config/ia64/t-glibc b/gcc/config/ia64/t-glibc
index a1056628b50..df4fe9c4404 100644
--- a/gcc/config/ia64/t-glibc
+++ b/gcc/config/ia64/t-glibc
@@ -1 +1,3 @@
-LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
+# Use system libunwind library on IA-64 GLIBC based system.
+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
+ $(srcdir)/unwind-compat.c
diff --git a/gcc/config/ia64/t-glibc-libunwind b/gcc/config/ia64/t-glibc-libunwind
new file mode 100644
index 00000000000..df78f1d094f
--- /dev/null
+++ b/gcc/config/ia64/t-glibc-libunwind
@@ -0,0 +1,4 @@
+# Build libunwind for IA-64 GLIBC based system.
+LIBUNWIND = $(srcdir)/config/ia64/fde-glibc.c \
+ $(srcdir)/config/ia64/unwind-ia64.c
+LIBUNWINDDEP = unwind.inc
diff --git a/gcc/config/ia64/t-hpux b/gcc/config/ia64/t-hpux
index 597c2acbe2a..d89f174592c 100644
--- a/gcc/config/ia64/t-hpux
+++ b/gcc/config/ia64/t-hpux
@@ -23,6 +23,8 @@ LIBGCC1_TEST =
# We do not want to include the EH stuff that linux uses, we want to use
# the HP-UX libunwind library.
+T_CFLAGS += -DUSE_LIBUNWIND_EXCEPTIONS
+
LIB2ADDEH =
SHLIB_EXT = .so
diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c
index 1c88b729064..692f07b1adf 100644
--- a/gcc/config/ia64/unwind-ia64.c
+++ b/gcc/config/ia64/unwind-ia64.c
@@ -37,6 +37,7 @@
#include "tm.h"
#include "unwind.h"
#include "unwind-ia64.h"
+#include "unwind-compat.h"
#include "ia64intrin.h"
/* This isn't thread safe, but nice for occasional tests. */
@@ -2381,4 +2382,24 @@ uw_identify_context (struct _Unwind_Context *context)
}
#include "unwind.inc"
+
+#if defined (USE_GAS_SYMVER) && defined (SHARED) && defined (USE_LIBUNWIND_EXCEPTIONS)
+alias (_Unwind_Backtrace);
+alias (_Unwind_DeleteException);
+alias (_Unwind_FindEnclosingFunction);
+alias (_Unwind_FindTableEntry);
+alias (_Unwind_ForcedUnwind);
+alias (_Unwind_GetBSP);
+alias (_Unwind_GetCFA);
+alias (_Unwind_GetGR);
+alias (_Unwind_GetIP);
+alias (_Unwind_GetLanguageSpecificData);
+alias (_Unwind_GetRegionStart);
+alias (_Unwind_RaiseException);
+alias (_Unwind_Resume);
+alias (_Unwind_Resume_or_Rethrow);
+alias (_Unwind_SetGR);
+alias (_Unwind_SetIP);
+#endif
+
#endif
diff --git a/gcc/config/t-libunwind b/gcc/config/t-libunwind
index 2204ae316d7..121ce2e47b6 100644
--- a/gcc/config/t-libunwind
+++ b/gcc/config/t-libunwind
@@ -1,5 +1,12 @@
+# Use the system libunwind library.
+#
# Override the default value from t-slibgcc-elf-ver and mention -lunwind
# so that the resulting libgcc_s.so has the necessary DT_NEEDED entry for
# libunwind.
SHLIB_LC = -lunwind -lc
-LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
+ $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c
+LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+
+T_CFLAGS += -DUSE_LIBUNWIND_EXCEPTIONS
+TARGET_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER
diff --git a/gcc/config/t-libunwind-elf b/gcc/config/t-libunwind-elf
new file mode 100644
index 00000000000..ac94fac4ab0
--- /dev/null
+++ b/gcc/config/t-libunwind-elf
@@ -0,0 +1,26 @@
+# Build libunwind for ELF with the GNU linker.
+
+# Use unwind-dw2-fde-glibc
+LIBUNWIND = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c
+LIBUNWINDDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
+
+SHLIBUNWIND_SOVERSION = 7
+SHLIBUNWIND_SONAME = @shlib_so_name@.so.$(SHLIBUNWIND_SOVERSION)
+SHLIBUNWIND_NAME = @shlib_dir@@shlib_so_name@.so.$(SHLIBUNWIND_SOVERSION)
+
+SHLIBUNWIND_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared \
+ -nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \
+ -Wl,-z,text -Wl,-z,defs \
+ -o $(SHLIBUNWIND_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
+ rm -f $(SHLIB_SOLINK) && \
+ $(LN_S) $(SHLIBUNWIND_NAME) $(SHLIB_SOLINK)
+
+# $(slibdir) double quoted to protect it from expansion while building
+# libgcc.mk. We want this delayed until actual install time.
+SHLIBUNWIND_INSTALL = \
+ $$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
+ $(INSTALL_DATA) $(SHLIBUNWIND_NAME) \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIBUNWIND_SONAME); \
+ rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
+ $(LN_S) $(SHLIBUNWIND_SONAME) \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)