diff -uNr gcc-4.5.1/gcc/config/i386/i386.c gcc-4.5.1.patched/gcc/config/i386/i386.c --- gcc-4.5.1/gcc/config/i386/i386.c 2010-07-22 02:42:02.000000000 -0400 +++ gcc-4.5.1.patched/gcc/config/i386/i386.c 2010-08-10 19:16:23.000000000 -0400 @@ -4991,7 +4991,8 @@ case, we return the original mode and warn ABI change if CUM isn't NULL. */ -static enum machine_mode +enum machine_mode type_natural_mode (const_tree, CUMULATIVE_ARGS *); +enum machine_mode type_natural_mode (const_tree type, CUMULATIVE_ARGS *cum) { enum machine_mode mode = TYPE_MODE (type); @@ -5122,7 +5123,9 @@ See the x86-64 PS ABI for details. */ -static int +int classify_argument (enum machine_mode, const_tree, + enum x86_64_reg_class [MAX_CLASSES], int); +int classify_argument (enum machine_mode mode, const_tree type, enum x86_64_reg_class classes[MAX_CLASSES], int bit_offset) { @@ -5503,7 +5506,8 @@ /* Examine the argument and return set number of register required in each class. Return 0 iff parameter should be passed in memory. */ -static int +int examine_argument (enum machine_mode, const_tree, int, int *, int *); +int examine_argument (enum machine_mode mode, const_tree type, int in_return, int *int_nregs, int *sse_nregs) { @@ -6184,7 +6188,8 @@ /* Return true when TYPE should be 128bit aligned for 32bit argument passing ABI. */ -static bool +bool contains_aligned_value_p (const_tree); +bool contains_aligned_value_p (const_tree type) { enum machine_mode mode = TYPE_MODE (type); diff -uNr gcc-4.5.1/libjava/configure gcc-4.5.1.patched/libjava/configure --- gcc-4.5.1/libjava/configure 2010-07-31 05:34:58.000000000 -0400 +++ gcc-4.5.1.patched/libjava/configure 2010-08-10 19:16:23.000000000 -0400 @@ -1610,6 +1610,8 @@ default=yes --enable-java-maintainer-mode allow rebuilding of .class and .h files + --enable-libjava-multilib + build libjava as multilib --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-maintainer-mode enable make rules and dependencies not useful @@ -3347,6 +3349,16 @@ fi +# Check whether --enable-libjava-multilib was given. +if test "${enable_libjava_multilib+set}" = set; then + enableval=$enable_libjava_multilib; +fi + +if test "$enable_libjava_multilib" = no; then + multilib=no + ac_configure_args="$ac_configure_args --disable-multilib" +fi + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. diff -uNr gcc-4.5.1/libjava/configure.ac gcc-4.5.1.patched/libjava/configure.ac --- gcc-4.5.1/libjava/configure.ac 2010-07-15 08:05:56.000000000 -0400 +++ gcc-4.5.1.patched/libjava/configure.ac 2010-08-10 19:16:23.000000000 -0400 @@ -139,6 +139,13 @@ [allow rebuilding of .class and .h files])) AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes) +AC_ARG_ENABLE(libjava-multilib, + AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib])) +if test "$enable_libjava_multilib" = no; then + multilib=no + ac_configure_args="$ac_configure_args --disable-multilib" +fi + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. GCC_NO_EXECUTABLES --- gcc-4.5.4.orig/libjava/libgcj.spec.in 2011-06-18 11:13:32.000000000 -0400 +++ gcc-4.5.4/libjava/libgcj.spec.in 2011-06-18 11:13:55.000000000 -0400 @@ -7,6 +7,6 @@ *startfile: @THREADSTARTFILESPEC@ %(startfileorig) %rename lib liborig -*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig) +*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig) *jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ @LIBGCJ_BC_SPEC@ -fkeep-inline-functions --- gcc-4.5.4.orig/libjava/Makefile.am 2011-06-18 11:15:55.000000000 -0400 +++ gcc-4.5.4/libjava/Makefile.am 2011-06-18 11:16:27.000000000 -0400 @@ -451,7 +451,7 @@ libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \ $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ - $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) + $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBICONV) libgcj_la_LIBADD = \ classpath/native/fdlibm/libfdlibm.la \ java/lang/Object.lo \ --- gcc-4.5.4.orig/libjava/Makefile.in 2011-06-18 11:16:03.000000000 -0400 +++ gcc-4.5.4/libjava/Makefile.in 2011-06-18 11:16:49.000000000 -0400 @@ -1150,7 +1150,7 @@ libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \ $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ - $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) + $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBICONV) libgcj_la_LIBADD = \ classpath/native/fdlibm/libfdlibm.la \ --- gcc-4.5.4/gcc/testsuite/lib/prune.exp.orig 2011-02-15 19:06:56.000000000 -0500 +++ gcc-4.5.4/gcc/testsuite/lib/prune.exp 2011-06-30 10:44:26.000000000 -0400 @@ -54,6 +54,9 @@ # Ignore harmless warnings from Xcode 3.2.x. regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text + # Ignore harmless warnings from Xcode 4.0. + regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text + #send_user "After:$text\n" return $text --- gcc-4.5.4/libstdc++-v3/testsuite/lib/prune.exp.orig 2011-02-15 19:06:56.000000000 -0500 +++ gcc-4.5.4/libstdc++-v3/testsuite/lib/prune.exp 2011-06-30 10:46:54.000000000 -0400 @@ -30,5 +30,9 @@ regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text + # Ignore harmless warnings from Xcode 4.0. + regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text + + return $text } --- gcc-4.5.4/gcc/tree-vect-stmts.c.orig 2011-05-24 21:29:28.000000000 -0400 +++ gcc-4.5.4/gcc/tree-vect-stmts.c 2011-06-27 11:49:34.000000000 -0400 @@ -4660,6 +4660,15 @@ && GET_MODE_BITSIZE (inner_mode) != TYPE_PRECISION (scalar_type)) return NULL_TREE; + /* We shouldn't end up building VECTOR_TYPEs of non-scalar components. + When the component mode passes the above test simply use a type + corresponding to that mode. The theory is that any use that + would cause problems with this will disable vectorization anyway. */ + if (!SCALAR_FLOAT_TYPE_P (scalar_type) + && !INTEGRAL_TYPE_P (scalar_type) + && !POINTER_TYPE_P (scalar_type)) + scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1); + /* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD) is expected. */ nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes; diff -uNr gcc-4.5.4/gcc/doc/cppopts.texi gcc-4.5.4.texinfo5/gcc/doc/cppopts.texi --- gcc-4.5.4/gcc/doc/cppopts.texi 2010-04-02 15:54:46.000000000 -0400 +++ gcc-4.5.4.texinfo5/gcc/doc/cppopts.texi 2013-05-06 10:16:26.000000000 -0400 @@ -760,7 +760,7 @@ Enable special code to work around file systems which only permit very short file names, such as MS-DOS@. -@itemx --help +@item --help @itemx --target-help @opindex help @opindex target-help diff -uNr gcc-4.5.4/gcc/doc/generic.texi gcc-4.5.4.texinfo5/gcc/doc/generic.texi --- gcc-4.5.4/gcc/doc/generic.texi 2010-07-06 16:23:53.000000000 -0400 +++ gcc-4.5.4.texinfo5/gcc/doc/generic.texi 2013-05-06 10:16:26.000000000 -0400 @@ -1407,13 +1407,13 @@ not matter. The type of the operands and that of the result are always of @code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}. -@itemx POINTER_PLUS_EXPR +@item POINTER_PLUS_EXPR This node represents pointer arithmetic. The first operand is always a pointer/reference type. The second operand is always an unsigned integer type compatible with sizetype. This is the only binary arithmetic operand that can operate on pointer types. -@itemx PLUS_EXPR +@item PLUS_EXPR @itemx MINUS_EXPR @itemx MULT_EXPR These nodes represent various binary arithmetic operations. diff -uNr gcc-4.5.4/gcc/doc/invoke.texi gcc-4.5.4.texinfo5/gcc/doc/invoke.texi --- gcc-4.5.4/gcc/doc/invoke.texi 2011-03-23 18:03:29.000000000 -0400 +++ gcc-4.5.4.texinfo5/gcc/doc/invoke.texi 2013-05-06 10:45:03.000000000 -0400 @@ -4875,11 +4875,11 @@ @option{-fdump-rtl-ce3} enable dumping after the three if conversion passes. -@itemx -fdump-rtl-cprop_hardreg +@item -fdump-rtl-cprop_hardreg @opindex fdump-rtl-cprop_hardreg Dump after hard register copy propagation. -@itemx -fdump-rtl-csa +@item -fdump-rtl-csa @opindex fdump-rtl-csa Dump after combining stack adjustments. @@ -4890,11 +4890,11 @@ @option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after the two common sub-expression elimination passes. -@itemx -fdump-rtl-dce +@item -fdump-rtl-dce @opindex fdump-rtl-dce Dump after the standalone dead code elimination passes. -@itemx -fdump-rtl-dbr +@item -fdump-rtl-dbr @opindex fdump-rtl-dbr Dump after delayed branch scheduling. @@ -4939,7 +4939,7 @@ @opindex fdump-rtl-initvals Dump after the computation of the initial value sets. -@itemx -fdump-rtl-into_cfglayout +@item -fdump-rtl-into_cfglayout @opindex fdump-rtl-into_cfglayout Dump after converting to cfglayout mode. @@ -4969,7 +4969,7 @@ @opindex fdump-rtl-rnreg Dump after register renumbering. -@itemx -fdump-rtl-outof_cfglayout +@item -fdump-rtl-outof_cfglayout @opindex fdump-rtl-outof_cfglayout Dump after converting from cfglayout mode. @@ -4981,7 +4981,7 @@ @opindex fdump-rtl-postreload Dump after post-reload optimizations. -@itemx -fdump-rtl-pro_and_epilogue +@item -fdump-rtl-pro_and_epilogue @opindex fdump-rtl-pro_and_epilogue Dump after generating the function pro and epilogues.