Browse Source

gcc: Updated (4.1.2 -> 4.2.4)

karasz/qt
Aldas Nabazas 16 years ago committed by Alejandro Mery
parent
commit
4c6ec9f1c0
  1. 52236
      base/gcc/gcc-4.1-branch-update-1.patch
  2. 19
      base/gcc/gcc-4.1.2-gxx_include_dir.patch.toolchain
  3. 159
      base/gcc/gcc-4.1.2-multilib-1.diff
  4. 184
      base/gcc/gcc-4.1.2-pure64-1.diff
  5. 3
      base/gcc/gcc.conf
  6. 8
      base/gcc/gcc.desc
  7. 11
      base/gcc/libstdcpp-with-tag-cc.patch
  8. 579
      base/gcc/niagara.patch
  9. 23
      base/gcc/no-install-libiberty.patch
  10. 38
      base/gcc/powerpc64-nonofp.patch
  11. 3
      base/gcc/wrappers.in

52236
base/gcc/gcc-4.1-branch-update-1.patch

File diff suppressed because it is too large Load Diff

19
base/gcc/gcc-4.1.2-gxx_include_dir.patch.toolchain

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/gcc-4.1.2-gxx_include_dir.patch.toolchain
# Copyright (C) 2008 The OpenSDE Project
# Copyright (C) 2008 - 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -14,18 +14,21 @@
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- gcc-4.1.2/gcc/configure.orig 2007-04-19 16:41:47.000000000 +0200
+++ gcc-4.1.2/gcc/configure 2007-04-19 16:42:52.000000000 +0200
@@ -1655,10 +1655,10 @@
--- ./gcc/configure.orig 2007-05-10 10:30:26.337940266 +0200
+++ ./gcc/configure 2007-05-10 10:35:26.183027464 +0200
@@ -1680,13 +1680,10 @@
# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
if test x${gcc_gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
- gcc_gxx_include_dir='${libsubdir}/include/c++'
+ gcc_gxx_include_dir='${CROSS_SYSTEM_HEADER_DIR}/c++'
else
libstdcxx_incdir='c++/$(version)'
- gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
- libstdcxx_incdir='include/c++/$(version)'
+ libstdcxx_incdir='c++/$(version)'
- if test x$host != x$target; then
- libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
- fi
- gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir"
+ gcc_gxx_include_dir="\$(CROSS_SYSTEM_HEADER_DIR)/"${libstdcxx_incdir}
fi
fi

159
base/gcc/gcc-4.1.2-multilib-1.diff

@ -1,45 +1,61 @@
diff -ruN gcc-4.1.2/gcc/config/i386/linux64.h gcc-4.1.2-multilib/gcc/config/i386/linux64.h
--- gcc-4.1.2/gcc/config/i386/linux64.h 2005-08-10 20:53:01.000000000 +0300
+++ gcc-4.1.2-multilib/gcc/config/i386/linux64.h 2007-10-01 00:37:19.000000000 +0300
@@ -60,7 +60,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{m32:%{!dynamic-linker:-dynamic-linker /lib32/ld-linux.so.2}} \
%{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
%{static:-static}}"
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/gcc-4.1.2-multilib-1.diff
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
diff -Nur gcc-4.2.4-orig/gcc/config/i386/linux64.h gcc-4.2.4/gcc/config/i386/linux64.h
--- gcc-4.2.4-orig/gcc/config/i386/linux64.h 2009-08-03 13:27:06.000000000 +0300
+++ gcc-4.2.4/gcc/config/i386/linux64.h 2009-08-03 13:28:22.000000000 +0300
@@ -48,7 +48,7 @@
When the -shared link option is used a final link is not being
done. */
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
diff -ruN gcc-4.1.2/gcc/config/i386/t-linux64 gcc-4.1.2-multilib/gcc/config/i386/t-linux64
--- gcc-4.1.2/gcc/config/i386/t-linux64 2005-08-10 20:53:01.000000000 +0300
+++ gcc-4.1.2-multilib/gcc/config/i386/t-linux64 2007-10-01 00:37:40.000000000 +0300
@@ -6,7 +6,7 @@
#undef LINK_SPEC
diff -Nur gcc-4.2.4-orig/gcc/config/i386/t-linux64 gcc-4.2.4/gcc/config/i386/t-linux64
--- gcc-4.2.4-orig/gcc/config/i386/t-linux64 2009-08-03 13:27:06.000000000 +0300
+++ gcc-4.2.4/gcc/config/i386/t-linux64 2009-08-03 13:28:54.000000000 +0300
@@ -13,7 +13,7 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = ../lib64 ../lib32
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
diff -ruN gcc-4.1.2/gcc/config/mips/linux64.h gcc-4.1.2-multilib/gcc/config/mips/linux64.h
--- gcc-4.1.2/gcc/config/mips/linux64.h 2005-06-25 04:22:41.000000000 +0300
+++ gcc-4.1.2-multilib/gcc/config/mips/linux64.h 2007-10-01 00:40:25.000000000 +0300
@@ -47,9 +47,9 @@
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{mabi=n32: -dynamic-linker /lib32/ld.so.1} \
+ %{mabi=n32: -dynamic-linker /lib64/ld.so.1} \
%{mabi=64: -dynamic-linker /lib64/ld.so.1} \
- %{mabi=32: -dynamic-linker /lib/ld.so.1}}} \
+ %{mabi=32: -dynamic-linker /lib32/ld.so.1}}} \
%{static:-static}}} \
%{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
%{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
diff -ruN gcc-4.1.2/gcc/config/mips/t-linux64 gcc-4.1.2-multilib/gcc/config/mips/t-linux64
--- gcc-4.1.2/gcc/config/mips/t-linux64 2006-09-10 10:13:12.000000000 +0300
+++ gcc-4.1.2-multilib/gcc/config/mips/t-linux64 2007-10-01 00:40:59.000000000 +0300
diff -Nur gcc-4.2.4-orig/gcc/config/mips/linux64.h gcc-4.2.4/gcc/config/mips/linux64.h
--- gcc-4.2.4-orig/gcc/config/mips/linux64.h 2009-08-03 13:27:06.000000000 +0300
+++ gcc-4.2.4/gcc/config/mips/linux64.h 2009-08-03 13:29:52.000000000 +0300
@@ -35,9 +35,9 @@
%{!shared: %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}"
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+#define GLIBC_DYNAMIC_LINKERN32 "/lib64/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
#define LINUX_DYNAMIC_LINKERN32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
diff -Nur gcc-4.2.4-orig/gcc/config/mips/t-linux64 gcc-4.2.4/gcc/config/mips/t-linux64
--- gcc-4.2.4-orig/gcc/config/mips/t-linux64 2009-08-03 13:27:06.000000000 +0300
+++ gcc-4.2.4/gcc/config/mips/t-linux64 2009-08-03 13:30:25.000000000 +0300
@@ -1,6 +1,6 @@
MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
MULTILIB_DIRNAMES = n32 32 64
@ -48,51 +64,54 @@ diff -ruN gcc-4.1.2/gcc/config/mips/t-linux64 gcc-4.1.2-multilib/gcc/config/mips
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
diff -ruN gcc-4.1.2/gcc/config/rs6000/linux64.h gcc-4.1.2-multilib/gcc/config/rs6000/linux64.h
--- gcc-4.1.2/gcc/config/rs6000/linux64.h 2006-02-10 22:58:33.000000000 +0200
+++ gcc-4.1.2-multilib/gcc/config/rs6000/linux64.h 2007-10-01 00:42:07.000000000 +0300
@@ -339,7 +339,7 @@
diff -Nur gcc-4.2.4-orig/gcc/config/rs6000/linux64.h gcc-4.2.4/gcc/config/rs6000/linux64.h
--- gcc-4.2.4-orig/gcc/config/rs6000/linux64.h 2009-08-03 13:27:06.000000000 +0300
+++ gcc-4.2.4/gcc/config/rs6000/linux64.h 2009-08-03 13:31:28.000000000 +0300
@@ -335,7 +335,7 @@
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /lib32/ld.so.1}}}"
#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
diff -ruN gcc-4.1.2/gcc/config/rs6000/t-linux64 gcc-4.1.2-multilib/gcc/config/rs6000/t-linux64
--- gcc-4.1.2/gcc/config/rs6000/t-linux64 2007-10-01 00:44:58.000000000 +0300
+++ gcc-4.1.2-multilib/gcc/config/rs6000/t-linux64 2007-10-01 00:43:54.000000000 +0300
@@ -11,7 +11,7 @@
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
diff -Nur gcc-4.2.4-orig/gcc/config/rs6000/t-linux64 gcc-4.2.4/gcc/config/rs6000/t-linux64
--- gcc-4.2.4-orig/gcc/config/rs6000/t-linux64 2009-08-03 13:27:06.000000000 +0300
+++ gcc-4.2.4/gcc/config/rs6000/t-linux64 2009-08-03 13:31:46.000000000 +0300
@@ -19,7 +19,7 @@
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
MULTILIB_EXCEPTIONS =
MULTILIB_EXCLUSIONS =
-MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = ../lib64 ../lib32
MULTILIB_MATCHES =
MULTILIB_EXCEPTIONS = m64/msoft-float
MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
+MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32) nof
MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
softfp_wrap_start := '\#ifndef __powerpc64__'
diff -Nur gcc-4.2.4-orig/gcc/config/sparc/linux64.h gcc-4.2.4/gcc/config/sparc/linux64.h
--- gcc-4.2.4-orig/gcc/config/sparc/linux64.h 2009-08-03 13:27:06.000000000 +0300
+++ gcc-4.2.4/gcc/config/sparc/linux64.h 2009-08-03 13:32:39.000000000 +0300
@@ -143,7 +143,7 @@
/* If ELF is the default format, we should not use /lib/elf. */
# We want fine grained libraries, so use the new code to build the
diff -ruN gcc-4.1.2/gcc/config/sparc/linux64.h gcc-4.1.2-multilib/gcc/config/sparc/linux64.h
--- gcc-4.1.2/gcc/config/sparc/linux64.h 2006-02-11 10:38:51.000000000 +0200
+++ gcc-4.1.2-multilib/gcc/config/sparc/linux64.h 2007-10-01 00:46:56.000000000 +0300
@@ -162,12 +162,12 @@
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
@@ -166,7 +166,7 @@
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib32 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /lib32/ld-linux.so.2}} \
%{static:-static}}} \
"
diff -ruN gcc-4.1.2/gcc/config/sparc/t-linux64 gcc-4.1.2-multilib/gcc/config/sparc/t-linux64
--- gcc-4.1.2/gcc/config/sparc/t-linux64 2004-04-01 19:05:22.000000000 +0300
+++ gcc-4.1.2-multilib/gcc/config/sparc/t-linux64 2007-10-01 00:47:58.000000000 +0300
diff -Nur gcc-4.2.4-orig/gcc/config/sparc/t-linux64 gcc-4.2.4/gcc/config/sparc/t-linux64
--- gcc-4.2.4-orig/gcc/config/sparc/t-linux64 2009-08-03 13:27:06.000000000 +0300
+++ gcc-4.2.4/gcc/config/sparc/t-linux64 2009-08-03 13:32:55.000000000 +0300
@@ -1,6 +1,6 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32

