[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r1297 - trunk/web/patches/upstream-only



Author: rmh
Date: 2006-03-02 23:14:15 +0000 (Thu, 02 Mar 2006)
New Revision: 1297

Added:
   trunk/web/patches/upstream-only/gcc.diff
Log:
Add (untested) patch for gcc trunk.

Added: trunk/web/patches/upstream-only/gcc.diff
===================================================================
--- trunk/web/patches/upstream-only/gcc.diff	2006-03-02 20:55:43 UTC (rev 1296)
+++ trunk/web/patches/upstream-only/gcc.diff	2006-03-02 23:14:15 UTC (rev 1297)
@@ -0,0 +1,156 @@
+
+Author: rmh
+Status: untested, unsent
+
+diff -ur gcc.old/config/i386/kfreebsd-gnu.h gcc/config/i386/kfreebsd-gnu.h
+--- gcc.old/config/i386/kfreebsd-gnu.h	2006-03-02 21:22:05.000000000 +0100
++++ gcc/config/i386/kfreebsd-gnu.h	2006-03-03 00:08:05.000000000 +0100
+@@ -1,5 +1,5 @@
+-/* Definitions for Intel 386 running kFreeBSD-based GNU systems with ELF format
+-   Copyright (C) 2004
++/* Definitions for Intel 386 (and AMD x86-64) running kFreeBSD-based GNU systems with ELF format
++   Copyright (C) 2004, 2006
+    Free Software Foundation, Inc.
+    Contributed by Robert Millan.
+ 
+@@ -20,7 +20,28 @@
+ 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 -ur gcc.old/config/i386/knetbsd-gnu.h gcc/config/i386/knetbsd-gnu.h
+--- gcc.old/config/i386/knetbsd-gnu.h	2006-03-02 21:22:05.000000000 +0100
++++ gcc/config/i386/knetbsd-gnu.h	2006-03-03 00:08:52.000000000 +0100
+@@ -1,5 +1,5 @@
+-/* Definitions for Intel 386 running kNetBSD-based GNU systems with ELF format
+-   Copyright (C) 2004
++/* Definitions for Intel 386 (and AMD x86-64) running kNetBSD-based GNU systems with ELF format
++   Copyright (C) 2004, 2006
+    Free Software Foundation, Inc.
+    Contributed by Robert Millan.
+ 
+@@ -20,5 +20,15 @@
+ 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-knetbsd-x86-64.so.1"
++#endif
++
+ #undef REG_NAME
+ #define REG_NAME(reg) sc_ ## reg
+diff -ur gcc.old/config/i386/linux.h gcc/config/i386/linux.h
+--- gcc.old/config/i386/linux.h	2006-03-02 21:22:05.000000000 +0100
++++ gcc/config/i386/linux.h	2006-03-03 00:04:02.000000000 +0100
+@@ -99,6 +99,7 @@
+ 
+ /* If ELF is the default format, we should not use /lib/elf.  */
+ 
++/* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
+ #define LINK_EMULATION "elf_i386"
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+ 
+diff -ur gcc.old/config/i386/linux64.h gcc/config/i386/linux64.h
+--- gcc.old/config/i386/linux64.h	2006-03-02 21:22:05.000000000 +0100
++++ gcc/config/i386/linux64.h	2006-03-03 00:03:42.000000000 +0100
+@@ -49,11 +49,14 @@
+    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"
+ 
+ #undef	LINK_SPEC
+-#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
++#define LINK_SPEC "%{!m32:-m " LINK_EMULATION64 "} %{m32:-m " LINK_EMULATION32 "} \
+   %{shared:-shared} \
+   %{!shared: \
+     %{!static: \
+diff -ur gcc.old/config/kfreebsd-gnu.h gcc/config/kfreebsd-gnu.h
+--- gcc.old/config/kfreebsd-gnu.h	2006-03-02 21:23:05.000000000 +0100
++++ gcc/config/kfreebsd-gnu.h	2006-03-03 00:47:03.000000000 +0100
+@@ -1,5 +1,5 @@
+ /* Definitions for kFreeBSD-based GNU systems with ELF format
+-   Copyright (C) 2004
++   Copyright (C) 2004, 2006
+    Free Software Foundation, Inc.
+    Contributed by Robert Millan.
+ 
+@@ -32,5 +32,7 @@
+     }						\
+   while (0)
+ 
+-#undef DYNAMIC_LINKER
+-#define DYNAMIC_LINKER "/lib/ld.so.1"
++#ifdef GLIBC_DYNAMIC_LINKER
++#undef GLIBC_DYNAMIC_LINKER
++#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#endif
+diff -ur gcc.old/config/knetbsd-gnu.h gcc/config/knetbsd-gnu.h
+--- gcc.old/config/knetbsd-gnu.h	2006-03-02 21:23:05.000000000 +0100
++++ gcc/config/knetbsd-gnu.h	2006-03-03 00:47:09.000000000 +0100
+@@ -1,5 +1,5 @@
+ /* Definitions for kNetBSD-based GNU systems with ELF format
+-   Copyright (C) 2004
++   Copyright (C) 2004, 2006
+    Free Software Foundation, Inc.
+    Contributed by Robert Millan.
+ 
+@@ -32,5 +32,8 @@
+     }						\
+   while (0)
+ 
+-#undef DYNAMIC_LINKER
+-#define DYNAMIC_LINKER "/lib/ld.so.1"
++
++#ifdef GLIBC_DYNAMIC_LINKER
++#undef GLIBC_DYNAMIC_LINKER
++#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#endif
+diff -ur gcc.old/config.gcc gcc/config.gcc
+--- gcc.old/config.gcc	2006-03-02 21:23:14.000000000 +0100
++++ gcc/config.gcc	2006-03-02 23:54:23.000000000 +0100
+@@ -1079,8 +1079,8 @@
+ 	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-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-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 i386/knetbsd-gnu.h" ;;
+ 	esac
+ 	tmake_file="${tmake_file} i386/t-linux64 i386/t-crtfm"
+ 	;;



Reply to: