gcc: update to gcc-4.5-20101118

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue
2010-11-26 22:22:22 +01:00
parent 4dda2a5567
commit 28ac55523c
7 changed files with 1091 additions and 2 deletions

View File

@@ -1,10 +1,11 @@
PKG_NAME="gcc"
PKG_VERSION="4.5.1"
PKG_VERSION="4.5-20101118"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://gcc.gnu.org/"
PKG_URL="ftp://ftp.gwdg.de/pub/misc/gcc/releases/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
# PKG_URL="ftp://ftp.gwdg.de/pub/misc/gcc/releases/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_URL="ftp://ftp.gwdg.de/pub/misc/gcc/snapshots/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="ccache"
PKG_PRIORITY="optional"

View File

@@ -0,0 +1,146 @@
diff -Naur gcc-4.5-20101118/gcc/ChangeLog gcc-4.5-20101118.patch/gcc/ChangeLog
--- gcc-4.5-20101118/gcc/ChangeLog 2010-11-17 11:46:36.000000000 +0100
+++ gcc-4.5-20101118.patch/gcc/ChangeLog 2010-11-26 03:06:24.441101626 +0100
@@ -1,3 +1,17 @@
+2010-11-23 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ PR driver/42690
+ * gcc.c (LINK_COMMAND_SPEC): Remove hard-coded pass-through plugin
+ options, replace by call of pass-through-libs spec function to process
+ link_gcc_c_sequence spec.
+ (lto_libgcc_spec): Delete variable.
+ (static_specs[]): Remove related entry.
+ (static_spec_functions[]): Add new entry for pass-through-libs.
+ (main): Don't generate deleted lto_libgcc_spec.
+ (pass_through_libs_spec_func): New function to implement the new
+ pass-through-libs spec function.
+ * doc/invoke.texi (pass-through-libs): Document new spec function.
+
2010-11-17 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46498
diff -Naur gcc-4.5-20101118/gcc/doc/invoke.texi gcc-4.5-20101118.patch/gcc/doc/invoke.texi
--- gcc-4.5-20101118/gcc/doc/invoke.texi 2010-09-08 19:36:40.000000000 +0200
+++ gcc-4.5-20101118.patch/gcc/doc/invoke.texi 2010-11-26 03:05:14.029157093 +0100
@@ -9382,6 +9382,18 @@
%@{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)@}
@end smallexample
+@item @code{pass-through-libs}
+The @code{pass-through-libs} spec function takes any number of arguments. It
+finds any @option{-l} options and any non-options ending in ".a" (which it
+assumes are the names of linker input library archive files) and returns a
+result containing all the found arguments each prepended by
+@option{-plugin-opt=-pass-through=} and joined by spaces. This list is
+intended to be passed to the LTO linker plugin.
+
+@smallexample
+%:pass-through-libs(%G %L %G)
+@end smallexample
+
@item @code{print-asm-header}
The @code{print-asm-header} function takes no arguments and simply
prints a banner like:
diff -Naur gcc-4.5-20101118/gcc/gcc.c gcc-4.5-20101118.patch/gcc/gcc.c
--- gcc-4.5-20101118/gcc/gcc.c 2010-04-18 19:46:08.000000000 +0200
+++ gcc-4.5-20101118.patch/gcc/gcc.c 2010-11-26 03:03:47.120008881 +0100
@@ -407,6 +407,7 @@
static const char *compare_debug_dump_opt_spec_function (int, const char **);
static const char *compare_debug_self_opt_spec_function (int, const char **);
static const char *compare_debug_auxbase_opt_spec_function (int, const char **);
+static const char *pass_through_libs_spec_func (int, const char **);
/* The Specs Language
@@ -781,8 +782,7 @@
-plugin %(linker_plugin_file) \
-plugin-opt=%(lto_wrapper) \
-plugin-opt=%(lto_gcc) \
- %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} \
- %{static:-plugin-opt=-pass-through=-lc} \
+ %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} \
%{O*:-plugin-opt=-O%*} \
%{w:-plugin-opt=-w} \
%{f*:-plugin-opt=-f%*} \
@@ -841,7 +841,6 @@
static const char *linker_plugin_file_spec = "";
static const char *lto_wrapper_spec = "";
static const char *lto_gcc_spec = "";
-static const char *lto_libgcc_spec = "";
static const char *link_command_spec = LINK_COMMAND_SPEC;
static const char *link_libgcc_spec = LINK_LIBGCC_SPEC;
static const char *startfile_prefix_spec = STARTFILE_PREFIX_SPEC;
@@ -1688,7 +1687,6 @@
INIT_STATIC_SPEC ("linker_plugin_file", &linker_plugin_file_spec),
INIT_STATIC_SPEC ("lto_wrapper", &lto_wrapper_spec),
INIT_STATIC_SPEC ("lto_gcc", &lto_gcc_spec),
- INIT_STATIC_SPEC ("lto_libgcc", &lto_libgcc_spec),
INIT_STATIC_SPEC ("link_libgcc", &link_libgcc_spec),
INIT_STATIC_SPEC ("md_exec_prefix", &md_exec_prefix),
INIT_STATIC_SPEC ("md_startfile_prefix", &md_startfile_prefix),
@@ -1730,6 +1728,7 @@
{ "compare-debug-dump-opt", compare_debug_dump_opt_spec_function },
{ "compare-debug-self-opt", compare_debug_self_opt_spec_function },
{ "compare-debug-auxbase-opt", compare_debug_auxbase_opt_spec_function },
+ { "pass-through-libs", pass_through_libs_spec_func },
#ifdef EXTRA_SPEC_FUNCTIONS
EXTRA_SPEC_FUNCTIONS
#endif
@@ -7580,10 +7579,6 @@
if (!linker_plugin_file_spec)
fatal ("-fuse-linker-plugin, but liblto_plugin.so not found");
- lto_libgcc_spec = find_a_file (&startfile_prefixes, "libgcc.a",
- R_OK, true);
- if (!lto_libgcc_spec)
- fatal ("could not find libgcc.a");
}
lto_gcc_spec = argv[0];
@@ -8977,3 +8972,46 @@
return name;
}
+
+/* %:pass-through-libs spec function. Finds all -l options and input
+ file names in the lib spec passed to it, and makes a list of them
+ prepended with the plugin option to cause them to be passed through
+ to the final link after all the new object files have been added. */
+
+const char *
+pass_through_libs_spec_func (int argc, const char **argv)
+{
+ char *prepended = xstrdup (" ");
+ int n;
+ /* Shlemiel the painter's algorithm. Innately horrible, but at least
+ we know that there will never be more than a handful of strings to
+ concat, and it's only once per run, so it's not worth optimising. */
+ for (n = 0; n < argc; n++)
+ {
+ char *old = prepended;
+ /* Anything that isn't an option is a full path to an output
+ file; pass it through if it ends in '.a'. Among options,
+ pass only -l. */
+ if (argv[n][0] == '-' && argv[n][1] == 'l')
+ {
+ const char *lopt = argv[n] + 2;
+ /* Handle both joined and non-joined -l options. If for any
+ reason there's a trailing -l with no joined or following
+ arg just discard it. */
+ if (!*lopt && ++n >= argc)
+ break;
+ else if (!*lopt)
+ lopt = argv[n];
+ prepended = concat (prepended, "-plugin-opt=-pass-through=-l",
+ lopt, " ", NULL);
+ }
+ else if (!strcmp (".a", argv[n] + strlen (argv[n]) - 2))
+ {
+ prepended = concat (prepended, "-plugin-opt=-pass-through=",
+ argv[n], " ", NULL);
+ }
+ if (prepended != old)
+ free (old);
+ }
+ return prepended;
+}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
diff -Naur gcc-4.5-20100610-old/gcc/config/i386/t-linux64 gcc-4.5-20100610-new/gcc/config/i386/t-linux64
--- gcc-4.5-20100610-old/gcc/config/i386/t-linux64 2010-06-11 09:31:52.000000000 -0700
+++ gcc-4.5-20100610-new/gcc/config/i386/t-linux64 2010-06-11 09:39:52.000000000 -0700
@@ -23,13 +23,13 @@
# it doesn't tell anything about the 32bit libraries on those systems. Set
# MULTILIB_OSDIRNAMES according to what is found on the target.
-MULTILIB_OPTIONS = m64/m32
-MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+#MULTILIB_OPTIONS = m64/m32
+#MULTILIB_DIRNAMES = 64 32
+#MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
-LIBGCC = stmp-multilib
-INSTALL_LIBGCC = install-multilib
+#LIBGCC = stmp-multilib
+#INSTALL_LIBGCC = install-multilib
-EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o \
- crtbeginT.o crtprec32.o crtprec64.o crtprec80.o \
- crtfastmath.o
+#EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o \
+# crtbeginT.o crtprec32.o crtprec64.o crtprec80.o \
+# crtfastmath.o

