summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch')
-rw-r--r--meta/packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch b/meta/packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch
new file mode 100644
index 0000000000..bf7a1370c2
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch
@@ -0,0 +1,80 @@
1#! /bin/sh -e
2# 10_newpatch.dpatch by <schizo@debian.org>
3# updated for 4.0, 4.1, 4.2 by Matthias Klose <doko@debian.org>
4#
5# DP: Enable biarch support for the 32bit sparc compiler
6
7if [ $# -eq 3 ] && [ "$2" = '-d' ]; then
8 pdir="-d $3"
9 dir="$3/"
10elif [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14case "$1" in
15 -patch)
16 patch $pdir -f --no-backup-if-mismatch -p0 < $0
17 cd ${dir}libcpp && autoconf
18 ;;
19 -unpatch)
20 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
21 cd ${dir}libcpp && autoconf
22 ;;
23 *)
24 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
25 exit 1;;
26esac
27
28exit 0
29
30--- gcc/config/sparc/linux64.h.orig 2006-06-04 13:09:21.857528428 -0300
31+++ gcc/config/sparc/linux64.h 2006-06-04 13:11:15.385012057 -0300
32@@ -54,8 +54,8 @@
33 + MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
34 #endif
35
36-#undef ASM_CPU_DEFAULT_SPEC
37-#define ASM_CPU_DEFAULT_SPEC "-Av9a"
38+#undef ASM_CPU64_DEFAULT_SPEC
39+#define ASM_CPU64_DEFAULT_SPEC "-Av9a"
40
41 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
42 the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
43--- gcc/config.gcc.orig 2006-06-04 13:09:21.882530957 -0300
44+++ gcc/config.gcc 2006-06-04 13:14:13.577036688 -0300
45@@ -315,6 +315,7 @@
46 ;;
47 sparc*-*-*)
48 cpu_type=sparc
49+ need_64bit_hwint=yes
50 ;;
51 s390*-*-*)
52 cpu_type=s390
53@@ -2105,9 +2106,16 @@
54 use_fixproto=yes
55 ;;
56 sparc-*-linux*) # SPARC's running GNU/Linux, libc6
57+ # If cpu is specified, assume we want a 32/64 compiler
58+ if test x$with_cpu = x; then
59 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
60 extra_options="${extra_options} sparc/long-double-switch.opt"
61 tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
62+ else
63+ tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
64+ extra_options="${extra_options} sparc/long-double-switch.opt"
65+ tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
66+ fi
67 ;;
68 sparc-*-rtems*)
69 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
70--- libcpp/configure.ac~ 2006-01-18 22:52:36.862072128 +0100
71+++ libcpp/configure.ac 2006-08-15 14:48:00.484137064 +0200
72@@ -124,7 +124,7 @@
73 powerpc*-*-* | \
74 rs6000*-*-* | \
75 s390*-*-* | \
76- sparc64*-*-* | ultrasparc-*-freebsd* | \
77+ sparc*-*-* | ultrasparc-*-freebsd* | \
78 sparcv9-*-solaris2* | \
79 sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \
80 sh[123456789l]*-*-*)