diff options
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch')
-rw-r--r-- | meta/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch b/meta/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch new file mode 100644 index 0000000000..5c9bb0e708 --- /dev/null +++ b/meta/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch | |||
@@ -0,0 +1,99 @@ | |||
1 | #! /bin/sh -e | ||
2 | |||
3 | # DP: GNU/k*BSD support | ||
4 | # Author: Robert Millan <rmh@aybabtu.com> | ||
5 | # Status: Not yet submitted | ||
6 | |||
7 | |||
8 | dir= | ||
9 | if [ $# -eq 3 -a "$2" = '-d' ]; then | ||
10 | pdir="-d $3" | ||
11 | dir="$3/" | ||
12 | elif [ $# -ne 1 ]; then | ||
13 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
14 | exit 1 | ||
15 | fi | ||
16 | case "$1" in | ||
17 | -patch) | ||
18 | patch $pdir -f --no-backup-if-mismatch -p1 < $0 | ||
19 | ;; | ||
20 | -unpatch) | ||
21 | patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 | ||
22 | ;; | ||
23 | *) | ||
24 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
25 | exit 1 | ||
26 | esac | ||
27 | exit 0 | ||
28 | |||
29 | # append the patch here and adjust the -p? flag in the patch calls. | ||
30 | |||
31 | diff -Nurd gcc-4.2.orig/gcc/config/i386/kfreebsd-gnu.h gcc-4.2/gcc/config/i386/kfreebsd-gnu.h | ||
32 | --- gcc-4.2.orig/gcc/config/i386/kfreebsd-gnu.h 2006-01-18 22:46:30.000000000 +0100 | ||
33 | +++ gcc-4.2/gcc/config/i386/kfreebsd-gnu.h 2007-05-23 05:34:47.000000000 +0200 | ||
34 | @@ -20,7 +20,29 @@ | ||
35 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, | ||
36 | Boston, MA 02110-1301, USA. */ | ||
37 | |||
38 | +#ifdef GLIBC_DYNAMIC_LINKER32 | ||
39 | +#undef GLIBC_DYNAMIC_LINKER32 | ||
40 | +#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
41 | +#endif | ||
42 | + | ||
43 | +#ifdef GLIBC_DYNAMIC_LINKER64 | ||
44 | +#undef GLIBC_DYNAMIC_LINKER64 | ||
45 | +#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-kfreebsd-x86-64.so.1" | ||
46 | +#endif | ||
47 | + | ||
48 | #undef LINK_EMULATION | ||
49 | #define LINK_EMULATION "elf_i386_fbsd" | ||
50 | + | ||
51 | +#ifdef LINK_EMULATION32 | ||
52 | +#undef LINK_EMULATION32 | ||
53 | +#define LINK_EMULATION32 LINK_EMULATION | ||
54 | +#endif | ||
55 | + | ||
56 | +#ifdef LINK_EMULATION64 | ||
57 | +#undef LINK_EMULATION64 | ||
58 | +#define LINK_EMULATION64 "elf_x86_64_fbsd" | ||
59 | +#endif | ||
60 | + | ||
61 | #undef REG_NAME | ||
62 | #define REG_NAME(reg) sc_ ## reg | ||
63 | + | ||
64 | diff -Nurd gcc-4.2.orig/gcc/config/i386/linux64.h gcc-4.2/gcc/config/i386/linux64.h | ||
65 | --- gcc-4.2.orig/gcc/config/i386/linux64.h 2007-05-22 22:25:11.000000000 +0200 | ||
66 | +++ gcc-4.2/gcc/config/i386/linux64.h 2007-05-23 05:39:11.000000000 +0200 | ||
67 | @@ -53,8 +53,11 @@ | ||
68 | When the -shared link option is used a final link is not being | ||
69 | done. */ | ||
70 | |||
71 | +/* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */ | ||
72 | #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
73 | #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | ||
74 | +#define LINK_EMULATION32 "elf_i386" | ||
75 | +#define LINK_EMULATION64 "elf_x86_64" | ||
76 | |||
77 | #if TARGET_64BIT_DEFAULT | ||
78 | #define SPEC_32 "m32" | ||
79 | @@ -65,7 +68,7 @@ | ||
80 | #endif | ||
81 | |||
82 | #undef LINK_SPEC | ||
83 | -#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \ | ||
84 | +#define LINK_SPEC "%{" SPEC_64 ":-m " LINK_EMULATION64 "} %{" SPEC_32 ":-m " LINK_EMULATION32 "} --hash-style=both \ | ||
85 | %{shared:-shared} \ | ||
86 | %{!shared: \ | ||
87 | %{!static: \ | ||
88 | diff -Nurd gcc-4.2.orig/gcc/config.gcc gcc-4.2/gcc/config.gcc | ||
89 | --- gcc-4.2.orig/gcc/config.gcc 2007-02-03 10:03:58.000000000 +0100 | ||
90 | +++ gcc-4.2/gcc/config.gcc 2007-05-23 05:37:10.000000000 +0200 | ||
91 | @@ -1102,7 +1102,7 @@ | ||
92 | tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \ | ||
93 | i386/x86-64.h i386/linux64.h" | ||
94 | case ${target} in | ||
95 | - x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;; | ||
96 | + x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;; | ||
97 | x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;; | ||
98 | esac | ||
99 | tmake_file="${tmake_file} i386/t-linux64 i386/t-crtfm t-dfprules" | ||