summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-4.3.1/debian/pr27880.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.1/debian/pr27880.dpatch')
-rw-r--r--meta/packages/gcc/gcc-4.3.1/debian/pr27880.dpatch90
1 files changed, 90 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.3.1/debian/pr27880.dpatch b/meta/packages/gcc/gcc-4.3.1/debian/pr27880.dpatch
new file mode 100644
index 0000000000..f8f08b0695
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.3.1/debian/pr27880.dpatch
@@ -0,0 +1,90 @@
1#! /bin/sh -e
2
3dir=
4if [ $# -eq 3 -a "$2" = '-d' ]; then
5 pdir="-d $3"
6 dir="$3/"
7elif [ $# -ne 1 ]; then
8 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
9 exit 1
10fi
11case "$1" in
12 -patch)
13 patch $pdir -f --no-backup-if-mismatch -p0 < $0
14 ;;
15 -unpatch)
16 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
17 ;;
18 *)
19 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
20 exit 1
21esac
22exit 0
23
24# DP: PR target/27880: Restore static linking on ia64 with system libunwind
25# DP: by adding unwind-compat to the static libgcc.
26
272006-06-19 Andreas Schwab <schwab@suse.de>
28
29 PR target/27880
30 * unwind-compat.c: Wrap everything except _Unwind_GetIPInfo inside
31 SHARED.
32 * config/t-libunwind (LIB2ADDEHSTATIC): Add
33 $(srcdir)/unwind-compat.c.
34
35Index: gcc/config/t-libunwind
36===================================================================
37--- gcc/config/t-libunwind (revision 114767)
38+++ gcc/config/t-libunwind (working copy)
39@@ -6,7 +6,8 @@
40 SHLIB_LC = -lunwind -lc
41 LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
42 $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c
43-LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
44+LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
45+ $(srcdir)/unwind-compat.c
46
47 T_CFLAGS += -DUSE_LIBUNWIND_EXCEPTIONS
48 TARGET_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER
49Index: gcc/unwind-compat.c
50===================================================================
51--- gcc/unwind-compat.c (revision 114767)
52+++ gcc/unwind-compat.c (working copy)
53@@ -35,6 +35,7 @@
54 #include "unwind-dw2-fde.h"
55 #include "unwind-compat.h"
56
57+#ifdef SHARED
58 extern _Unwind_Reason_Code __libunwind_Unwind_Backtrace
59 (_Unwind_Trace_Fn, void *);
60
61@@ -136,13 +137,6 @@ _Unwind_GetIP (struct _Unwind_Context *c
62 }
63 symver (_Unwind_GetIP, GCC_3.0);
64
65-_Unwind_Ptr
66-_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
67-{
68- *ip_before_insn = 0;
69- return __libunwind_Unwind_GetIP (context);
70-}
71-
72 extern void *__libunwind_Unwind_GetLanguageSpecificData
73 (struct _Unwind_Context *);
74
75@@ -212,4 +206,14 @@ _Unwind_SetIP (struct _Unwind_Context *c
76 return __libunwind_Unwind_SetIP (context, val);
77 }
78 symver (_Unwind_SetIP, GCC_3.0);
79+#endif /* SHARED */
80+
81+extern _Unwind_Ptr __libunwind_Unwind_GetIP (struct _Unwind_Context *);
82+
83+_Unwind_Ptr
84+_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
85+{
86+ *ip_before_insn = 0;
87+ return __libunwind_Unwind_GetIP (context);
88+}
89 #endif
90