auto-import gcc-4.1.0-0.3 on branch devel from gcc-4.1.0-0.3.src.rpm
This commit is contained in:
parent
3b13067f2b
commit
fea77518a0
@ -1 +1 @@
|
||||
gcc-4.0.2-20051121.tar.bz2
|
||||
gcc-4.1.0-20051128.tar.bz2
|
||||
|
75
gcc41-ada-pr18302.patch
Normal file
75
gcc41-ada-pr18302.patch
Normal file
@ -0,0 +1,75 @@
|
||||
gcc/ada/
|
||||
2004-11-28 James A. Morrison <ja2morri@csclub.uwaterloo.ca>
|
||||
|
||||
PR ada/18302
|
||||
* Make-lang.in (check-gnat): Set EXPECT environment variable.
|
||||
|
||||
testsuite/
|
||||
2005-05-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* ada/acats/run_all.sh: Filter out spawn line from target_bit.
|
||||
|
||||
2004-11-28 James A. Morrison <ja2morri@csclub.uwaterloo.ca>
|
||||
|
||||
PR ada/18302
|
||||
* ada/acats/run_all.sh (target_run): Run test through run_test.expect.
|
||||
* ada/acats/run_test.expect: Expect script for ACATS tests.
|
||||
|
||||
--- gcc/testsuite/ada/acats/run_all.sh (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/testsuite/ada/acats/run_all.sh (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -13,7 +13,8 @@
|
||||
gnatflags="-gnatws"
|
||||
|
||||
target_run () {
|
||||
-$*
|
||||
+ LD_LIBRARY_PATH=$ADA_INCLUDE_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} \
|
||||
+ $EXPECT -f $testdir/run_test.exp $1 > $2
|
||||
}
|
||||
|
||||
# End of customization section.
|
||||
@@ -92,8 +93,8 @@
|
||||
|
||||
# Find out the size in bit of an address on the target
|
||||
target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
|
||||
-target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
|
||||
-target_bit=`cat $dir/support/impbit.out`
|
||||
+target_run $dir/support/impbit $dir/support/impbit.out 2>/dev/null
|
||||
+target_bit=`egrep -v -e ^spawn $dir/support/impbit.out`
|
||||
echo target_bit="$target_bit" >> $dir/acats.log
|
||||
|
||||
# Find out a suitable asm statement
|
||||
@@ -259,7 +260,7 @@
|
||||
if [ ! -x $dir/tests/$chapter/$i/$binmain ]; then
|
||||
sync
|
||||
fi
|
||||
- target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
|
||||
+ target_run $dir/tests/$chapter/$i/$binmain $dir/tests/$chapter/$i/${i}.log 2>&1
|
||||
cd $dir/tests/$chapter/$i
|
||||
cat ${i}.log >> $dir/acats.log
|
||||
egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
|
||||
--- gcc/testsuite/ada/acats/run_test.exp (.../gcc-4_0-branch) (revision 0)
|
||||
+++ gcc/testsuite/ada/acats/run_test.exp (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -0,0 +1,13 @@
|
||||
+#!/usr/bin/expect -f
|
||||
+
|
||||
+if {[info exists env(DEJAGNU_TIMEOUT)]} {
|
||||
+ set timeout $env(DEJAGNU_TIMEOUT)
|
||||
+} else {
|
||||
+ set timeout 300
|
||||
+}
|
||||
+
|
||||
+spawn $argv
|
||||
+expect timeout {
|
||||
+ send_user "Program timed out.\n"
|
||||
+ exit 1
|
||||
+}
|
||||
--- gcc/ada/Make-lang.in (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/Make-lang.in (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -809,6 +809,7 @@
|
||||
check-gnat:
|
||||
test -d $(ACATSDIR) || mkdir -p $(ACATSDIR)
|
||||
testdir=`cd ${srcdir}/${ACATSDIR}; ${PWD_COMMAND}`; \
|
||||
+ EXPECT=${EXPECT} ; export EXPECT ; \
|
||||
export testdir; cd $(ACATSDIR); $${testdir}/run_acats $(CHAPTERS)
|
||||
|
||||
.PHONY: check-gnat
|
67
gcc41-ada-tweaks.patch
Normal file
67
gcc41-ada-tweaks.patch
Normal file
@ -0,0 +1,67 @@
|
||||
2004-10-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gnat_ugn.texi: Add : and . to direntry.
|
||||
* gnat-style.texi: Change dircategory to GNU Ada tools.
|
||||
|
||||
2005-02-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* Makefile.in (gnatlib-shared-default): Disallow dlopening of
|
||||
libgnat.so.
|
||||
|
||||
--- gcc/ada/gnat-style.texi (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/gnat-style.texi (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -28,7 +28,7 @@
|
||||
@setchapternewpage odd
|
||||
|
||||
|
||||
-@dircategory Programming
|
||||
+@dircategory GNU Ada tools
|
||||
@direntry
|
||||
* gnat-style: (gnat-style). GNAT Coding Style
|
||||
@end direntry
|
||||
--- gcc/ada/Makefile.in (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/Makefile.in (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -1316,7 +1316,7 @@
|
||||
LIBRARY_VERSION := $(LIB_VERSION)
|
||||
endif
|
||||
|
||||
-ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
|
||||
+ifeq ($(strip $(filter-out powerpc% ppc% linux%,$(arch) $(osys))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<a-intnam-linux.ads \
|
||||
s-inmaop.adb<s-inmaop-posix.adb \
|
||||
@@ -1862,7 +1862,7 @@
|
||||
THREAD_KIND="$(THREAD_KIND)" \
|
||||
gnatlib
|
||||
$(RM) rts/libgna*$(soext)
|
||||
- cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
|
||||
+ cd rts; ../../xgcc -B../../ -shared -Wl,-z,nodlopen $(TARGET_LIBGCC2_CFLAGS) \
|
||||
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
|
||||
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
|
||||
$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
|
||||
--- gcc/ada/gnat_ugn.texi (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/gnat_ugn.texi (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -101,7 +101,7 @@
|
||||
@settitle @value{EDITION} User's Guide @value{PLATFORM}
|
||||
@dircategory GNU Ada tools
|
||||
@direntry
|
||||
-* @value{EDITION} User's Guide (@value{FILE}) @value{PLATFORM}
|
||||
+* @value{EDITION} User's Guide: (@value{FILE}). User's Guide for GNU Ada Tools.
|
||||
@end direntry
|
||||
|
||||
@include gcc-common.texi
|
||||
--- gcc/ada/link.c (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ gcc/ada/link.c (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -164,9 +164,9 @@
|
||||
|
||||
#elif defined (linux)
|
||||
const char *__gnat_object_file_option = "";
|
||||
-const char *__gnat_run_path_option = "-Wl,-rpath,";
|
||||
-char __gnat_shared_libgnat_default = STATIC;
|
||||
-int __gnat_link_max = 8192;
|
||||
+const char *__gnat_run_path_option = "";
|
||||
+char __gnat_shared_libgnat_default = SHARED;
|
||||
+int __gnat_link_max = 131072;
|
||||
unsigned char __gnat_objlist_file_supported = 1;
|
||||
unsigned char __gnat_using_gnu_linker = 1;
|
||||
const char *__gnat_object_library_extension = ".a";
|
50
gcc41-gnuc-rh-release.patch
Normal file
50
gcc41-gnuc-rh-release.patch
Normal file
@ -0,0 +1,50 @@
|
||||
2004-10-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* c-cppbuiltin.c (define__GNUC__): Also define __GNUC_RH_RELEASE__.
|
||||
|
||||
--- gcc/c-cppbuiltin.c.jj 2004-10-07 21:27:38.000000000 +0200
|
||||
+++ gcc/c-cppbuiltin.c 2004-10-19 11:41:50.000000000 +0200
|
||||
@@ -257,13 +257,13 @@ define__GNUC__ (void)
|
||||
{
|
||||
/* The format of the version string, enforced below, is
|
||||
([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? */
|
||||
- const char *q, *v = version_string;
|
||||
+ const char *q, *v = version_string, *vstart, *vend;
|
||||
|
||||
while (*v && !ISDIGIT (*v))
|
||||
v++;
|
||||
gcc_assert (*v && (v <= version_string || v[-1] == '-'));
|
||||
|
||||
- q = v;
|
||||
+ vstart = q = v;
|
||||
while (ISDIGIT (*v))
|
||||
v++;
|
||||
builtin_define_with_value_n ("__GNUC__", q, v - q);
|
||||
@@ -289,6 +289,27 @@ define__GNUC__ (void)
|
||||
builtin_define_with_value_n ("__GNUC_PATCHLEVEL__", "0", 1);
|
||||
|
||||
gcc_assert (!*v || *v == ' ' || *v == '-');
|
||||
+
|
||||
+ vend = v;
|
||||
+ v = strchr (v, '(');
|
||||
+ if (v != NULL && strncmp (v + 1, "Red Hat ", 8) == 0)
|
||||
+ {
|
||||
+ v += 9;
|
||||
+ if (strncmp (v, "Linux ", 6) == 0)
|
||||
+ v += 6;
|
||||
+
|
||||
+ gcc_assert (strncmp (v, vstart, vend - vstart) == 0);
|
||||
+ gcc_assert (v[vend - vstart] == '-');
|
||||
+
|
||||
+ v += vend - vstart + 1;
|
||||
+ q = v;
|
||||
+ gcc_assert (ISDIGIT (*v));
|
||||
+ while (ISDIGIT (*v))
|
||||
+ v++;
|
||||
+ builtin_define_with_value_n ("__GNUC_RH_RELEASE__", q, v - q);
|
||||
+
|
||||
+ gcc_assert (!*v || *v == ')' || *v == '.');
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Define macros used by <stdint.h>. Currently only defines limits
|
538
gcc41-ia64-libunwind.patch
Normal file
538
gcc41-ia64-libunwind.patch
Normal file
@ -0,0 +1,538 @@
|
||||
2004-11-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config.gcc (ia64*-*-linux*): If native and libelf is installed,
|
||||
use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
|
||||
fragments.
|
||||
* config/ia64/t-glibc-no-libunwind: New file.
|
||||
* config/ia64/change-symver.c: New file.
|
||||
* config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
|
||||
define _Unwind_* to __symverglobal_Unwind_*.
|
||||
(alias): Undefine.
|
||||
(symverglobal): Define. Use it on _Unwind_*.
|
||||
* config/ia64/mkmap-symver-multi.awk: New file.
|
||||
* config/ia64/libgcc-ia64-no-libunwind.ver: New file.
|
||||
|
||||
--- gcc/config.gcc.jj 2004-10-04 08:55:44.000000000 -0400
|
||||
+++ gcc/config.gcc 2004-11-13 05:23:50.000000000 -0500
|
||||
@@ -1185,9 +1185,16 @@ ia64*-*-freebsd*)
|
||||
;;
|
||||
ia64*-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
|
||||
- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
|
||||
- if test x$with_system_libunwind != xyes ; then
|
||||
- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
|
||||
+ tmake_file="${tmake_file} ia64/t-ia64"
|
||||
+ if test x${target} = x${host} && test x${target} = x${build} \
|
||||
+ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
|
||||
+ && test -f /usr/lib/libelf.so; then
|
||||
+ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
|
||||
+ else
|
||||
+ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
|
||||
+ if test x$with_system_libunwind != xyes ; then
|
||||
+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
|
||||
+ fi
|
||||
fi
|
||||
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
|
||||
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
|
||||
--- gcc/config/ia64/t-glibc-no-libunwind.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/t-glibc-no-libunwind 2004-11-15 09:56:33.000000000 -0500
|
||||
@@ -0,0 +1,30 @@
|
||||
+# Don't use system libunwind library on IA-64 GLIBC based system,
|
||||
+# but make _Unwind_* symbols unversioned, so that created programs
|
||||
+# are usable even when libgcc_s uses libunwind.
|
||||
+LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
|
||||
+SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
|
||||
+SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
|
||||
+
|
||||
+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
|
||||
+ -Wl,--soname=$(SHLIB_SONAME) \
|
||||
+ -Wl,--version-script=$(SHLIB_MAP) \
|
||||
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
|
||||
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
|
||||
+ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
|
||||
+ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
|
||||
+ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
|
||||
+ else true; fi && \
|
||||
+ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
|
||||
+ $(srcdir)/config/ia64/change-symver.c -lelf && \
|
||||
+ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
|
||||
+ GCC_3.4.2 _GLOBAL_ \
|
||||
+ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
|
||||
+ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
|
||||
+ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
|
||||
+ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
|
||||
+ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
|
||||
+ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
|
||||
+ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
|
||||
+ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
|
||||
+
|
||||
+TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
|
||||
--- gcc/config/ia64/change-symver.c.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/change-symver.c 2004-11-13 05:23:50.000000000 -0500
|
||||
@@ -0,0 +1,211 @@
|
||||
+#define _GNU_SOURCE 1
|
||||
+#define _FILE_OFFSET_BITS 64
|
||||
+#include <endian.h>
|
||||
+#include <errno.h>
|
||||
+#include <error.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <fnmatch.h>
|
||||
+#include <gelf.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int
|
||||
+compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
|
||||
+{
|
||||
+ if (strcmp (name, "_GLOBAL_") == 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ int cnt;
|
||||
+ size_t offset = 0;
|
||||
+ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
|
||||
+ {
|
||||
+ GElf_Verdef defmem;
|
||||
+ GElf_Verdef *def;
|
||||
+ GElf_Verdaux auxmem;
|
||||
+ GElf_Verdaux *aux;
|
||||
+ unsigned int auxoffset;
|
||||
+
|
||||
+ /* Get the data at the next offset. */
|
||||
+ def = gelf_getverdef (verd, offset, &defmem);
|
||||
+ if (def == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ auxoffset = offset + def->vd_aux;
|
||||
+ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
|
||||
+ if (aux == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
|
||||
+ aux->vda_name)) == 0)
|
||||
+ return def->vd_ndx;
|
||||
+
|
||||
+ /* Find the next offset. */
|
||||
+ offset += def->vd_next;
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ if (argc < 4)
|
||||
+ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
|
||||
+
|
||||
+ const char *fname = argv[1];
|
||||
+
|
||||
+ /* Open the file. */
|
||||
+ int fd;
|
||||
+ fd = open (fname, O_RDWR);
|
||||
+ if (fd == -1)
|
||||
+ error (1, errno, fname);
|
||||
+
|
||||
+ elf_version (EV_CURRENT);
|
||||
+
|
||||
+ /* Now get the ELF descriptor. */
|
||||
+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
|
||||
+ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
|
||||
+ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ size_t shstrndx;
|
||||
+ /* Get the section header string table index. */
|
||||
+ if (elf_getshstrndx (elf, &shstrndx) < 0)
|
||||
+ error (1, 0, "cannot get shstrndx from %s", fname);
|
||||
+
|
||||
+ GElf_Ehdr ehdr_mem;
|
||||
+ GElf_Ehdr *ehdr;
|
||||
+
|
||||
+ /* We need the ELF header in a few places. */
|
||||
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
|
||||
+ if (ehdr == NULL)
|
||||
+ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ Elf_Scn *scn = NULL;
|
||||
+ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
|
||||
+ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
|
||||
+
|
||||
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
|
||||
+ {
|
||||
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
|
||||
+
|
||||
+ if (shdr == NULL)
|
||||
+ error (1, 0, "couldn't get shdr from %s", fname);
|
||||
+
|
||||
+ if ((shdr->sh_flags & SHF_ALLOC) != 0)
|
||||
+ {
|
||||
+ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
|
||||
+ Elf_Data **p;
|
||||
+
|
||||
+ if (strcmp (name, ".gnu.version") == 0)
|
||||
+ {
|
||||
+ p = &ver;
|
||||
+ ver_shdr = *shdr;
|
||||
+ }
|
||||
+ else if (strcmp (name, ".gnu.version_d") == 0)
|
||||
+ {
|
||||
+ p = &verd;
|
||||
+ verd_shdr = *shdr;
|
||||
+ }
|
||||
+ else if (strcmp (name, ".dynsym") == 0)
|
||||
+ {
|
||||
+ p = &dynsym;
|
||||
+ dynsym_shdr = *shdr;
|
||||
+ }
|
||||
+ else
|
||||
+ continue;
|
||||
+
|
||||
+ if (*p != NULL)
|
||||
+ error (1, 0, "Two %s sections in %s", name, fname);
|
||||
+ *p = elf_getdata (scn, NULL);
|
||||
+ if (*p == NULL || elf_getdata (scn, *p) != NULL)
|
||||
+ error (1, 0, "No data or non-contiguous data in %s section in %s",
|
||||
+ name, fname);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (ver == NULL || verd == NULL || dynsym == NULL)
|
||||
+ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
|
||||
+
|
||||
+ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
|
||||
+ if (from_idx == -1)
|
||||
+ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
|
||||
+
|
||||
+ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
|
||||
+ if (to_idx == -1)
|
||||
+ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
|
||||
+
|
||||
+ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
|
||||
+ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
|
||||
+ || ver_shdr.sh_entsize != 2
|
||||
+ || (ver_shdr.sh_size & 1)
|
||||
+ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
|
||||
+ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
|
||||
+
|
||||
+ size_t nentries = ver_shdr.sh_size / 2;
|
||||
+ size_t cnt;
|
||||
+ GElf_Versym array[nentries];
|
||||
+ for (cnt = 0; cnt < nentries; ++cnt)
|
||||
+ {
|
||||
+ GElf_Versym vsymmem;
|
||||
+ GElf_Versym *vsym;
|
||||
+
|
||||
+ vsym = gelf_getversym (ver, cnt, &vsymmem);
|
||||
+ if (vsym == NULL)
|
||||
+ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ array[cnt] = *vsym;
|
||||
+ if (*vsym != from_idx)
|
||||
+ continue;
|
||||
+
|
||||
+ GElf_Sym sym_mem;
|
||||
+ GElf_Sym *sym;
|
||||
+ sym = gelf_getsym (dynsym, cnt, &sym_mem);
|
||||
+ if (sym == NULL)
|
||||
+ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
|
||||
+
|
||||
+ int argn;
|
||||
+ for (argn = 4; argn < argc; ++argn)
|
||||
+ if (fnmatch (argv[argn], name, 0) == 0)
|
||||
+ {
|
||||
+ array[cnt] = to_idx;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (sizeof (array[0]) != 2)
|
||||
+ abort ();
|
||||
+
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
|
||||
+ ;
|
||||
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
|
||||
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
|
||||
+ ;
|
||||
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
|
||||
+#else
|
||||
+# error Unsupported endianity
|
||||
+#endif
|
||||
+ {
|
||||
+ for (cnt = 0; cnt < nentries; ++cnt)
|
||||
+ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
|
||||
+ }
|
||||
+ else
|
||||
+ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
|
||||
+
|
||||
+ if (elf_end (elf) != 0)
|
||||
+ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
|
||||
+
|
||||
+ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
|
||||
+ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
|
||||
+ fname);
|
||||
+
|
||||
+ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
|
||||
+ error (1, 0, "failed to write .gnu.version section into %s", fname);
|
||||
+
|
||||
+ close (fd);
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/config/ia64/unwind-ia64.c.jj 2004-10-04 08:55:57.000000000 -0400
|
||||
+++ gcc/config/ia64/unwind-ia64.c 2004-11-15 09:07:45.000000000 -0500
|
||||
@@ -51,6 +51,51 @@
|
||||
#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
|
||||
#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
|
||||
|
||||
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
|
||||
+ (_Unwind_Trace_Fn, void *);
|
||||
+extern void __symverglobal_Unwind_DeleteException
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
|
||||
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetCFA
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetBSP
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Word __symverglobal_Unwind_GetGR
|
||||
+ (struct _Unwind_Context *, int );
|
||||
+extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
|
||||
+extern void *__symverglobal_Unwind_GetLanguageSpecificData
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
|
||||
+ (struct _Unwind_Context *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
|
||||
+extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
|
||||
+ (struct _Unwind_Exception *);
|
||||
+extern void __symverglobal_Unwind_SetGR
|
||||
+ (struct _Unwind_Context *, int, _Unwind_Word);
|
||||
+extern void __symverglobal_Unwind_SetIP
|
||||
+ (struct _Unwind_Context *, _Unwind_Ptr);
|
||||
+#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
|
||||
+#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
|
||||
+#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
|
||||
+#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
|
||||
+#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
|
||||
+#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
|
||||
+#define _Unwind_GetGR __symverglobal_Unwind_GetGR
|
||||
+#define _Unwind_GetIP __symverglobal_Unwind_GetIP
|
||||
+#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
|
||||
+#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
|
||||
+#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
|
||||
+#define _Unwind_Resume __symverglobal_Unwind_Resume
|
||||
+#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
|
||||
+#define _Unwind_SetGR __symverglobal_Unwind_SetGR
|
||||
+#define _Unwind_SetIP __symverglobal_Unwind_SetIP
|
||||
+#endif
|
||||
+
|
||||
enum unw_application_register
|
||||
{
|
||||
UNW_AR_BSP,
|
||||
@@ -2402,4 +2447,44 @@ alias (_Unwind_SetGR);
|
||||
alias (_Unwind_SetIP);
|
||||
#endif
|
||||
|
||||
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
|
||||
+#undef alias
|
||||
+#define symverglobal(name, version) \
|
||||
+__typeof (__symverglobal##name) __symverlocal##name \
|
||||
+ __attribute__ ((alias ("__symverglobal" #name))); \
|
||||
+__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
|
||||
+__asm__ (".symver __symverlocal" #name"," #name "@" #version)
|
||||
+
|
||||
+#undef _Unwind_Backtrace
|
||||
+#undef _Unwind_DeleteException
|
||||
+#undef _Unwind_FindEnclosingFunction
|
||||
+#undef _Unwind_ForcedUnwind
|
||||
+#undef _Unwind_GetBSP
|
||||
+#undef _Unwind_GetCFA
|
||||
+#undef _Unwind_GetGR
|
||||
+#undef _Unwind_GetIP
|
||||
+#undef _Unwind_GetLanguageSpecificData
|
||||
+#undef _Unwind_GetRegionStart
|
||||
+#undef _Unwind_RaiseException
|
||||
+#undef _Unwind_Resume
|
||||
+#undef _Unwind_Resume_or_Rethrow
|
||||
+#undef _Unwind_SetGR
|
||||
+#undef _Unwind_SetIP
|
||||
+symverglobal (_Unwind_Backtrace, GCC_3.3);
|
||||
+symverglobal (_Unwind_DeleteException, GCC_3.0);
|
||||
+symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
|
||||
+symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetBSP, GCC_3.3.2);
|
||||
+symverglobal (_Unwind_GetCFA, GCC_3.3);
|
||||
+symverglobal (_Unwind_GetGR, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetIP, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
|
||||
+symverglobal (_Unwind_GetRegionStart, GCC_3.0);
|
||||
+symverglobal (_Unwind_RaiseException, GCC_3.0);
|
||||
+symverglobal (_Unwind_Resume, GCC_3.0);
|
||||
+symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
|
||||
+symverglobal (_Unwind_SetGR, GCC_3.0);
|
||||
+symverglobal (_Unwind_SetIP, GCC_3.0);
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
--- gcc/config/ia64/mkmap-symver-multi.awk.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/mkmap-symver-multi.awk 2004-11-15 09:46:50.000000000 -0500
|
||||
@@ -0,0 +1,133 @@
|
||||
+# Generate an ELF symbol version map a-la Solaris and GNU ld.
|
||||
+# Contributed by Richard Henderson <rth@cygnus.com>
|
||||
+#
|
||||
+# 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.
|
||||
+
|
||||
+BEGIN {
|
||||
+ state = "nm";
|
||||
+ sawsymbol = 0;
|
||||
+}
|
||||
+
|
||||
+# Remove comment and blank lines.
|
||||
+/^ *#/ || /^ *$/ {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+# We begin with nm input. Collect the set of symbols that are present
|
||||
+# so that we can not emit them into the final version script -- Solaris
|
||||
+# complains at us if we do.
|
||||
+
|
||||
+state == "nm" && /^%%/ {
|
||||
+ state = "ver";
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" && ($1 == "U" || $2 == "U") {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" && NF == 3 {
|
||||
+ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
|
||||
+ def[$3] = 1
|
||||
+ tl=$3
|
||||
+ sub(/^.*@/,"",tl)
|
||||
+ ver[$3] = tl
|
||||
+ } else {
|
||||
+ sub(/@@?GCC_[0-9.]*$/,"",$3)
|
||||
+ def[$3] = 1;
|
||||
+ }
|
||||
+ sawsymbol = 1;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+state == "nm" {
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+# Now we process a simplified variant of the Solaris symbol version
|
||||
+# script. We have one symbol per line, no semicolons, simple markers
|
||||
+# for beginning and ending each section, and %inherit markers for
|
||||
+# describing version inheritence. A symbol may appear in more than
|
||||
+# one symbol version, and the last seen takes effect.
|
||||
+
|
||||
+NF == 3 && $1 == "%inherit" {
|
||||
+ inherit[$2] = $3;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+NF == 2 && $2 == "{" {
|
||||
+ libs[$1] = 1;
|
||||
+ thislib = $1;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+$1 == "}" {
|
||||
+ thislib = "";
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+{
|
||||
+ ver[$1] = thislib;
|
||||
+ next;
|
||||
+}
|
||||
+
|
||||
+END {
|
||||
+ if (!sawsymbol)
|
||||
+ {
|
||||
+ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
|
||||
+ exit 1;
|
||||
+ }
|
||||
+ for (l in libs)
|
||||
+ output(l);
|
||||
+}
|
||||
+
|
||||
+function output(lib) {
|
||||
+ if (done[lib])
|
||||
+ return;
|
||||
+ done[lib] = 1;
|
||||
+ if (inherit[lib])
|
||||
+ output(inherit[lib]);
|
||||
+
|
||||
+ empty=1
|
||||
+ for (sym in ver)
|
||||
+ if ((ver[sym] == lib) && (sym in def))
|
||||
+ {
|
||||
+ if (empty)
|
||||
+ {
|
||||
+ printf("%s {\n", lib);
|
||||
+ printf(" global:\n");
|
||||
+ empty = 0;
|
||||
+ }
|
||||
+ symp = sym;
|
||||
+ sub(/@GCC_[0-9.]*$/,"",symp);
|
||||
+ printf("\t%s;\n", symp);
|
||||
+ if (dotsyms)
|
||||
+ printf("\t.%s;\n", symp);
|
||||
+ }
|
||||
+
|
||||
+ if (empty)
|
||||
+ {
|
||||
+ for (l in libs)
|
||||
+ if (inherit[l] == lib)
|
||||
+ inherit[l] = inherit[lib];
|
||||
+ }
|
||||
+ else if (inherit[lib])
|
||||
+ printf("} %s;\n", inherit[lib]);
|
||||
+ else
|
||||
+ printf ("\n local:\n\t*;\n};\n");
|
||||
+}
|
||||
--- gcc/config/ia64/libgcc-ia64-no-libunwind.ver.jj 2004-02-18 10:27:36.000000000 -0500
|
||||
+++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2004-11-15 09:19:56.000000000 -0500
|
||||
@@ -0,0 +1,17 @@
|
||||
+GCC_3.4.2 {
|
||||
+ _Unwind_GetGR
|
||||
+ _Unwind_RaiseException
|
||||
+ _Unwind_GetRegionStart
|
||||
+ _Unwind_SetIP
|
||||
+ _Unwind_GetIP
|
||||
+ _Unwind_GetLanguageSpecificData
|
||||
+ _Unwind_Resume
|
||||
+ _Unwind_DeleteException
|
||||
+ _Unwind_SetGR
|
||||
+ _Unwind_ForcedUnwind
|
||||
+ _Unwind_Backtrace
|
||||
+ _Unwind_FindEnclosingFunction
|
||||
+ _Unwind_GetCFA
|
||||
+ _Unwind_Resume_or_Rethrow
|
||||
+ _Unwind_GetBSP
|
||||
+}
|
316
gcc41-ice-hack.patch
Normal file
316
gcc41-ice-hack.patch
Normal file
@ -0,0 +1,316 @@
|
||||
2004-01-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* system.h (ICE_EXIT_CODE): Define.
|
||||
* gcc.c (execute): Don't free first string early, but at the end
|
||||
of the function. Call retry_ice if compiler exited with
|
||||
ICE_EXIT_CODE.
|
||||
(retry_ice): New function.
|
||||
* diagnostic.c (diagnostic_count_diagnostic,
|
||||
diagnostic_action_after_output, error_recursion): Exit with
|
||||
ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
|
||||
|
||||
--- gcc/system.h.jj 2004-01-19 17:29:30.000000000 +0100
|
||||
+++ gcc/system.h 2004-01-21 11:53:41.000000000 +0100
|
||||
@@ -153,6 +153,10 @@ extern int errno;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#ifndef ICE_EXIT_CODE
|
||||
+# define ICE_EXIT_CODE 27
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
--- gcc/gcc.c.jj 2004-01-21 11:45:20.000000000 +0100
|
||||
+++ gcc/gcc.c 2004-01-21 11:56:46.000000000 +0100
|
||||
@@ -346,6 +346,9 @@ static void init_gcc_specs (struct obsta
|
||||
#if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
|
||||
static const char *convert_filename (const char *, int, int);
|
||||
#endif
|
||||
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
|
||||
+static void retry_ice (const char *prog, const char **argv);
|
||||
+#endif
|
||||
|
||||
static const char *if_exists_spec_function (int, const char **);
|
||||
static const char *if_exists_else_spec_function (int, const char **);
|
||||
@@ -2841,7 +2844,7 @@ execute (void)
|
||||
}
|
||||
}
|
||||
|
||||
- if (string != commands[i].prog)
|
||||
+ if (i && string != commands[i].prog)
|
||||
free ((void *) string);
|
||||
}
|
||||
|
||||
@@ -2897,6 +2900,16 @@ See %s for instructions.",
|
||||
else if (WIFEXITED (status)
|
||||
&& WEXITSTATUS (status) >= MIN_FATAL_STATUS)
|
||||
{
|
||||
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
|
||||
+ /* For ICEs in cc1, cc1obj, cc1plus see if it is
|
||||
+ reproducible or not. */
|
||||
+ char *p;
|
||||
+ if (WEXITSTATUS (status) == ICE_EXIT_CODE
|
||||
+ && i == 0
|
||||
+ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
|
||||
+ && ! strncmp (p + 1, "cc1", 3))
|
||||
+ retry_ice (commands[0].prog, commands[0].argv);
|
||||
+#endif
|
||||
if (WEXITSTATUS (status) > greatest_status)
|
||||
greatest_status = WEXITSTATUS (status);
|
||||
ret_code = -1;
|
||||
@@ -2917,6 +2930,9 @@ See %s for instructions.",
|
||||
}
|
||||
}
|
||||
|
||||
+ if (commands[0].argv[0] != commands[0].prog)
|
||||
+ free ((PTR) commands[0].argv[0]);
|
||||
+
|
||||
return ret_code;
|
||||
}
|
||||
}
|
||||
@@ -5898,6 +5914,224 @@ give_switch (int switchnum, int omit_fir
|
||||
switches[switchnum].validated = 1;
|
||||
}
|
||||
|
||||
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
|
||||
+#define RETRY_ICE_ATTEMPTS 2
|
||||
+
|
||||
+static void
|
||||
+retry_ice (const char *prog, const char **argv)
|
||||
+{
|
||||
+ int nargs, out_arg = -1, quiet = 0, attempt;
|
||||
+ int pid, retries, sleep_interval;
|
||||
+ const char **new_argv;
|
||||
+ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
|
||||
+
|
||||
+ if (input_filename == NULL || ! strcmp (input_filename, "-"))
|
||||
+ return;
|
||||
+
|
||||
+ for (nargs = 0; argv[nargs] != NULL; ++nargs)
|
||||
+ /* Only retry compiler ICEs, not preprocessor ones. */
|
||||
+ if (! strcmp (argv[nargs], "-E"))
|
||||
+ return;
|
||||
+ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
|
||||
+ {
|
||||
+ if (out_arg == -1)
|
||||
+ out_arg = nargs;
|
||||
+ else
|
||||
+ return;
|
||||
+ }
|
||||
+ /* If the compiler is going to output any time information,
|
||||
+ it might varry between invocations. */
|
||||
+ else if (! strcmp (argv[nargs], "-quiet"))
|
||||
+ quiet = 1;
|
||||
+ else if (! strcmp (argv[nargs], "-ftime-report"))
|
||||
+ return;
|
||||
+
|
||||
+ if (out_arg == -1 || !quiet)
|
||||
+ return;
|
||||
+
|
||||
+ memset (temp_filenames, '\0', sizeof (temp_filenames));
|
||||
+ new_argv = alloca ((nargs + 3) * sizeof (const char *));
|
||||
+ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
|
||||
+ new_argv[nargs++] = "-frandom-seed=0";
|
||||
+ new_argv[nargs] = NULL;
|
||||
+ if (new_argv[out_arg][2] == '\0')
|
||||
+ new_argv[out_arg + 1] = "-";
|
||||
+ else
|
||||
+ new_argv[out_arg] = "-o-";
|
||||
+
|
||||
+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
|
||||
+ {
|
||||
+ int fd = -1;
|
||||
+ int status;
|
||||
+
|
||||
+ temp_filenames[attempt * 2] = make_temp_file (".out");
|
||||
+ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
|
||||
+
|
||||
+ if (attempt == RETRY_ICE_ATTEMPTS)
|
||||
+ {
|
||||
+ int i;
|
||||
+ int fd1, fd2;
|
||||
+ struct stat st1, st2;
|
||||
+ size_t n, len;
|
||||
+ char *buf;
|
||||
+
|
||||
+ buf = xmalloc (8192);
|
||||
+
|
||||
+ for (i = 0; i < 2; ++i)
|
||||
+ {
|
||||
+ fd1 = open (temp_filenames[i], O_RDONLY);
|
||||
+ fd2 = open (temp_filenames[2 + i], O_RDONLY);
|
||||
+
|
||||
+ if (fd1 < 0 || fd2 < 0)
|
||||
+ {
|
||||
+ i = -1;
|
||||
+ close (fd1);
|
||||
+ close (fd2);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
|
||||
+ {
|
||||
+ i = -1;
|
||||
+ close (fd1);
|
||||
+ close (fd2);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (st1.st_size != st2.st_size)
|
||||
+ {
|
||||
+ close (fd1);
|
||||
+ close (fd2);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ len = 0;
|
||||
+ for (n = st1.st_size; n; n -= len)
|
||||
+ {
|
||||
+ len = n;
|
||||
+ if (len > 4096)
|
||||
+ len = 4096;
|
||||
+
|
||||
+ if (read (fd1, buf, len) != (int) len
|
||||
+ || read (fd2, buf + 4096, len) != (int) len)
|
||||
+ {
|
||||
+ i = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (memcmp (buf, buf + 4096, len) != 0)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ close (fd1);
|
||||
+ close (fd2);
|
||||
+
|
||||
+ if (n)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ free (buf);
|
||||
+ if (i == -1)
|
||||
+ break;
|
||||
+
|
||||
+ if (i != 2)
|
||||
+ {
|
||||
+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ fd = open (temp_filenames[attempt * 2], O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ break;
|
||||
+ write (fd, "//", 2);
|
||||
+ for (i = 0; i < nargs; i++)
|
||||
+ {
|
||||
+ write (fd, " ", 1);
|
||||
+ write (fd, new_argv[i], strlen (new_argv[i]));
|
||||
+ }
|
||||
+ write (fd, "\n", 1);
|
||||
+ new_argv[nargs] = "-E";
|
||||
+ new_argv[nargs + 1] = NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Fork a subprocess; wait and retry if it fails. */
|
||||
+ sleep_interval = 1;
|
||||
+ pid = -1;
|
||||
+ for (retries = 0; retries < 4; retries++)
|
||||
+ {
|
||||
+ pid = fork ();
|
||||
+ if (pid >= 0)
|
||||
+ break;
|
||||
+ sleep (sleep_interval);
|
||||
+ sleep_interval *= 2;
|
||||
+ }
|
||||
+
|
||||
+ if (pid < 0)
|
||||
+ break;
|
||||
+ else if (pid == 0)
|
||||
+ {
|
||||
+ if (attempt != RETRY_ICE_ATTEMPTS)
|
||||
+ fd = open (temp_filenames[attempt * 2], O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ exit (-1);
|
||||
+ if (fd != 1)
|
||||
+ {
|
||||
+ close (1);
|
||||
+ dup (fd);
|
||||
+ close (fd);
|
||||
+ }
|
||||
+
|
||||
+ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ exit (-1);
|
||||
+ if (fd != 2)
|
||||
+ {
|
||||
+ close (2);
|
||||
+ dup (fd);
|
||||
+ close (fd);
|
||||
+ }
|
||||
+
|
||||
+ if (prog == new_argv[0])
|
||||
+ execvp (prog, (char *const *) new_argv);
|
||||
+ else
|
||||
+ execv (new_argv[0], (char *const *) new_argv);
|
||||
+ exit (-1);
|
||||
+ }
|
||||
+
|
||||
+ if (waitpid (pid, &status, 0) < 0)
|
||||
+ break;
|
||||
+
|
||||
+ if (attempt < RETRY_ICE_ATTEMPTS
|
||||
+ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
|
||||
+ {
|
||||
+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (attempt == RETRY_ICE_ATTEMPTS)
|
||||
+ {
|
||||
+ close (fd);
|
||||
+ if (WIFEXITED (status)
|
||||
+ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
|
||||
+ {
|
||||
+ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
|
||||
+ temp_filenames[attempt * 2]);
|
||||
+ /* Make sure it is not deleted. */
|
||||
+ free (temp_filenames[attempt * 2]);
|
||||
+ temp_filenames[attempt * 2] = NULL;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
|
||||
+ if (temp_filenames[attempt])
|
||||
+ {
|
||||
+ unlink (temp_filenames[attempt]);
|
||||
+ free (temp_filenames[attempt]);
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* Search for a file named NAME trying various prefixes including the
|
||||
user's -B prefix and some standard ones.
|
||||
Return the absolute file name found. If nothing is found, return NAME. */
|
||||
--- gcc/diagnostic.c.jj 2003-10-01 12:09:21.000000000 +0200
|
||||
+++ gcc/diagnostic.c 2004-01-21 11:54:47.000000000 +0100
|
||||
@@ -237,14 +237,14 @@ diagnostic_action_after_output (diagnost
|
||||
fnotice (stderr, "Please submit a full bug report,\n"
|
||||
"with preprocessed source if appropriate.\n"
|
||||
"See %s for instructions.\n", bug_report_url);
|
||||
- exit (FATAL_EXIT_CODE);
|
||||
+ exit (ICE_EXIT_CODE);
|
||||
|
||||
case DK_FATAL:
|
||||
if (context->abort_on_error)
|
||||
real_abort ();
|
||||
|
||||
fnotice (stderr, "compilation terminated.\n");
|
||||
- exit (FATAL_EXIT_CODE);
|
||||
+ exit (ICE_EXIT_CODE);
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
25
gcc41-java-nomulti.patch
Normal file
25
gcc41-java-nomulti.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- libjava/configure.ac.jj 2004-08-16 21:13:29.000000000 +0200
|
||||
+++ libjava/configure.ac 2004-08-21 11:44:59.020755542 +0200
|
||||
@@ -367,6 +367,10 @@ use_gtk_awt=""
|
||||
TOOLKIT=
|
||||
AC_SUBST(TOOLKIT)
|
||||
|
||||
+if test -n "${with_multisubdir}"; then
|
||||
+ peerlibs=no
|
||||
+fi
|
||||
+
|
||||
for peer in $peerlibs ; do
|
||||
case $peer in
|
||||
xlib)
|
||||
--- libjava/configure.jj 2004-08-16 21:22:14.000000000 +0200
|
||||
+++ libjava/configure 2004-08-21 11:45:16.260738060 +0200
|
||||
@@ -4118,6 +4118,9 @@ use_gtk_awt=""
|
||||
# The default toolkit to use is the first one specified.
|
||||
TOOLKIT=
|
||||
|
||||
+if test -n "${with_multisubdir}"; then
|
||||
+ peerlibs=no
|
||||
+fi
|
||||
|
||||
for peer in $peerlibs ; do
|
||||
case $peer in
|
15
gcc41-java-slow_pthread_self.patch
Normal file
15
gcc41-java-slow_pthread_self.patch
Normal file
@ -0,0 +1,15 @@
|
||||
2005-05-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* configure.host (slow_pthread_self): Set to empty unconditionally
|
||||
on Linux targets.
|
||||
|
||||
--- libjava/configure.host (.../gcc-4_0-branch) (revision 107266)
|
||||
+++ libjava/configure.host (.../redhat/gcc-4_0-branch) (revision 107414)
|
||||
@@ -174,6 +174,7 @@
|
||||
sh-linux* | sh[34]*-linux*)
|
||||
can_unwind_signal=yes
|
||||
libgcj_ld_symbolic='-Wl,-Bsymbolic'
|
||||
+ slow_pthread_self=
|
||||
if test x$slow_pthread_self = xyes \
|
||||
&& test x$cross_compiling != xyes; then
|
||||
cat > conftest.c <<EOF
|
104
gcc41-multi32-hack.patch
Normal file
104
gcc41-multi32-hack.patch
Normal file
@ -0,0 +1,104 @@
|
||||
--- libcpp/configure.ac.jj 2005-10-28 23:13:40.000000000 +0200
|
||||
+++ libcpp/configure.ac 2005-11-25 14:34:31.000000000 +0100
|
||||
@@ -112,6 +112,8 @@ fi
|
||||
|
||||
m4_changequote(,)
|
||||
case $target in
|
||||
+ powerpc-*-linux*)
|
||||
+ need_64bit_hwint=no ;;
|
||||
alpha*-*-* | \
|
||||
arm*-*-*eabi* | \
|
||||
arm*-*-symbianelf* | \
|
||||
--- libcpp/configure.jj 2005-10-28 23:13:40.000000000 +0200
|
||||
+++ libcpp/configure 2005-11-25 14:34:40.000000000 +0100
|
||||
@@ -8217,6 +8217,8 @@ fi
|
||||
|
||||
|
||||
case $target in
|
||||
+ powerpc-*-linux*)
|
||||
+ need_64bit_hwint=no ;;
|
||||
alpha*-*-* | \
|
||||
arm*-*-*eabi* | \
|
||||
arm*-*-symbianelf* | \
|
||||
--- gcc/config.gcc.jj 2005-11-19 09:27:16.000000000 +0100
|
||||
+++ gcc/config.gcc 2005-11-25 14:29:30.000000000 +0100
|
||||
@@ -294,7 +294,10 @@ mips*-*-*)
|
||||
powerpc*-*-*)
|
||||
cpu_type=rs6000
|
||||
extra_headers="ppc-asm.h altivec.h spe.h"
|
||||
- need_64bit_hwint=yes
|
||||
+ case ${target} in
|
||||
+ powerpc-*-linux*) ;;
|
||||
+ *) need_64bit_hwint=yes ;;
|
||||
+ esac
|
||||
case x$with_cpu in
|
||||
xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345]|xrs64a)
|
||||
cpu_is_64bit=yes
|
||||
--- gcc/gcc.c.jj 2005-11-19 21:16:39.000000000 +0100
|
||||
+++ gcc/gcc.c 2005-11-28 13:00:58.000000000 +0100
|
||||
@@ -3154,6 +3154,8 @@ process_command (int argc, const char **
|
||||
const char *spec_lang = 0;
|
||||
int last_language_n_infiles;
|
||||
int lang_n_infiles = 0;
|
||||
+ int hack32 = 1;
|
||||
+ int used_B = 0;
|
||||
#ifdef MODIFY_TARGET_NAME
|
||||
int is_modify_target_name;
|
||||
int j;
|
||||
@@ -3680,6 +3682,7 @@ warranty; not even for MERCHANTABILITY o
|
||||
PREFIX_PRIORITY_B_OPT, 0, 0);
|
||||
add_prefix (&include_prefixes, value, NULL,
|
||||
PREFIX_PRIORITY_B_OPT, 0, 0);
|
||||
+ used_B = 1;
|
||||
n_switches++;
|
||||
}
|
||||
break;
|
||||
@@ -3742,6 +3745,21 @@ warranty; not even for MERCHANTABILITY o
|
||||
#endif
|
||||
goto normal_switch;
|
||||
|
||||
+ /* HACK START */
|
||||
+ case 'm':
|
||||
+ if ((p[1] == '6' && p[2] == '4')
|
||||
+ || (p[1] == 'a' && strncmp (p + 2, "ltivec", 6) == 0)
|
||||
+ || (p[1] == 'c' && strncmp (p + 2, "pu=", 3) == 0
|
||||
+ && (strncmp (p + 5, "7400", 4) == 0
|
||||
+ || strncmp (p + 5, "7450", 4) == 0
|
||||
+ || strncmp (p + 5, "G4", 2) == 0
|
||||
+ || strncmp (p + 5, "970", 3) == 0
|
||||
+ || strncmp (p + 5, "G5", 2) == 0))
|
||||
+ || (p[1] == 'p' && strncmp (p + 2, "owerpc64", 8) == 0))
|
||||
+ hack32 = 0;
|
||||
+ /* FALLTHROUGH */
|
||||
+ /* HACK END */
|
||||
+
|
||||
default:
|
||||
normal_switch:
|
||||
|
||||
@@ -3812,6 +3830,26 @@ warranty; not even for MERCHANTABILITY o
|
||||
/* Use 2 as fourth arg meaning try just the machine as a suffix,
|
||||
as well as trying the machine and the version. */
|
||||
#ifndef OS2
|
||||
+ /* HACK START */
|
||||
+ if (hack32 && !used_B && !strncmp (spec_machine, "sparc64-", 8))
|
||||
+ {
|
||||
+ const char *sparc32_exec_prefix =
|
||||
+ concat (standard_libexec_prefix, "sparc-", spec_machine + 8,
|
||||
+ dir_separator_str, spec_version, dir_separator_str, NULL);
|
||||
+ add_prefix (&exec_prefixes, sparc32_exec_prefix, "GCC",
|
||||
+ PREFIX_PRIORITY_LAST, 0, 0);
|
||||
+ }
|
||||
+ /* HACK END */
|
||||
+ /* HACK START */
|
||||
+ if (hack32 && !used_B && !strncmp (spec_machine, "ppc64-", 6))
|
||||
+ {
|
||||
+ const char *ppc32_exec_prefix =
|
||||
+ concat (standard_libexec_prefix, "ppc-", spec_machine + 6,
|
||||
+ dir_separator_str, spec_version, dir_separator_str, NULL);
|
||||
+ add_prefix (&exec_prefixes, ppc32_exec_prefix, "GCC",
|
||||
+ PREFIX_PRIORITY_LAST, 0, 0);
|
||||
+ }
|
||||
+ /* HACK END */
|
||||
add_prefix (&exec_prefixes, standard_libexec_prefix, "GCC",
|
||||
PREFIX_PRIORITY_LAST, 1, 0);
|
||||
add_prefix (&exec_prefixes, standard_libexec_prefix, "BINUTILS",
|
86
gcc41-ppc32-retaddr.patch
Normal file
86
gcc41-ppc32-retaddr.patch
Normal file
@ -0,0 +1,86 @@
|
||||
2005-11-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
|
||||
read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
|
||||
instead of doing an extran indirection from frame_pointer_rtx.
|
||||
|
||||
* gcc.dg/20051128-1.c: New test.
|
||||
|
||||
--- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100
|
||||
+++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100
|
||||
@@ -13166,17 +13166,22 @@ rs6000_return_addr (int count, rtx frame
|
||||
don't try to be too clever here. */
|
||||
if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
|
||||
{
|
||||
+ rtx x;
|
||||
cfun->machine->ra_needs_full_frame = 1;
|
||||
|
||||
- return
|
||||
- gen_rtx_MEM
|
||||
- (Pmode,
|
||||
- memory_address
|
||||
- (Pmode,
|
||||
- plus_constant (copy_to_reg
|
||||
- (gen_rtx_MEM (Pmode,
|
||||
- memory_address (Pmode, frame))),
|
||||
- RETURN_ADDRESS_OFFSET)));
|
||||
+ if (count == 0)
|
||||
+ {
|
||||
+ gcc_assert (frame == frame_pointer_rtx);
|
||||
+ x = arg_pointer_rtx;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ x = memory_address (Pmode, frame);
|
||||
+ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
|
||||
+ }
|
||||
+
|
||||
+ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
|
||||
+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
|
||||
}
|
||||
|
||||
cfun->machine->ra_need_lr = 1;
|
||||
--- gcc/testsuite/gcc.dg/20051128-1.c.jj 2005-10-10 11:21:41.096999000 +0200
|
||||
+++ gcc/testsuite/gcc.dg/20051128-1.c 2005-11-28 12:30:57.000000000 +0100
|
||||
@@ -0,0 +1,41 @@
|
||||
+/* { dg-do run } */
|
||||
+/* { dg-options "-O2 -fpic" } */
|
||||
+
|
||||
+extern void exit (int);
|
||||
+extern void abort (void);
|
||||
+
|
||||
+int b;
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ void *pad[147];
|
||||
+ void *ra, *h;
|
||||
+ long o;
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+__attribute__((noinline))
|
||||
+foo (struct A *a, void *x)
|
||||
+{
|
||||
+ __builtin_memset (a, 0, sizeof (a));
|
||||
+ if (!b)
|
||||
+ exit (0);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+__attribute__((noinline))
|
||||
+bar (void)
|
||||
+{
|
||||
+ struct A a;
|
||||
+
|
||||
+ __builtin_unwind_init ();
|
||||
+ foo (&a, __builtin_return_address (0));
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ bar ();
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
22
gcc41-ppc64-m32-m64-multilib-only.patch
Normal file
22
gcc41-ppc64-m32-m64-multilib-only.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- gcc/config/rs6000/t-linux64 2003-06-03 05:11:45.000000000 -0400
|
||||
+++ gcc/config/rs6000/t-linux64 2003-06-11 17:07:16.000000000 -0400
|
||||
@@ -4,13 +4,13 @@ LIB2FUNCS_EXTRA = tramp.S $(srcdir)/conf
|
||||
# Modify the shared lib version file
|
||||
SHLIB_MKMAP_OPTS = -v dotsyms=1
|
||||
|
||||
-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_OSDIRNAMES = ../lib64 ../lib nof
|
||||
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
|
||||
+MULTILIB_EXCEPTIONS =
|
||||
+MULTILIB_EXCLUSIONS =
|
||||
+MULTILIB_OSDIRNAMES = ../lib64 ../lib
|
||||
+MULTILIB_MATCHES =
|
||||
|
||||
TARGET_LIBGCC2_CFLAGS = -mno-minimal-toc -fPIC
|
||||
|
1551
gcc41.spec
Normal file
1551
gcc41.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user