View File

@@ -0,0 +1,132 @@
diff -Naur gcc-4.5-20100610-old/gcc/config/i386/linux64.h gcc-4.5-20100610-new/gcc/config/i386/linux64.h
--- gcc-4.5-20100610-old/gcc/config/i386/linux64.h 2010-06-11 09:40:14.000000000 -0700
+++ gcc-4.5-20100610-new/gcc/config/i386/linux64.h 2010-06-11 09:41:13.000000000 -0700
@@ -59,7 +59,7 @@
done. */
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
#if TARGET_64BIT_DEFAULT
#define SPEC_32 "m32"
diff -Naur gcc-4.5-20100610-old/gcc/config/mips/iris6.h gcc-4.5-20100610-new/gcc/config/mips/iris6.h
--- gcc-4.5-20100610-old/gcc/config/mips/iris6.h 2010-06-11 09:40:14.000000000 -0700
+++ gcc-4.5-20100610-new/gcc/config/mips/iris6.h 2010-06-11 09:41:13.000000000 -0700
@@ -88,27 +88,27 @@
%{mabi=32:%{pg:gcrt1.o%s} \
%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
%{mabi=n32: \
- %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
- %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
- %{!p:/usr/lib32/mips4/crt1.o%s}}} \
- %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
- %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
- %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
+ %{mips4:%{pg:/usr/lib/mips4/gcrt1.o%s} \
+ %{!pg:%{p:/usr/lib/mips4/mcrt1.o%s /usr/lib/mips4/libprof1.a%s} \
+ %{!p:/usr/lib/mips4/crt1.o%s}}} \
+ %{!mips4:%{pg:/usr/lib/mips3/gcrt1.o%s} \
+ %{!pg:%{p:/usr/lib/mips3/mcrt1.o%s /usr/lib/mips3/libprof1.a%s} \
+ %{!p:/usr/lib/mips3/crt1.o%s}}}} \
%{mabi=64: \
- %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
- %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
- %{!p:/usr/lib64/mips4/crt1.o}}} \
- %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
- %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
- %{!p:/usr/lib64/mips3/crt1.o}}}}} \
+ %{mips4:%{pg:/usr/lib/mips4/gcrt1.o} \
+ %{!pg:%{p:/usr/lib/mips4/mcrt1.o /usr/lib/mips4/libprof1.a} \
+ %{!p:/usr/lib/mips4/crt1.o}}} \
+ %{!mips4:%{pg:/usr/lib/mips3/gcrt1.o} \
+ %{!pg:%{p:/usr/lib/mips3/mcrt1.o /usr/lib/mips3/libprof1.a} \
+ %{!p:/usr/lib/mips3/crt1.o}}}}} \
irix-crti.o%s crtbegin.o%s"
#undef LIB_SPEC
#define LIB_SPEC \
- "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
- -L/usr/lib32} \
- %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
- -L/usr/lib64} \
+ "%{mabi=n32: %{mips4:-L/usr/lib/mips4} %{!mips4:-L/usr/lib/mips3} \
+ -L/usr/lib} \
+ %{mabi=64: %{mips4:-L/usr/lib/mips4} %{!mips4:-L/usr/lib/mips3} \
+ -L/usr/lib} \
%{!shared:" \
SUBTARGET_DONT_WARN_UNUSED_SPEC \
" %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
@@ -125,10 +125,10 @@
"crtend.o%s irix-crtn.o%s \
%{!shared: \
%{mabi=32:crtn.o%s}\
- %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
- %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
- %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
- %{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
+ %{mabi=n32:%{mips4:/usr/lib/mips4/crtn.o%s}\
+ %{!mips4:/usr/lib/mips3/crtn.o%s}}\
+ %{mabi=64:%{mips4:/usr/lib/mips4/crtn.o%s}\
+ %{!mips4:/usr/lib/mips3/crtn.o%s}}}"
#define MIPS_TFMODE_FORMAT mips_extended_format
diff -Naur gcc-4.5-20100610-old/gcc/config/mips/linux64.h gcc-4.5-20100610-new/gcc/config/mips/linux64.h
--- gcc-4.5-20100610-old/gcc/config/mips/linux64.h 2010-06-11 09:40:14.000000000 -0700
+++ gcc-4.5-20100610-new/gcc/config/mips/linux64.h 2010-06-11 09:41:13.000000000 -0700
@@ -36,9 +36,9 @@
%{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 UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKERN32 "/lib/ld.so.1"
+#define UCLIBC_DYNAMIC_LINKERN32 "/lib/ld-uClibc.so.0"
#define LINUX_DYNAMIC_LINKERN32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
diff -Naur gcc-4.5-20100610-old/gcc/config/rs6000/linux64.h gcc-4.5-20100610-new/gcc/config/rs6000/linux64.h
--- gcc-4.5-20100610-old/gcc/config/rs6000/linux64.h 2010-06-11 09:40:14.000000000 -0700
+++ gcc-4.5-20100610-new/gcc/config/rs6000/linux64.h 2010-06-11 09:41:13.000000000 -0700
@@ -349,7 +349,7 @@
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.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 -Naur gcc-4.5-20100610-old/gcc/config/sparc/linux64.h gcc-4.5-20100610-new/gcc/config/sparc/linux64.h
--- gcc-4.5-20100610-old/gcc/config/sparc/linux64.h 2010-06-11 09:40:14.000000000 -0700
+++ gcc-4.5-20100610-new/gcc/config/sparc/linux64.h 2010-06-11 09:41:13.000000000 -0700
@@ -110,7 +110,7 @@
/* If ELF is the default format, we should not use /lib/elf. */
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2"
#ifdef SPARC_BI_ARCH
@@ -130,7 +130,7 @@
%{static:-static}}} \
"
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
@@ -211,7 +211,7 @@
#else /* !SPARC_BI_ARCH */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
+#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \

View File

@@ -0,0 +1,95 @@
diff -Naur gcc-4.5-20100610-old/libstdc++-v3/config.h.in gcc-4.5-20100610-new/libstdc++-v3/config.h.in
--- gcc-4.5-20100610-old/libstdc++-v3/config.h.in 2010-06-11 09:40:55.000000000 -0700
+++ gcc-4.5-20100610-new/libstdc++-v3/config.h.in 2010-06-11 09:41:44.000000000 -0700
@@ -115,7 +115,7 @@
#undef HAVE_FABSL
/* Define to 1 if you have the <fenv.h> header file. */
-#undef HAVE_FENV_H
+#define HAVE_FENV_H 1
/* Define to 1 if you have the `finite' function. */
#undef HAVE_FINITE
@@ -170,7 +170,7 @@
#undef HAVE_HYPOTL
/* Define if you have the iconv() function. */
-#undef HAVE_ICONV
+#define HAVE_ICONV 1
/* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H
@@ -209,7 +209,7 @@
#undef HAVE_ISWBLANK
/* Define if LC_MESSAGES is available in <locale.h>. */
-#undef HAVE_LC_MESSAGES
+#define HAVE_LC_MESSAGES 1
/* Define to 1 if you have the `ldexpf' function. */
#undef HAVE_LDEXPF
@@ -290,7 +290,7 @@
#undef HAVE_QFPCLASS
/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
+#define HAVE_SETENV 1
/* Define to 1 if you have the `sincos' function. */
#undef HAVE_SINCOS
@@ -329,7 +329,7 @@
#undef HAVE_STDLIB_H
/* Define if strerror_l is available in <string.h>. */
-#undef HAVE_STRERROR_L
+#define HAVE_STRERROR_L 1
/* Define if strerror_r is available in <string.h>. */
#undef HAVE_STRERROR_R
@@ -356,7 +356,7 @@
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/ipc.h> header file. */
-#undef HAVE_SYS_IPC_H
+#define HAVE_SYS_IPC_H 1
/* Define to 1 if you have the <sys/isa_defs.h> header file. */
#undef HAVE_SYS_ISA_DEFS_H
@@ -368,16 +368,16 @@
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
+#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/sem.h> header file. */
-#undef HAVE_SYS_SEM_H
+#define HAVE_SYS_SEM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
+#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
@@ -407,7 +407,7 @@
#undef HAVE_TGMATH_H
/* Define to 1 if the target supports thread-local storage. */
-#undef HAVE_TLS
+#define HAVE_TLS 1
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -620,7 +620,7 @@
#undef HAVE__TANL
/* Define as const if the declaration of iconv() needs const. */
-#undef ICONV_CONST
+#define ICONV_CONST 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/

View File

@@ -0,0 +1,24 @@
diff -Naur gcc-4.5.1/configure gcc-4.5.1.patch/configure
--- gcc-4.5.1/configure 2010-06-24 23:06:37.000000000 +0200
+++ gcc-4.5.1.patch/configure 2010-09-02 17:12:08.807742278 +0200
@@ -5781,7 +5781,7 @@
# Check for PPL
ppl_major_version=0
-ppl_minor_version=10
+ppl_minor_version=11
ppllibs=" -lppl_c -lppl -lgmpxx"
pplinc=
diff -Naur gcc-4.5.1/configure.ac gcc-4.5.1.patch/configure.ac
--- gcc-4.5.1/configure.ac 2010-06-24 23:06:37.000000000 +0200
+++ gcc-4.5.1.patch/configure.ac 2010-09-02 17:12:22.748618664 +0200
@@ -1511,7 +1511,7 @@
# Check for PPL
ppl_major_version=0
-ppl_minor_version=10
+ppl_minor_version=11
ppllibs=" -lppl_c -lppl -lgmpxx"
pplinc=