184
base/gcc/gcc-4.1.2-pure64-1.diff

@ -1,48 +1,64 @@
diff -ruN gcc-4.1.2/gcc/config/i386/linux64.h gcc-4.1.2-pure64/gcc/config/i386/linux64.h
--- gcc-4.1.2/gcc/config/i386/linux64.h 2005-08-10 20:53:01.000000000 +0300
+++ gcc-4.1.2-pure64/gcc/config/i386/linux64.h 2007-09-30 02:40:00.000000000 +0300
@@ -60,8 +60,8 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
+ %{m32:%{!dynamic-linker:-dynamic-linker /lib32/ld-linux.so.2}} \
+ %{!m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux-x86-64.so.2}}} \
%{static:-static}}"
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/gcc-4.1.2-pure64-1.diff
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
diff -Nur gcc-4.2.4-orig/gcc/config/i386/linux64.h gcc-4.2.4/gcc/config/i386/linux64.h
--- gcc-4.2.4-orig/gcc/config/i386/linux64.h 2009-08-02 19:04:12.000000000 +0300
+++ gcc-4.2.4/gcc/config/i386/linux64.h 2009-08-02 19:47:53.000000000 +0300
@@ -48,8 +48,8 @@
When the -shared link option is used a final link is not being
done. */
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
/* Similar to standard Linux, but adding -ffast-math support. */
diff -ruN gcc-4.1.2/gcc/config/i386/t-linux64 gcc-4.1.2-pure64/gcc/config/i386/t-linux64
--- gcc-4.1.2/gcc/config/i386/t-linux64 2005-08-10 20:53:01.000000000 +0300
+++ gcc-4.1.2-pure64/gcc/config/i386/t-linux64 2007-09-30 02:41:43.000000000 +0300
@@ -6,7 +6,7 @@
#undef LINK_SPEC
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
diff -Nur gcc-4.2.4-orig/gcc/config/i386/t-linux64 gcc-4.2.4/gcc/config/i386/t-linux64
--- gcc-4.2.4-orig/gcc/config/i386/t-linux64 2009-08-02 19:04:12.000000000 +0300
+++ gcc-4.2.4/gcc/config/i386/t-linux64 2009-08-02 19:48:56.000000000 +0300
@@ -13,7 +13,7 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = ../lib ../lib32
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_OSDIRNAMES = ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
diff -ruN gcc-4.1.2/gcc/config/mips/linux64.h gcc-4.1.2-pure64/gcc/config/mips/linux64.h
--- gcc-4.1.2/gcc/config/mips/linux64.h 2005-06-25 04:22:41.000000000 +0300
+++ gcc-4.1.2-pure64/gcc/config/mips/linux64.h 2007-09-30 02:42:37.000000000 +0300
@@ -47,9 +47,9 @@
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{mabi=n32: -dynamic-linker /lib32/ld.so.1} \
- %{mabi=64: -dynamic-linker /lib64/ld.so.1} \
- %{mabi=32: -dynamic-linker /lib/ld.so.1}}} \
+ %{mabi=n32: -dynamic-linker /lib64/ld.so.1} \
+ %{mabi=64: -dynamic-linker /lib/ld.so.1} \
+ %{mabi=32: -dynamic-linker /lib32/ld.so.1}}} \
%{static:-static}}} \
%{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
%{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
diff -ruN gcc-4.1.2/gcc/config/mips/t-linux64 gcc-4.1.2-pure64/gcc/config/mips/t-linux64
--- gcc-4.1.2/gcc/config/mips/t-linux64 2006-09-10 10:13:12.000000000 +0300
+++ gcc-4.1.2-pure64/gcc/config/mips/t-linux64 2007-09-30 02:43:48.000000000 +0300
diff -Nur gcc-4.2.4-orig/gcc/config/mips/linux64.h gcc-4.2.4/gcc/config/mips/linux64.h
--- gcc-4.2.4-orig/gcc/config/mips/linux64.h 2009-08-02 19:04:12.000000000 +0300
+++ gcc-4.2.4/gcc/config/mips/linux64.h 2009-08-02 19:52:22.000000000 +0300
@@ -35,9 +35,9 @@
%{!shared: %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}"
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKERN32 "/lib64/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
#define LINUX_DYNAMIC_LINKERN32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
diff -Nur gcc-4.2.4-orig/gcc/config/mips/t-linux64 gcc-4.2.4/gcc/config/mips/t-linux64
--- gcc-4.2.4-orig/gcc/config/mips/t-linux64 2009-08-02 19:04:12.000000000 +0300
+++ gcc-4.2.4/gcc/config/mips/t-linux64 2009-08-02 19:53:22.000000000 +0300
@@ -1,6 +1,6 @@
MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
MULTILIB_DIRNAMES = n32 32 64
@ -51,50 +67,45 @@ diff -ruN gcc-4.1.2/gcc/config/mips/t-linux64 gcc-4.1.2-pure64/gcc/config/mips/t
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
diff -ruN gcc-4.1.2/gcc/config/rs6000/linux64.h gcc-4.1.2-pure64/gcc/config/rs6000/linux64.h
--- gcc-4.1.2/gcc/config/rs6000/linux64.h 2006-02-10 22:58:33.000000000 +0200
+++ gcc-4.1.2-pure64/gcc/config/rs6000/linux64.h 2007-09-30 02:46:47.000000000 +0300
@@ -339,11 +339,11 @@
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /lib32/ld.so.1}}}"
diff -Nur gcc-4.2.4-orig/gcc/config/rs6000/linux64.h gcc-4.2.4/gcc/config/rs6000/linux64.h
--- gcc-4.2.4-orig/gcc/config/rs6000/linux64.h 2009-08-02 19:04:12.000000000 +0300
+++ gcc-4.2.4/gcc/config/rs6000/linux64.h 2009-08-02 19:55:36.000000000 +0300
@@ -335,8 +335,8 @@
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /lib/ld64.so.1}}}"
#undef TOC_SECTION_ASM_OP
#define TOC_SECTION_ASM_OP \
diff -ruN gcc-4.1.2/gcc/config/rs6000/t-linux64 gcc-4.1.2-pure64/gcc/config/rs6000/t-linux64
--- gcc-4.1.2/gcc/config/rs6000/t-linux64 2006-02-10 22:58:33.000000000 +0200
+++ gcc-4.1.2-pure64/gcc/config/rs6000/t-linux64 2007-09-30 02:47:31.000000000 +0300
@@ -11,7 +11,7 @@
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
#if UCLIBC_DEFAULT
diff -Nur gcc-4.2.4-orig/gcc/config/rs6000/t-linux64 gcc-4.2.4/gcc/config/rs6000/t-linux64
--- gcc-4.2.4-orig/gcc/config/rs6000/t-linux64 2009-08-02 19:04:12.000000000 +0300
+++ gcc-4.2.4/gcc/config/rs6000/t-linux64 2009-08-02 20:07:36.000000000 +0300
@@ -19,7 +19,7 @@
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
MULTILIB_EXCEPTIONS =
MULTILIB_EXCLUSIONS =
-MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = ../lib ../lib32
MULTILIB_MATCHES =
MULTILIB_EXCEPTIONS = m64/msoft-float
MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
+MULTILIB_OSDIRNAMES = ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32) nof
MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
# We want fine grained libraries, so use the new code to build the
diff -ruN gcc-4.1.2/gcc/config/sparc/linux64.h gcc-4.1.2-pure64/gcc/config/sparc/linux64.h
--- gcc-4.1.2/gcc/config/sparc/linux64.h 2006-02-11 10:38:51.000000000 +0200
+++ gcc-4.1.2-pure64/gcc/config/sparc/linux64.h 2007-09-30 02:51:50.000000000 +0300
@@ -162,21 +162,21 @@
softfp_wrap_start := '\#ifndef __powerpc64__'
diff -Nur gcc-4.2.4-orig/gcc/config/sparc/linux64.h gcc-4.2.4/gcc/config/sparc/linux64.h
--- gcc-4.2.4-orig/gcc/config/sparc/linux64.h 2009-08-02 19:04:12.000000000 +0300
+++ gcc-4.2.4/gcc/config/sparc/linux64.h 2009-08-02 19:58:14.000000000 +0300
@@ -166,7 +166,7 @@
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib32 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /lib32/ld-linux.so.2}} \
@@ -175,7 +175,7 @@
%{static:-static}}} \
"
@ -103,30 +114,9 @@ diff -ruN gcc-4.1.2/gcc/config/sparc/linux64.h gcc-4.1.2-pure64/gcc/config/sparc
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}}} \
"
@@ -252,12 +252,12 @@
#else /* !SPARC_BI_ARCH */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}}} \
%{mlittle-endian:-EL} \
%{!mno-relax:%{!r:-relax}} \
diff -ruN gcc-4.1.2/gcc/config/sparc/t-linux64 gcc-4.1.2-pure64/gcc/config/sparc/t-linux64
--- gcc-4.1.2/gcc/config/sparc/t-linux64 2004-04-01 19:05:22.000000000 +0300
+++ gcc-4.1.2-pure64/gcc/config/sparc/t-linux64 2007-09-30 02:54:16.000000000 +0300
diff -Nur gcc-4.2.4-orig/gcc/config/sparc/t-linux64 gcc-4.2.4/gcc/config/sparc/t-linux64
--- gcc-4.2.4-orig/gcc/config/sparc/t-linux64 2009-08-02 19:04:12.000000000 +0300
+++ gcc-4.2.4/gcc/config/sparc/t-linux64 2009-08-02 19:59:16.000000000 +0300
@@ -1,6 +1,6 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
@ -135,7 +125,7 @@ diff -ruN gcc-4.1.2/gcc/config/sparc/t-linux64 gcc-4.1.2-pure64/gcc/config/sparc
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
@@ -16,4 +16,4 @@
@@ -10,4 +10,4 @@
CRTSTUFF_T_CFLAGS = `if test x$$($(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) \
-print-multi-os-directory) \

3
base/gcc/gcc.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/gcc.conf
# Copyright (C) 2006 - 2008 The OpenSDE Project
# Copyright (C) 2006 - 2009 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
@ -114,6 +114,7 @@ if atstage toolchain; then
var_append confopt " " "--disable-cpp"
var_append confopt " " "--disable-shared"
var_append confopt " " "--disable-libssp"
var_append confopt " " "--disable-libgomp"
fi
if ! atstage native; then

8
base/gcc/gcc.desc

@ -1,9 +1,8 @@
[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN ---
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY]
[COPY] Filename: package/.../gcc/gcc.desc
[COPY] Copyright (C) 2006 - 2008 The OpenSDE Project
[COPY] Copyright (C) 2006 - 2009 The OpenSDE Project
[COPY] Copyright (C) 2004 - 2006 The T2 SDE Project
[COPY] Copyright (C) 1998 - 2003 Clifford Wolf
[COPY]
@ -36,8 +35,7 @@
[L] GPL
[S] Stable
[V] 4.1.2
[V] 4.2.4
[P] X 012--5---9 102.300
[D] 1410840800 gcc-4.1.2.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.1.2/
[D] 4010125392 gcc-4.2.4.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.2.4/

11
base/gcc/libstdcpp-with-tag-cc.patch

@ -2,6 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/libstdcpp-with-tag-cc.patch
# Copyright (C) 2009 The OpenSDE Project
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
@ -14,7 +15,6 @@
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
libtool inserts -lstdc++ where it shouldn't, this does not happen with CC tag.
-- jsaw
@ -29,14 +29,15 @@ libtool inserts -lstdc++ where it shouldn't, this does not happen with CC tag.
--mode=link $(CXX) \
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
--- gcc-4.0.2/libstdc++-v3/src/Makefile.in.orig 2006-01-10 14:20:28.000000000 +0100
+++ gcc-4.0.2/libstdc++-v3/src/Makefile.in 2006-01-10 14:21:28.000000000 +0100
@@ -404,7 +404,7 @@
--- gcc-4.2.4/libstdc++-v3/src/Makefile.in.vanilla 2007-05-10 13:11:09.903495748 +0200
+++ gcc-4.2.4/libstdc++-v3/src/Makefile.in 2007-05-10 13:12:19.567465671 +0200
@@ -436,7 +436,7 @@
# course is problematic at this point. So, we get the top-level
# directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver.
-CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
+CXXLINK = $(LIBTOOL) --tag CC --mode=link $(CXX) \
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
debugdir = debug

579
base/gcc/niagara.patch

@ -1,579 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/niagara.patch
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
2006-03-02 David S. Miller <davem@sunset.davemloft.net>
Sun Niagara specific optimizations.
* config.gcc: Recognize niagara as target.
* config/sparc/sparc.h (SPARC_RELAXED_ORDERING): Mention Niagara.
(TARGET_CPU_niagara): Define.
(CPP_CPU64_DEFAULT_SPEC): Define __sparc_v9__ for Niagara.
(ASM_CPU64_DEFAULT_SPEC): Pass -Av9b for Niagara.
(CPP_CPU_SPEC): Handle -mcpu=niagara.
(ASM_CPU_SPEC): Likewise.
(PROCESSOR_NIAGARA): New enum entry.
(REGISTER_MOVE_COST): Handle Niagara.
(BRANCH_COST, PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES): Likewise.
* config/sparc/sparc.c (niagara_costs): New processor_costs entry.
(sparc_override_options): Recognize "niagara", set appropriate
default MASK_* values for it, and align functions to 32-bytes
by default just like ULTRASPARC/ULTRASPARC3.
(sparc_initialize_trampoline): Handle niagara like ultrasparc.
(sparc64_initialize_trampoline): Likewise.
(sparc_use_sched_lookahead): Use zero for niagara.
(sparc_issue_rate): Use one for niagara.
* config/sparc/niagara.md: New file.
* config/sparc/sparc.md: Include it.
* config/sparc/sol2-bi.h (CPP_CPU64_DEFAULT_SPEC,
ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC): Set appropriately
when default cpu is niagara.
(CPP_CPU_SPEC): Handle -mcpu=niagara.
(ASM_CPU_SPEC): Likewise.
* config/sparc/sol2.h (ASM_CPU_DEFAULT_SPEC): Set appropriately
when default cpu is niagara.
(ASM_CPU_SPEC): Handle -mcpu=niagara.
* config/sparc/linux64.h: Handle a default of TARGET_CPU_niagara
just like v9/ultrasparc/ultrasparc3.
* doc/invoke.texi: Add documentation for "niagara" and improve
existing documentation for ultrasparc variants.
Index: gcc/config.gcc
===================================================================
--- ./gcc/config.gcc (revision 111647)
+++ ./gcc/config.gcc (working copy)
@@ -2830,7 +2830,7 @@
"" | sparc | sparcv9 | sparc64 | sparc86x \
| v7 | cypress | v8 | supersparc | sparclite | f930 \
| f934 | hypersparc | sparclite86x | sparclet | tsc701 \
- | v9 | ultrasparc | ultrasparc3)
+ | v9 | ultrasparc | ultrasparc3 | niagara)
# OK
;;
*)
Index: gcc/config/sparc/linux64.h
===================================================================
--- ./gcc/config/sparc/linux64.h (revision 111647)
+++ ./gcc/config/sparc/linux64.h (working copy)
@@ -43,7 +43,8 @@
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
- || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
+ || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3 \
+ || TARGET_CPU_DEFAULT == TARGET_CPU_niagara
/* A 64 bit v9 compiler with stack-bias,
in a Medium/Low code model environment. */
Index: gcc/config/sparc/niagara.md
===================================================================
--- ./gcc/config/sparc/niagara.md (revision 0)
+++ ./gcc/config/sparc/niagara.md (revision 0)
@@ -0,0 +1,119 @@
+;; Scheduling description for Niagara.
+;; Copyright (C) 2006 Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING. If not, write to
+;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;; Niagara is a single-issue processor.
+
+(define_automaton "niagara_0")
+
+(define_cpu_unit "niag_pipe" "niagara_0")
+
+(define_insn_reservation "niag_5cycle" 5
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "multi,flushw,iflush,trap"))
+ "niag_pipe*5")
+
+(define_insn_reservation "niag_4cycle" 4
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "savew"))
+ "niag_pipe*4")
+
+/* Most basic operations are single-cycle. */
+(define_insn_reservation "niag_ialu" 1
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "ialu,shift,compare,cmove"))
+ "niag_pipe")
+
+(define_insn_reservation "niag_imul" 11
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "imul"))
+ "niag_pipe*11")
+
+(define_insn_reservation "niag_idiv" 72
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "idiv"))
+ "niag_pipe*72")
+
+(define_insn_reservation "niag_branch" 3
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "call,sibcall,call_no_delay_slot,uncond_branch,branch"))
+ "niag_pipe*3")
+
+(define_insn_reservation "niag_3cycle_load" 3
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "load"))
+ "niag_pipe*3")
+
+(define_insn_reservation "niag_9cycle_load" 9
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "fpload"))
+ "niag_pipe*9")
+
+(define_insn_reservation "niag_1cycle_store" 1
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "store"))
+ "niag_pipe")
+
+(define_insn_reservation "niag_8cycle_store" 8
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "fpstore"))
+ "niag_pipe*8")
+
+/* Things incorrectly modelled here:
+ * FPADD{s,d}: 26 cycles
+ * FPSUB{s,d}: 26 cycles
+ * FABSD: 26 cycles
+ * F{s,d}TO{s,d}: 26 cycles
+ * F{s,d}TO{i,x}: 26 cycles
+ * FSMULD: 29 cycles
+ */
+(define_insn_reservation "niag_fmov" 8
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "fpmove,fpcmove,fpcrmove"))
+ "niag_pipe*8")
+
+(define_insn_reservation "niag_fpcmp" 26
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "fpcmp"))
+ "niag_pipe*26")
+
+(define_insn_reservation "niag_fmult" 29
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "fpmul"))
+ "niag_pipe*29")
+
+(define_insn_reservation "niag_fdivs" 54
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "fpdivs"))
+ "niag_pipe*54")
+
+(define_insn_reservation "niag_fdivd" 83
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "fpdivd"))
+ "niag_pipe*83")
+
+/* Things incorrectly modelled here:
+ * FPADD{16,32}: 10 cycles
+ * FPSUB{16,32}: 10 cycles
+ * FALIGNDATA: 10 cycles
+ */
+(define_insn_reservation "niag_vis" 8
+ (and (eq_attr "cpu" "niagara")
+ (eq_attr "type" "fga,fgm_pack,fgm_mul,fgm_cmp,fgm_pdist"))
+ "niag_pipe*8")
Index: gcc/config/sparc/sol2-bi.h
===================================================================
--- ./gcc/config/sparc/sol2-bi.h (revision 111647)
+++ ./gcc/config/sparc/sol2-bi.h (working copy)
@@ -39,6 +39,15 @@
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "b"
#endif
+#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara
+#undef CPP_CPU64_DEFAULT_SPEC
+#define CPP_CPU64_DEFAULT_SPEC ""
+#undef ASM_CPU32_DEFAULT_SPEC
+#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusb"
+#undef ASM_CPU64_DEFAULT_SPEC
+#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "b"
+#endif
+
#if DEFAULT_ARCH32_P
#define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}"
#define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}"
@@ -57,7 +66,7 @@
%{mcpu=sparclite|mcpu-f930|mcpu=f934:-D__sparclite__} \
%{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
%{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
-%{mcpu=v9|mcpu=ultrasparc|mcpu=ultrasparc3:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
+%{mcpu=v9|mcpu=ultrasparc|mcpu=ultrasparc3|mcpu=niagara:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
"
@@ -66,7 +75,8 @@
%{mcpu=v9:" DEF_ARCH32_SPEC("-xarch=v8plus") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "} \
%{mcpu=ultrasparc:" DEF_ARCH32_SPEC("-xarch=v8plusa") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "a") "} \
%{mcpu=ultrasparc3:" DEF_ARCH32_SPEC("-xarch=v8plusb") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "b") "} \
-%{!mcpu=ultrasparc3:%{!mcpu=ultrasparc:%{!mcpu=v9:%{mcpu*:" DEF_ARCH32_SPEC("-xarch=v8") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "}}}} \
+%{mcpu=niagara:" DEF_ARCH32_SPEC("-xarch=v8plusb") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "b") "} \
+%{!mcpu=niagara:%{!mcpu=ultrasparc3:%{!mcpu=ultrasparc:%{!mcpu=v9:%{mcpu*:" DEF_ARCH32_SPEC("-xarch=v8") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "}}}}} \
%{!mcpu*:%(asm_cpu_default)} \
"
Index: gcc/config/sparc/sol2.h
===================================================================
--- ./gcc/config/sparc/sol2.h (revision 111647)
+++ ./gcc/config/sparc/sol2.h (working copy)
@@ -1,6 +1,6 @@
/* Definitions of target machine for GCC, for SPARC running Solaris 2
- Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005,
+ 2006 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@netcom.com).
Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
@@ -41,11 +41,17 @@
#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusb"
#endif
+#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara
+#undef ASM_CPU_DEFAULT_SPEC
+#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusb"
+#endif
+
#undef ASM_CPU_SPEC
#define ASM_CPU_SPEC "\
%{mcpu=v9:-xarch=v8plus} \
%{mcpu=ultrasparc:-xarch=v8plusa} \
%{mcpu=ultrasparc3:-xarch=v8plusb} \
+%{mcpu=niagara:-xarch=v8plusb} \
%{!mcpu*:%(asm_cpu_default)} \
"
Index: gcc/config/sparc/sparc.c
===================================================================
--- ./gcc/config/sparc/sparc.c (revision 111647)
+++ ./gcc/config/sparc/sparc.c (working copy)
@@ -197,6 +197,30 @@
0, /* shift penalty */
};
+static const
+struct processor_costs niagara_costs = {
+ COSTS_N_INSNS (3), /* int load */
+ COSTS_N_INSNS (3), /* int signed load */
+ COSTS_N_INSNS (3), /* int zeroed load */
+ COSTS_N_INSNS (9), /* float load */
+ COSTS_N_INSNS (8), /* fmov, fneg, fabs */
+ COSTS_N_INSNS (8), /* fadd, fsub */
+ COSTS_N_INSNS (26), /* fcmp */
+ COSTS_N_INSNS (8), /* fmov, fmovr */
+ COSTS_N_INSNS (29), /* fmul */
+ COSTS_N_INSNS (54), /* fdivs */
+ COSTS_N_INSNS (83), /* fdivd */
+ COSTS_N_INSNS (100), /* fsqrts - not implemented in hardware */
+ COSTS_N_INSNS (100), /* fsqrtd - not implemented in hardware */
+ COSTS_N_INSNS (11), /* imul */
+ COSTS_N_INSNS (11), /* imulX */
+ 0, /* imul bit factor */
+ COSTS_N_INSNS (72), /* idiv */
+ COSTS_N_INSNS (72), /* idivX */
+ COSTS_N_INSNS (1), /* movcc/movr */
+ 0, /* shift penalty */
+};
+
const struct processor_costs *sparc_costs = &cypress_costs;
#ifdef HAVE_AS_RELAX_OPTION
@@ -597,6 +621,7 @@
{ TARGET_CPU_v9, "v9" },
{ TARGET_CPU_ultrasparc, "ultrasparc" },
{ TARGET_CPU_ultrasparc3, "ultrasparc3" },
+ { TARGET_CPU_niagara, "niagara" },
{ 0, 0 }
};
const struct cpu_default *def;
@@ -632,6 +657,8 @@
/* TI ultrasparc III */
/* ??? Check if %y issue still holds true in ultra3. */
{ "ultrasparc3", PROCESSOR_ULTRASPARC3, MASK_ISA, MASK_V9|MASK_DEPRECATED_V8_INSNS},
+ /* UltraSPARC T1 */
+ { "niagara", PROCESSOR_NIAGARA, MASK_ISA, MASK_V9|MASK_DEPRECATED_V8_INSNS},
{ 0, 0, 0, 0 }
};
const struct cpu_table *cpu;
@@ -741,7 +768,8 @@
/* Supply a default value for align_functions. */
if (align_functions == 0
&& (sparc_cpu == PROCESSOR_ULTRASPARC
- || sparc_cpu == PROCESSOR_ULTRASPARC3))
+ || sparc_cpu == PROCESSOR_ULTRASPARC3
+ || sparc_cpu == PROCESSOR_NIAGARA))
align_functions = 32;
/* Validate PCC_STRUCT_RETURN. */
@@ -790,6 +818,9 @@
case PROCESSOR_ULTRASPARC3:
sparc_costs = &ultrasparc3_costs;
break;
+ case PROCESSOR_NIAGARA:
+ sparc_costs = &niagara_costs;
+ break;
};
#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
@@ -7099,7 +7130,8 @@
aligned on a 16 byte boundary so one flush clears it all. */
emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode, tramp))));
if (sparc_cpu != PROCESSOR_ULTRASPARC
- && sparc_cpu != PROCESSOR_ULTRASPARC3)
+ && sparc_cpu != PROCESSOR_ULTRASPARC3
+ && sparc_cpu != PROCESSOR_NIAGARA)
emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode,
plus_constant (tramp, 8)))));
@@ -7141,7 +7173,8 @@
emit_insn (gen_flushdi (validize_mem (gen_rtx_MEM (DImode, tramp))));
if (sparc_cpu != PROCESSOR_ULTRASPARC
- && sparc_cpu != PROCESSOR_ULTRASPARC3)
+ && sparc_cpu != PROCESSOR_ULTRASPARC3
+ && sparc_cpu != PROCESSOR_NIAGARA)
emit_insn (gen_flushdi (validize_mem (gen_rtx_MEM (DImode, plus_constant (tramp, 8)))));
/* Call __enable_execute_stack after writing onto the stack to make sure
@@ -7321,6 +7354,8 @@
static int
sparc_use_sched_lookahead (void)
{
+ if (sparc_cpu == PROCESSOR_NIAGARA)
+ return 0;
if (sparc_cpu == PROCESSOR_ULTRASPARC
|| sparc_cpu == PROCESSOR_ULTRASPARC3)
return 4;
@@ -7336,6 +7371,7 @@
{
switch (sparc_cpu)
{
+ case PROCESSOR_NIAGARA:
default:
return 1;
case PROCESSOR_V9:
Index: gcc/config/sparc/sparc.h
===================================================================
--- ./gcc/config/sparc/sparc.h (revision 111647)
+++ ./gcc/config/sparc/sparc.h (working copy)
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler, for Sun SPARC.
Copyright (C) 1987, 1988, 1989, 1992, 1994, 1995, 1996, 1997, 1998, 1999
- 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com).
64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
at Cygnus Support.
@@ -206,7 +206,7 @@
which requires the following macro to be true if enabled. Prior to V9,
there are no instructions to even talk about memory synchronization.
Note that the UltraSPARC III processors don't implement RMO, unlike the
- UltraSPARC II processors.
+ UltraSPARC II processors. Niagara does not implement RMO either.
Default to false; for example, Solaris never enables RMO, only ever uses
total memory ordering (TMO). */
@@ -238,10 +238,12 @@
#define TARGET_CPU_sparc64 7 /* alias */
#define TARGET_CPU_ultrasparc 8
#define TARGET_CPU_ultrasparc3 9
+#define TARGET_CPU_niagara 10
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
- || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
+ || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3 \
+ || TARGET_CPU_DEFAULT == TARGET_CPU_niagara
#define CPP_CPU32_DEFAULT_SPEC ""
#define ASM_CPU32_DEFAULT_SPEC ""
@@ -262,6 +264,10 @@
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
#define ASM_CPU64_DEFAULT_SPEC "-Av9b"
#endif
+#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara
+#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
+#define ASM_CPU64_DEFAULT_SPEC "-Av9b"
+#endif
#else
@@ -352,6 +358,7 @@
%{mcpu=v9:-D__sparc_v9__} \
%{mcpu=ultrasparc:-D__sparc_v9__} \
%{mcpu=ultrasparc3:-D__sparc_v9__} \
+%{mcpu=niagara:-D__sparc_v9__} \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
"
#define CPP_ARCH32_SPEC ""
@@ -401,6 +408,7 @@
%{mcpu=v9:-Av9} \
%{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
%{mcpu=ultrasparc3:%{!mv8plus:-Av9b}} \
+%{mcpu=niagara:%{!mv8plus:-Av9b}} \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(asm_cpu_default)}}}}}}} \
"
@@ -524,7 +532,8 @@
PROCESSOR_TSC701,
PROCESSOR_V9,
PROCESSOR_ULTRASPARC,
- PROCESSOR_ULTRASPARC3
+ PROCESSOR_ULTRASPARC3,
+ PROCESSOR_NIAGARA
};
/* This is set from -m{cpu,tune}=xxx. */
@@ -2137,7 +2146,8 @@
|| (GENERAL_OR_I64 (CLASS1) && FP_REG_CLASS_P (CLASS2)) \
|| (CLASS1) == FPCC_REGS || (CLASS2) == FPCC_REGS) \
? ((sparc_cpu == PROCESSOR_ULTRASPARC \
- || sparc_cpu == PROCESSOR_ULTRASPARC3) ? 12 : 6) : 2)
+ || sparc_cpu == PROCESSOR_ULTRASPARC3 \
+ || sparc_cpu == PROCESSOR_NIAGARA) ? 12 : 6) : 2)
/* Provide the cost of a branch. For pre-v9 processors we use
a value of 3 to take into account the potential annulling of
@@ -2147,22 +2157,30 @@
On v9 and later, which have branch prediction facilities, we set
it to the depth of the pipeline as that is the cost of a
- mispredicted branch. */
+ mispredicted branch.
+ On Niagara, normal branches insert 3 bubbles into the pipe
+ and annulled branches insert 4 bubbles. */
+
#define BRANCH_COST \
((sparc_cpu == PROCESSOR_V9 \
|| sparc_cpu == PROCESSOR_ULTRASPARC) \
? 7 \
: (sparc_cpu == PROCESSOR_ULTRASPARC3 \
- ? 9 : 3))
+ ? 9 \
+ : (sparc_cpu == PROCESSOR_NIAGARA \
+ ? 4 \
+ : 3)))
#define PREFETCH_BLOCK \
((sparc_cpu == PROCESSOR_ULTRASPARC \
- || sparc_cpu == PROCESSOR_ULTRASPARC3) \
+ || sparc_cpu == PROCESSOR_ULTRASPARC3 \
+ || sparc_cpu == PROCESSOR_NIAGARA) \
? 64 : 32)
#define SIMULTANEOUS_PREFETCHES \
- ((sparc_cpu == PROCESSOR_ULTRASPARC) \
+ ((sparc_cpu == PROCESSOR_ULTRASPARC \
+ || sparc_cpu == PROCESSOR_NIAGARA) \
? 2 \
: (sparc_cpu == PROCESSOR_ULTRASPARC3 \
? 8 : 3))
Index: gcc/config/sparc/sparc.md
===================================================================
--- ./gcc/config/sparc/sparc.md (revision 111647)
+++ ./gcc/config/sparc/sparc.md (working copy)
@@ -1,6 +1,6 @@
;; Machine description for SPARC chip for GCC
;; Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-;; 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; 1999, 2000, 2001, 2002, 2003, 2004, 2005,2006 Free Software Foundation, Inc.
;; Contributed by Michael Tiemann (tiemann@cygnus.com)
;; 64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
;; at Cygnus Support.
@@ -94,7 +94,8 @@
sparclet,tsc701,
v9,
ultrasparc,
- ultrasparc3"
+ ultrasparc3,
+ niagara"
(const (symbol_ref "sparc_cpu_attr")))
;; Attribute for the instruction set.
@@ -315,6 +316,7 @@
(include "sparclet.md")
(include "ultra1_2.md")
(include "ultra3.md")
+(include "niagara.md")
;; Operand and operator predicates.
Index: gcc/doc/invoke.texi
===================================================================
--- ./gcc/doc/invoke.texi (revision 111647)
+++ ./gcc/doc/invoke.texi (working copy)
@@ -12268,8 +12268,8 @@
for machine type @var{cpu_type}. Supported values for @var{cpu_type} are
@samp{v7}, @samp{cypress}, @samp{v8}, @samp{supersparc}, @samp{sparclite},
@samp{f930}, @samp{f934}, @samp{hypersparc}, @samp{sparclite86x},
-@samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc}, and
-@samp{ultrasparc3}.
+@samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc},
+@samp{ultrasparc3}, and @samp{niagara}.
Default instruction scheduling parameters are used for values that select
an architecture and not an implementation. These are @samp{v7}, @samp{v8},
@@ -12283,7 +12283,7 @@
v8: supersparc, hypersparc
sparclite: f930, f934, sparclite86x
sparclet: tsc701
- v9: ultrasparc, ultrasparc3
+ v9: ultrasparc, ultrasparc3, niagara
@end smallexample
By default (unless configured otherwise), GCC generates code for the V7
@@ -12317,9 +12317,11 @@
architecture. This adds 64-bit integer and floating-point move instructions,
3 additional floating-point condition code registers and conditional move
instructions. With @option{-mcpu=ultrasparc}, the compiler additionally
-optimizes it for the Sun UltraSPARC I/II chips. With
+optimizes it for the Sun UltraSPARC I/II/IIi chips. With
@option{-mcpu=ultrasparc3}, the compiler additionally optimizes it for the
-Sun UltraSPARC III chip.
+Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ chips. With
+@option{-mcpu=niagara}, the compiler additionally optimizes it for
+Sun UltraSPARC T1 chips.
@item -mtune=@var{cpu_type}
@opindex mtune
@@ -12331,8 +12333,8 @@
@option{-mtune=@var{cpu_type}}, but the only useful values are those
that select a particular cpu implementation. Those are @samp{cypress},
@samp{supersparc}, @samp{hypersparc}, @samp{f930}, @samp{f934},
-@samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, and
-@samp{ultrasparc3}.
+@samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc},
+@samp{ultrasparc3}, and @samp{niagara}.
@item -mv8plus
@itemx -mno-v8plus

23
base/gcc/no-install-libiberty.patch

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/no-install-libiberty.patch
# Copyright (C) 2007 The OpenSDE Project
# Copyright (C) 2007 - 2009 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
@ -18,16 +18,19 @@
libiberty is installed by binutils too, we have traditionally prefered that one.
--- ./libiberty/Makefile.in.orig 2006-07-04 16:30:34.000000000 -0400
+++ ./libiberty/Makefile.in 2007-03-20 22:28:09.000000000 -0400
@@ -278,10 +278,6 @@
install: install_to_$(INSTALL_DEST) install-subdir
--- gcc-4.2.4/libiberty/Makefile.in.vanilla 2007-05-10 10:22:04.869363200 +0200
+++ gcc-4.2.4/libiberty/Makefile.in 2007-05-10 10:22:39.339327532 +0200
@@ -344,8 +342,8 @@
install_to_libdir: all
- ${mkinstalldirs} $(DESTDIR)$(libdir)$(MULTISUBDIR)
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
+ #${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
+ #$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
+ #( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
+ #mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
if test -n "${target_header_dir}"; then \
case "${target_header_dir}" in \
/*) thd=${target_header_dir};; \

38
base/gcc/powerpc64-nonofp.patch

@ -1,38 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/powerpc64-nonofp.patch
# Copyright (C) 2005 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- gcc-4.0.2/gcc/config/rs6000/t-linux64.vanilla 2005-12-22 08:50:38.000000000 +0000
+++ gcc-4.0.2/gcc/config/rs6000/t-linux64 2005-12-22 08:51:17.000000000 +0000
@@ -8,13 +8,13 @@
SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc64.ver
-MULTILIB_OPTIONS = m64/m32 msoft-float
-MULTILIB_DIRNAMES = 64 32 nof
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64 32
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
-MULTILIB_EXCEPTIONS = m64/msoft-float
-MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
+MULTILIB_EXCEPTIONS =
+MULTILIB_EXCLUSIONS =
-MULTILIB_OSDIRNAMES = ../lib64 ../lib nof
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
+MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_MATCHES =
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.

3
base/gcc/wrappers.in

@ -3,6 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/wrappers.in
# Copyright (C) 2009 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
@ -38,6 +39,8 @@ gcc_build_wrapper() {
}
gcc_build_wrapper CC GCC ${arch_target}-cc ${arch_target}-gcc{-2,-3,-33,-x,}
gcc_build_wrapper CPP CPP ${arch_target}-cpp
gcc_build_wrapper CXX GCC ${arch_target}-c++ ${arch_target}-g++
gcc_build_wrapper KCC GCC ${arch_target}-kcc{-2,-3,-33,-x,}
if atstage native || [ "$SDECFG_USE_CROSSCC" = 0 ] ; then

Loading…
Cancel
Save