diff -ru gcc-3.4.6/gcc/collect2.c gcc-3.4.6/gcc/collect2.c --- gcc-3.4.6/gcc/collect2.c 2005-01-10 16:25:23.000000000 +0100 +++ gcc-3.4.6/gcc/collect2.c 2015-07-18 22:55:31.278666473 +0200 @@ -1534,7 +1534,7 @@ if (redir) { /* Open response file. */ - redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT); + redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, S_IRWXU & ~S_IXUSR); /* Duplicate the stdout and stderr file handles so they can be restored later. */ diff -ru gcc-3.4.6/gcc/config/i386/t-sol2 gcc-3.4.6/gcc/config/i386/t-sol2 --- gcc-3.4.6/gcc/config/i386/t-sol2 2001-05-17 05:15:56.000000000 +0200 +++ gcc-3.4.6/gcc/config/i386/t-sol2 2015-07-18 23:13:58.198670653 +0200 @@ -9,7 +9,7 @@ # the comments with sed. This bug may only be in the Early Access releases. gcrt1.o: $(srcdir)/config/i386/sol2-gc1.asm sed -e '/^!/d' <$(srcdir)/config/i386/sol2-gc1.asm >gcrt1.s - $(AS) -o gcrt1.o gcrt1.s + $(AS_FOR_TARGET) -o gcrt1.o gcrt1.s crt1.o: $(srcdir)/config/i386/sol2-c1.asm $(GCC_PASSES) sed -e '/^!/d' <$(srcdir)/config/i386/sol2-c1.asm >crt1.s $(GCC_FOR_TARGET) -c -o crt1.o crt1.s diff -ru gcc-3.4.6/gcc/config/t-slibgcc-elf-ver gcc-3.4.6/gcc/config/t-slibgcc-elf-ver --- gcc-3.4.6/gcc/config/t-slibgcc-elf-ver 2004-12-16 20:16:21.000000000 +0100 +++ gcc-3.4.6/gcc/config/t-slibgcc-elf-ver 2015-07-19 02:26:36.158714294 +0200 @@ -14,6 +14,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ -Wl,--soname=$(SHLIB_SONAME) \ -Wl,--version-script=$(SHLIB_MAP) \ + -Wl,--no-check-sections \ -o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \ rm -f $(SHLIB_SOLINK) && \ if [ -f $(SHLIB_NAME) ]; then \ diff -ru gcc-3.4.6/libiberty/configure gcc-3.4.6/libiberty/configure --- gcc-3.4.6/libiberty/configure 2003-10-01 19:11:29.000000000 +0200 +++ gcc-3.4.6/libiberty/configure 2015-07-19 03:46:01.988732289 +0200 @@ -3244,7 +3244,7 @@ int main() { _ascii (); _ebcdic (); return 0; } EOF if test -f conftest.c ; then - if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then + if ${CC-cc} ${CFLAGS} -Wl,--no-check-sections conftest.c -o conftest.o && test -f conftest.o ; then if test `grep -l BIGenDianSyS conftest.o` ; then echo $ac_n ' big endian probe OK, ' 1>&6 ac_cv_c_bigendian=yes diff -ru gcc-3.4.6/gcc/config/sol2.h gcc-3.4.6/gcc/config/sol2.h --- gcc-3.4.6/gcc/config/sol2.h 2004-07-17 23:18:58.000000000 +0200 +++ gcc-3.4.6/gcc/config/sol2.h 2015-07-20 01:42:14.329030475 +0200 @@ -113,8 +113,8 @@ crtbegin.o%s" #undef STARTFILE_ARCH32_SPEC -#define STARTFILE_ARCH32_SPEC "%{ansi:values-Xc.o%s} \ - %{!ansi:values-Xa.o%s}" +#define STARTFILE_ARCH32_SPEC "%{ansi:/usr/ccs/lib/values-Xc.o%s} \ + %{!ansi:/usr/ccs/lib/values-Xa.o%s}" #undef STARTFILE_ARCH_SPEC #define STARTFILE_ARCH_SPEC STARTFILE_ARCH32_SPEC diff -ru gcc-3.4.6/gcc/config/svr4.h gcc-3.4.6/gcc/config/svr4.h --- gcc-3.4.6/gcc/config/svr4.h 2003-10-23 07:16:56.000000000 +0200 +++ gcc-3.4.6/gcc/config/svr4.h 2015-07-20 01:48:20.229031857 +0200 @@ -173,8 +173,8 @@ %{!symbolic: \ %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ %{pg:gcrti.o%s}%{!pg:crti.o%s} \ - %{ansi:values-Xc.o%s} \ - %{!ansi:values-Xa.o%s} \ + %{ansi:/usr/ccs/lib/values-Xc.o%s} \ + %{!ansi:/usr/ccs/lib/values-Xa.o%s} \ crtbegin.o%s" /* The numbers used to denote specific machine registers in the System V diff -ru gcc-3.4.6/gcc/configure gcc-3.4.6/gcc/configure --- gcc-3.4.6/gcc/configure 2005-06-01 18:32:31.000000000 +0200 +++ gcc-3.4.6/gcc/configure 2015-07-20 21:16:09.310034600 +0200 @@ -10577,7 +10577,7 @@ # arbitrary sections are supported and try the test. as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` if echo "$as_ver" | grep GNU > /dev/null; then - as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` + as_ver=`echo $as_ver | sed -e 's/GNU assembler [^0-9]*\([0-9.][0-9.]*\).*/\1/'` as_major=`echo $as_ver | sed 's/\..*//'` as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` if test $as_major -eq 2 && test $as_minor -lt 11 diff -ru gcc-3.4.6/gcc/configure.ac gcc-3.4.6/gcc/configure.ac --- gcc-3.4.6/gcc/configure.ac 2005-06-01 18:32:31.000000000 +0200 +++ gcc-3.4.6/gcc/configure.ac 2015-07-20 21:16:53.460034912 +0200 @@ -1951,7 +1951,7 @@ as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` if echo "$as_ver" | grep GNU > /dev/null; then changequote(,)dnl - as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` + as_ver=`echo $as_ver | sed -e 's/GNU assembler [^0-9]*\([0-9.][0-9.]*\).*/\1/'` as_major=`echo $as_ver | sed 's/\..*//'` as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` changequote([,])dnl