patches/gcc/4.3.4/150-sparc64-bsd.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Sep 09 14:15:10 2011 +0200 (2011-09-09)
branch1.12
changeset 2656 9bc6d5555cac
permissions -rw-r--r--
debug/gdb: update the version strings

Almost all versions have been renamed, but the gdb folks did not
setup legacy symlinks.

For more information, see this message:
http://sourceware.org/ml/gdb/2011-09/msg00002.html

Reported-by: ManuelStahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 32209f462bbb35f3e3c7b260dc643e1183bdd710)
thomas@1461
     1
Original patch from: ../4.3.2/150-sparc64-bsd.patch
thomas@1461
     2
thomas@1461
     3
-= BEGIN original header =-
thomas@1461
     4
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/14_all_gcc-sparc64-bsd.patch
thomas@1461
     5
-= END original header =-
thomas@1461
     6
thomas@1461
     7
diff -durN gcc-4.3.3.orig/gcc/config/sparc/freebsd.h gcc-4.3.3/gcc/config/sparc/freebsd.h
thomas@1461
     8
--- gcc-4.3.3.orig/gcc/config/sparc/freebsd.h	2007-08-02 12:49:31.000000000 +0200
thomas@1461
     9
+++ gcc-4.3.3/gcc/config/sparc/freebsd.h	2009-01-27 22:19:20.000000000 +0100
thomas@1461
    10
@@ -25,9 +25,22 @@
thomas@1461
    11
 /* FreeBSD needs the platform name (sparc64) defined.
thomas@1461
    12
    Emacs needs to know if the arch is 64 or 32-bits.  */
thomas@1461
    13
 
thomas@1461
    14
-#undef  CPP_CPU64_DEFAULT_SPEC
thomas@1461
    15
-#define CPP_CPU64_DEFAULT_SPEC \
thomas@1461
    16
-  "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
thomas@1461
    17
+#undef  FBSD_TARGET_CPU_CPP_BUILTINS
thomas@1461
    18
+#define FBSD_TARGET_CPU_CPP_BUILTINS()                  \
thomas@1461
    19
+  do                                                    \
thomas@1461
    20
+    {                                                   \
thomas@1461
    21
+      if (TARGET_ARCH64)                                \
thomas@1461
    22
+        {                                               \
thomas@1461
    23
+          builtin_define ("__sparc64__");               \
thomas@1461
    24
+          builtin_define ("__sparc_v9__");              \
thomas@1461
    25
+          builtin_define ("__sparcv9");                 \
thomas@1461
    26
+        }                                               \
thomas@1461
    27
+      else                                              \
thomas@1461
    28
+        builtin_define ("__sparc");                     \
thomas@1461
    29
+      builtin_define ("__sparc__");                     \
thomas@1461
    30
+    }                                                   \
thomas@1461
    31
+  while (0)
thomas@1461
    32
+
thomas@1461
    33
 
thomas@1461
    34
 #define LINK_SPEC "%(link_arch)						\
thomas@1461
    35
   %{!mno-relax:%{!r:-relax}}						\