diff options
author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-06-30 22:07:04 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-06-30 22:07:04 +0000 |
commit | d4f7af436d07c7bc4dd61ac45bff3414a1c12c74 (patch) | |
tree | 049f5903fea26153466932a6b271c49f10b75ba8 /packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch | |
parent | 873ce28c40814edb45f534003450318c6e9b2650 (diff) | |
parent | 7339a83b4095582728045cee92aa215373607caf (diff) |
merge of '08199c52a592fe71e2675200cf618a439d710884'
and '3e5f187370604cf4577025ebc49d90ca52a72d4d'
Diffstat (limited to 'packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch')
-rw-r--r-- | packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch b/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch new file mode 100644 index 0000000000..5c9bb0e708 --- /dev/null +++ b/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch @@ -0,0 +1,99 @@ +#! /bin/sh -e + +# DP: GNU/k*BSD support +# Author: Robert Millan <rmh@aybabtu.com> +# Status: Not yet submitted + + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p1 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# append the patch here and adjust the -p? flag in the patch calls. + +diff -Nurd gcc-4.2.orig/gcc/config/i386/kfreebsd-gnu.h gcc-4.2/gcc/config/i386/kfreebsd-gnu.h +--- gcc-4.2.orig/gcc/config/i386/kfreebsd-gnu.h 2006-01-18 22:46:30.000000000 +0100 ++++ gcc-4.2/gcc/config/i386/kfreebsd-gnu.h 2007-05-23 05:34:47.000000000 +0200 +@@ -20,7 +20,29 @@ + the Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + ++#ifdef GLIBC_DYNAMIC_LINKER32 ++#undef GLIBC_DYNAMIC_LINKER32 ++#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" ++#endif ++ ++#ifdef GLIBC_DYNAMIC_LINKER64 ++#undef GLIBC_DYNAMIC_LINKER64 ++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-kfreebsd-x86-64.so.1" ++#endif ++ + #undef LINK_EMULATION + #define LINK_EMULATION "elf_i386_fbsd" ++ ++#ifdef LINK_EMULATION32 ++#undef LINK_EMULATION32 ++#define LINK_EMULATION32 LINK_EMULATION ++#endif ++ ++#ifdef LINK_EMULATION64 ++#undef LINK_EMULATION64 ++#define LINK_EMULATION64 "elf_x86_64_fbsd" ++#endif ++ + #undef REG_NAME + #define REG_NAME(reg) sc_ ## reg ++ +diff -Nurd gcc-4.2.orig/gcc/config/i386/linux64.h gcc-4.2/gcc/config/i386/linux64.h +--- gcc-4.2.orig/gcc/config/i386/linux64.h 2007-05-22 22:25:11.000000000 +0200 ++++ gcc-4.2/gcc/config/i386/linux64.h 2007-05-23 05:39:11.000000000 +0200 +@@ -53,8 +53,11 @@ + When the -shared link option is used a final link is not being + done. */ + ++/* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" ++#define LINK_EMULATION32 "elf_i386" ++#define LINK_EMULATION64 "elf_x86_64" + + #if TARGET_64BIT_DEFAULT + #define SPEC_32 "m32" +@@ -65,7 +68,7 @@ + #endif + + #undef LINK_SPEC +-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \ ++#define LINK_SPEC "%{" SPEC_64 ":-m " LINK_EMULATION64 "} %{" SPEC_32 ":-m " LINK_EMULATION32 "} --hash-style=both \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +diff -Nurd gcc-4.2.orig/gcc/config.gcc gcc-4.2/gcc/config.gcc +--- gcc-4.2.orig/gcc/config.gcc 2007-02-03 10:03:58.000000000 +0100 ++++ gcc-4.2/gcc/config.gcc 2007-05-23 05:37:10.000000000 +0200 +@@ -1102,7 +1102,7 @@ + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \ + i386/x86-64.h i386/linux64.h" + case ${target} in +- x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;; ++ x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;; + x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;; + esac + tmake_file="${tmake_file} i386/t-linux64 i386/t-crtfm t-dfprules" |