rpms/gcc/devel gcc4-fortran-equiv.patch, NONE, 1.1 gcc4-ppc32-msecure-plt.patch, NONE, 1.1 gcc4-pr21149-test.patch, NONE, 1.1 gcc4-pr22503.patch, NONE, 1.1 gcc4-libstdc++-pr22309.patch, 1.2, 1.3 gcc4-pr20606.patch, 1.1, 1.2 gcc4-vsb-stack.patch, 1.1, 1.2 gcc4.spec, 1.59, 1.60 gcc4-fortran-bzbn.patch, 1.1, NONE gcc4-fortran-data-range.patch, 1.1, NONE gcc4-fortran-inf.patch, 1.1, NONE gcc4-pr21828.patch, 1.1, NONE gcc4-rh163058.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Jul 27 09:23:48 UTC 2005


Author: jakub

Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv7360

Modified Files:
	gcc4-libstdc++-pr22309.patch gcc4-pr20606.patch 
	gcc4-vsb-stack.patch gcc4.spec 
Added Files:
	gcc4-fortran-equiv.patch gcc4-ppc32-msecure-plt.patch 
	gcc4-pr21149-test.patch gcc4-pr22503.patch 
Removed Files:
	gcc4-fortran-bzbn.patch gcc4-fortran-data-range.patch 
	gcc4-fortran-inf.patch gcc4-pr21828.patch gcc4-rh163058.patch 
Log Message:
4.0.1-5


gcc4-fortran-equiv.patch:
 fortran/primary.c                                      |   30 +++--
 fortran/resolve.c                                      |   96 +++++++++++++++--
 testsuite/gfortran.dg/equiv_1.f90                      |    9 +
 testsuite/gfortran.dg/equiv_2.f90                      |   17 +++
 testsuite/gfortran.fortran-torture/execute/equiv_2.f90 |   46 ++++++++
 testsuite/gfortran.fortran-torture/execute/equiv_3.f90 |   13 ++
 testsuite/gfortran.fortran-torture/execute/equiv_4.f90 |   54 +++++++++
 7 files changed, 246 insertions(+), 19 deletions(-)

--- NEW FILE gcc4-fortran-equiv.patch ---
2005-07-25  Jakub Jelinek  <jakub at redhat.com>

	PR fortran/18833
	PR fortran/20850
	* primary.c (match_varspec): If equiv_flag, don't look at sym's
	attributes, call gfc_Match_array_ref up to twice and don't do any
	substring or component processing.
	* resolve.c (resolve_equivalence): Transform REF_ARRAY into
	REF_SUBSTRING or nothing if needed.  Check that substrings
	don't have zero length.
	* gfortran.dg/equiv_1.f90: New test.
	* gfortran.dg/equiv_2.f90: New test.
	* gfortran.fortran-torture/execute/equiv_2.f90: New test.
	* gfortran.fortran-torture/execute/equiv_3.f90: New test.
	* gfortran.fortran-torture/execute/equiv_4.f90: New test.

--- gcc/fortran/primary.c.jj	2005-07-14 12:10:34.000000000 +0200
+++ gcc/fortran/primary.c	2005-07-25 21:38:48.000000000 +0200
@@ -1517,28 +1517,42 @@ match_varspec (gfc_expr * primary, int e
   char name[GFC_MAX_SYMBOL_LEN + 1];
   gfc_ref *substring, *tail;
   gfc_component *component;
-  gfc_symbol *sym;
+  gfc_symbol *sym = primary->symtree->n.sym;
   match m;
 
   tail = NULL;
 
-  if (primary->symtree->n.sym->attr.dimension
-      || (equiv_flag
-	  && gfc_peek_char () == '('))
+  if ((equiv_flag && gfc_peek_char () == '(')
+      || sym->attr.dimension)
     {
-
+      /* In EQUIVALENCE, we don't know yet whether we are seeing
+	 an array, character variable or array of character
+	 variables.  We'll leave the decision till resolve
+	 time.  */
       tail = extend_ref (primary, tail);
       tail->type = REF_ARRAY;
 
-      m = gfc_match_array_ref (&tail->u.ar, primary->symtree->n.sym->as,
-                               equiv_flag);
+      m = gfc_match_array_ref (&tail->u.ar, equiv_flag ? NULL : sym->as,
+			       equiv_flag);
       if (m != MATCH_YES)
 	return m;
+
+      if (equiv_flag && gfc_peek_char () == '(')
+	{
+	  tail = extend_ref (primary, tail);
+	  tail->type = REF_ARRAY;
+
+	  m = gfc_match_array_ref (&tail->u.ar, NULL, equiv_flag);
+	  if (m != MATCH_YES)
+	    return m;
+	}
     }
 
-  sym = primary->symtree->n.sym;
   primary->ts = sym->ts;
 
+  if (equiv_flag)
+    return MATCH_YES;
+
   if (sym->ts.type != BT_DERIVED || gfc_match_char ('%') != MATCH_YES)
     goto check_substring;
 
--- gcc/fortran/resolve.c.jj	2005-07-02 02:28:32.000000000 +0200
+++ gcc/fortran/resolve.c	2005-07-25 21:38:48.000000000 +0200
@@ -4727,7 +4727,7 @@ resolve_equivalence_derived (gfc_symbol 
    sequence derived type containing a pointer at any level of component
    selection, an automatic object, a function name, an entry name, a result
    name, a named constant, a structure component, or a subobject of any of
-   the preceding objects.  */
+   the preceding objects.  A substring shall not have length zero.  */
 
 static void
 resolve_equivalence (gfc_equiv *eq)
@@ -4740,6 +4740,69 @@ resolve_equivalence (gfc_equiv *eq)
   for (; eq; eq = eq->eq)
     {
       e = eq->expr;
+
+      e->ts = e->symtree->n.sym->ts;
+      /* match_varspec might not know yet if it is seeing
+	 array reference or substring reference, as it doesn't
+	 know the types.  */
+      if (e->ref && e->ref->type == REF_ARRAY)
+	{
+	  gfc_ref *ref = e->ref;
+	  sym = e->symtree->n.sym;
+
+	  if (sym->attr.dimension)
+	    {
+	      ref->u.ar.as = sym->as;
+	      ref = ref->next;
+	    }
+
+	  /* For substrings, convert REF_ARRAY into REF_SUBSTRING.  */
+	  if (e->ts.type == BT_CHARACTER
+	      && ref
+	      && ref->type == REF_ARRAY
+	      && ref->u.ar.dimen == 1
+	      && ref->u.ar.dimen_type[0] == DIMEN_RANGE
+	      && ref->u.ar.stride[0] == NULL)
+	    {
+	      gfc_expr *start = ref->u.ar.start[0];
+	      gfc_expr *end = ref->u.ar.end[0];
+	      void *mem = NULL;
+
+	      /* Optimize away the (:) reference.  */
+	      if (start == NULL && end == NULL)
+		{
+		  if (e->ref == ref)
+		    e->ref = ref->next;
+		  else
+		    e->ref->next = ref->next;
+		  mem = ref;
+		}
+	      else
+		{
+		  ref->type = REF_SUBSTRING;
+		  if (start == NULL)
+		    start = gfc_int_expr (1);
+		  ref->u.ss.start = start;
+		  if (end == NULL && e->ts.cl)
+		    end = gfc_copy_expr (e->ts.cl->length);
+		  ref->u.ss.end = end;
+		  ref->u.ss.length = e->ts.cl;
+		  e->ts.cl = NULL;
+		}
+	      ref = ref->next;
+	      gfc_free (mem);
+	    }
+
+	  /* Any further ref is an error.  */
+	  if (ref)
+	    {
+	      gcc_assert (ref->type == REF_ARRAY);
+	      gfc_error ("Syntax error in EQUIVALENCE statement at %L",
+			 &ref->u.ar.where);
+	      continue;
+	    }
+	}
+
       if (gfc_resolve_expr (e) == FAILURE)
         continue;
 
@@ -4802,19 +4865,30 @@ resolve_equivalence (gfc_equiv *eq)
           continue;
         }
 
-      /* Shall not be a structure component.  */
       r = e->ref;
       while (r)
         {
-          if (r->type == REF_COMPONENT)
-            {
-              gfc_error ("Structure component '%s' at %L cannot be an "
-                         "EQUIVALENCE object",
-                         r->u.c.component->name, &e->where);
-              break;
-            }
-          r = r->next;
-        }
+	  /* Shall not be a structure component.  */
+	  if (r->type == REF_COMPONENT)
+	    {
+	      gfc_error ("Structure component '%s' at %L cannot be an "
+			 "EQUIVALENCE object",
+			 r->u.c.component->name, &e->where);
+	      break;
+	    }
+
+	  /* A substring shall not have length zero.  */
+	  if (r->type == REF_SUBSTRING)
+	    {
+	      if (compare_bound (r->u.ss.start, r->u.ss.end) == CMP_GT)
+		{
+		  gfc_error ("Substring at %L has length zero",
+			     &r->u.ss.start->where);
+		  break;
+		}
+	    }
+	  r = r->next;
+	}
     }    
 }      
 
--- gcc/testsuite/gfortran.dg/equiv_1.f90.jj	2005-07-20 16:15:36.000000000 +0200
+++ gcc/testsuite/gfortran.dg/equiv_1.f90	2005-07-20 16:25:16.000000000 +0200
@@ -0,0 +1,9 @@
+      program broken_equiv
+      real d (2)	! { dg-error "Inconsistent equivalence rules" "d" }
+      real e		! { dg-error "Inconsistent equivalence rules" "e" }
+      equivalence (d (1), e), (d (2), e)
+
+      real f (2)	! { dg-error "Inconsistent equivalence rules" "f" }
+      double precision g (2) ! { dg-error "Inconsistent equivalence rules" "g" }
+      equivalence (f (1), g (1)), (f (2), g (2)) ! Not standard conforming
+      end
--- gcc/testsuite/gfortran.dg/equiv_2.f90.jj	2005-07-20 16:15:33.000000000 +0200
+++ gcc/testsuite/gfortran.dg/equiv_2.f90	2005-07-25 21:45:10.000000000 +0200
@@ -0,0 +1,17 @@
+      subroutine broken_equiv1
+      character*4 h
+      character*3 i
+      equivalence (h(1:3), i(2:1))	! { dg-error "has length zero" }
+      end subroutine
+
+      subroutine broken_equiv2
+      character*4 j
+      character*2 k
+      equivalence (j(2:3), k(1:5))	! { dg-error "out of bounds" }
+      end subroutine
+
+      subroutine broken_equiv3
+      character*4 l
+      character*2 m
+      equivalence (l(2:3:4), m(1:2))	! { dg-error "\[Ss\]yntax error" }
+      end subroutine
--- gcc/testsuite/gfortran.fortran-torture/execute/equiv_2.f90.jj	2005-07-20 15:31:29.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/equiv_2.f90	2005-07-25 15:12:14.000000000 +0200
@@ -0,0 +1,46 @@
+      subroutine test1
+      character*8 c
+      character*1 d, f
+      dimension d(2), f(2)
+      character*4 e
+      equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
+      c='abcdefgh'
+      if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') call abort
+      if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') call abort
+      end subroutine test1
+      subroutine test2
+      equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
+      character*8 c
+      character*1 d, f
+      dimension d(2), f(2)
+      character*4 e
+      c='abcdefgh'
+      if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') call abort
+      if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') call abort
+      end subroutine test2
+      subroutine test3
+      character*8 c
+      character*1 d, f
+      character*4 e
+      equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
+      dimension d(2), f(2)
+      c='abcdefgh'
+      if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') call abort
+      if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') call abort
+      end subroutine test3
+      subroutine test4
+      dimension d(2), f(2)
+      equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
+      character*8 c
+      character*1 d, f
+      character*4 e
+      c='abcdefgh'
+      if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') call abort
+      if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') call abort
+      end subroutine test4
+      program main
+      call test1
+      call test2
+      call test3
+      call test4
+      end program main
--- gcc/testsuite/gfortran.fortran-torture/execute/equiv_3.f90.jj	2005-07-25 15:11:40.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/equiv_3.f90	2005-07-25 15:11:58.000000000 +0200
@@ -0,0 +1,13 @@
+      subroutine test1
+      type t
+      sequence
+      character(8) c
+      end type t
+      type(t) :: tc, td
+      equivalence (tc, td)
+      tc%c='abcdefgh'
+      if (tc%c.ne.'abcdefgh'.or.td%c(1:1).ne.'a') call abort
+      end subroutine test1
+      program main
+      call test1
+      end program main
--- gcc/testsuite/gfortran.fortran-torture/execute/equiv_4.f90.jj	2005-07-25 16:38:21.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/equiv_4.f90	2005-07-25 17:21:50.000000000 +0200
@@ -0,0 +1,54 @@
+      subroutine test1
+      character*8 c
+      character*2 d, f
+      dimension d(2), f(2)
+      character*4 e
+      equivalence (c(1:1), d(1)(2:)), (c(3:5), e(2:4))
+      equivalence (c(6:6), f(2)(:))
+      d(1)='AB'
+      c='abcdefgh'
+      if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') call abort
+      if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') call abort
+      end subroutine test1
+      subroutine test2
+      equivalence (c(1:1), d(1)(2:2)), (c(3:5), e(2:4))
+      equivalence (c(6:6), f(2)(1:))
+      character*8 c
+      character*2 d, f
+      dimension d(2), f(2)
+      character*4 e
+      d(1)='AB'
+      c='abcdefgh'
+      if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') call abort
+      if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') call abort
+      end subroutine test2
+      subroutine test3
+      character*8 c
+      character*2 d, f
+      character*4 e
+      equivalence (c(1:1), d(1)(2:)), (c(3:5), e(2:4))
+      equivalence (c(6:6), f(2)(:1))
+      dimension d(2), f(2)
+      d(1)='AB'
+      c='abcdefgh'
+      if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') call abort
+      if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') call abort
+      end subroutine test3
+      subroutine test4
+      dimension d(2), f(2)
+      equivalence (c(1:1), d(1)(2:2)), (c(3:5), e(2:4))
+      equivalence (c(6:6), f(2)(1:2))
+      character*8 c
+      character*2 d, f
+      character*4 e
+      d(1)='AB'
+      c='abcdefgh'
+      if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') call abort
+      if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') call abort
+      end subroutine test4
+      program main
+      call test1
+      call test2
+      call test3
+      call test4
+      end program main

gcc4-ppc32-msecure-plt.patch:
 gcc/config.gcc                   |    6 +
 gcc/config.in                    |    3 
 gcc/config/rs6000/rs6000.c       |   50 +++++++++++--
 gcc/config/rs6000/rs6000.h       |    9 +-
 gcc/config/rs6000/rs6000.md      |  144 ++++++++++++++++++++++++++++++++-------
 gcc/config/rs6000/secureplt.h    |   21 +++++
 gcc/config/rs6000/sysv4.h        |   21 ++++-
 gcc/config/rs6000/tramp.asm      |   10 ++
 gcc/configure                    |   57 +++++++++++++++
 gcc/configure.ac                 |   23 ++++++
 gcc/doc/install.texi             |   33 +++++++-
 gcc/doc/invoke.texi              |   13 +++
 libffi/src/powerpc/ppc_closure.S |    2 
 libffi/src/powerpc/sysv.S        |    2 
 14 files changed, 347 insertions(+), 47 deletions(-)

--- NEW FILE gcc4-ppc32-msecure-plt.patch ---
2005-06-02  Alan Modra <amodra at bigpond.net.au>

	* configure.ac: Add --enable-secureplt.
	(HAVE_AS_REL16): Test for R_PPC_REL16 relocs.
	* config.in: Regenerate.
	* configure: Regenerate.
	* config.gcc (powerpc64-*-linux*, powerpc-*-linux*): Add
	rs6000/secureplt.h to tm_file when enable_secureplt.
	* doc/invoke.texi (msecure-plt, mbss-plt): Document.
	* doc/install.texi: Document --enable-targets and --enable-secureplt.
	Correct xrefs to "Using the GNU Compiler Collection (GCC)".
	* config/rs6000/secureplt.h: New file.
	* config/rs6000/sysv4.h (MASK_SECURE_PLT): Define.
	(SUBTARGET_SWITCHES): Add "secure-plt" and "bss-plt".  Move "newlib".
	(SUBTARGET_OVERRIDE_OPTIONS): Error if -msecure-plt given without
	assembler support.
	(CC1_SECURE_PLT_DEFAULT_SPEC): Define.
	(CC1_SPEC): Delete duplicate mno-sdata.  Invoke cc1_secure_plt_default.
	(SUBTARGET_EXTRA_SPECS): Add cc1_secure_plt_default.
	* config/rs6000/rs6000.h: Update target_flags free bits comment.
	(TARGET_SECURE_PLT): Define.
	* config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Handle
	TARGET_SECURE_PLT got register load sequence.
	(rs6000_emit_prologue): Call rs6000_emit_load_toc_table when
	TARGET_SECURE_PLT.
	(rs6000_elf_declare_function_name): Don't emit toc address offset
	word when TARGET_SECURE_PLT.
	* config/rs6000/rs6000.md (elf_high, elf_low): Move past load_toc_*.
	(load_toc_v4_PIC_1) Enable for TARGET_SECURE_PLT.
	(load_toc_v4_PIC_3b, load_toc_v4_PIC_3c): New insns.
	(call, call_value): Mark pic_offset_table_rtx used for sysv pic and
	TARGET_SECURE_PLT.
	(call_nonlocal_sysv, call_value_nonlocal_sysv, sibcall_nonlocal_sysv,
	sibcall_value_nonlocal_sysv): Add 32768 offset when TARGET_SECURE_PLT
	and -fPIC.
	* config/rs6000/tramp.asm (trampoline_initial): Use "bcl 20,31".
	(__trampoline_setup): Likewise.  Init r30 before plt call.

	* src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET
	to call ffi_closure_helper_SYSV.  Append @local instead.
	* src/powerpc/sysv.S (ffi_call_SYSV): Likewise for ffi_prep_args_SYSV.

--- gcc/configure.ac	2005-05-11 18:20:56.000000000 +0930
+++ gcc/configure.ac	2005-06-01 21:52:52.000000000 +0930
@@ -1429,6 +1429,10 @@ case "$LIBINTL" in *$LIBICONV*)
 	LIBICONV= ;;
 esac
 
+AC_ARG_ENABLE(secureplt,
+[  --enable-secureplt      enable -msecure-plt by default for PowerPC],
+[], [])
+
 # Windows32 Registry support for specifying GCC installation paths.
 AC_ARG_ENABLE(win32-registry,
 [  --disable-win32-registry
@@ -2762,6 +2766,25 @@ foo:	nop
       [$conftest_s],,
       [AC_DEFINE(HAVE_AS_MFCRF, 1,
 	  [Define if your assembler supports mfcr field.])])
+
+    case $target in
+      *-*-aix*) conftest_s='	.csect .text[[PR]]
+LCF..0:
+	addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0 at ha';;
+      *-*-darwin*)
+	conftest_s='	.text
+LCF0:
+	addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0 at ha';;
+      *) conftest_s='	.text
+.LCF0:
+	addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0 at ha';;
+    esac
+
+    gcc_GAS_CHECK_FEATURE([rel16 relocs],
+      gcc_cv_as_powerpc_rel16, [2,17,0], -a32,
+      [$conftest_s],,
+      [AC_DEFINE(HAVE_AS_REL16, 1,
+	  [Define if your assembler supports R_PPC_REL16 relocs.])])
     ;;
 
   mips*-*-*)
--- gcc/configure	2005-06-06 17:00:55.000000000 +0200
+++ gcc/configure	2005-07-27 11:17:45.000000000 +0200
@@ -890,6 +890,7 @@ Optional Features:
   --enable-initfini-array	use .init_array/.fini_array sections
   --enable-sjlj-exceptions
                           arrange to use setjmp/longjmp exception handling
+  --enable-secureplt      enable -msecure-plt by default for PowerPC
   --disable-win32-registry
                           disable lookup of installation paths in the
                           Registry on Windows hosts
@@ -12330,6 +12331,12 @@ case "$LIBINTL" in *$LIBICONV*)
 	LIBICONV= ;;
 esac
 
+# Check whether --enable-secureplt or --disable-secureplt was given.
+if test "${enable_secureplt+set}" = set; then
+  enableval="$enable_secureplt"
+
+fi;
+
 # Windows32 Registry support for specifying GCC installation paths.
 # Check whether --enable-win32-registry or --disable-win32-registry was given.
 if test "${enable_win32_registry+set}" = set; then
@@ -14664,6 +14671,56 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
+
+    case $target in
+      *-*-aix*) conftest_s='	.csect .text[PR]
+LCF..0:
+	addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0 at ha';;
+      *-*-darwin*)
+	conftest_s='	.text
+LCF0:
+	addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0 at ha';;
+      *) conftest_s='	.text
+.LCF0:
+	addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0 at ha';;
+    esac
+
+    echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
+echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
+if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_powerpc_rel16=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
+  then gcc_cv_as_powerpc_rel16=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo "$conftest_s" > conftest.s
+    if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }
+    then
+	gcc_cv_as_powerpc_rel16=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
+echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
+if test $gcc_cv_as_powerpc_rel16 = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_REL16 1
+_ACEOF
+
+fi
     ;;
 
   mips*-*-*)
--- gcc/config.in	2005-06-06 17:00:53.000000000 +0200
+++ gcc/config.in	2005-07-27 11:19:13.000000000 +0200
@@ -122,6 +122,9 @@
 /* Define if your assembler supports .register. */
 #undef HAVE_AS_REGISTER_PSEUDO_OP
 
+/* Define if your assembler supports R_PPC_REL16 relocs. */
+#undef HAVE_AS_REL16
+
 /* Define if your assembler supports -relax option. */
 #undef HAVE_AS_RELAX_OPTION
 
--- gcc/config.gcc	2005-05-06 23:50:09.000000000 +0930
+++ gcc/config.gcc	2005-05-30 10:29:30.000000000 +0930
@@ -1559,6 +1559,9 @@ powerpc64-*-linux*)
 	test x$with_cpu != x || cpu_is_64bit=yes
 	test x$cpu_is_64bit != xyes || tm_file="${tm_file} rs6000/default64.h"
 	tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
+	if test x${enable_secureplt} = xyes; then
+		tm_file="rs6000/secureplt.h ${tm_file}"
+	fi
 	tmake_file="rs6000/t-fprules ${tmake_file} rs6000/t-ppccomm rs6000/t-linux64"
 	;;
 powerpc64-*-gnu*)
@@ -1651,6 +1654,9 @@ powerpc-*-linux*)
 		tm_file="${tm_file} rs6000/linux.h"
 		;;
 	esac
+	if test x${enable_secureplt} = xyes; then
+		tm_file="rs6000/secureplt.h ${tm_file}"
+	fi
 	;;
 powerpc-*-gnu-gnualtivec*)
 	tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h"
--- gcc/doc/install.texi	2005-05-02 08:26:07.000000000 +0930
+++ gcc/doc/install.texi	2005-06-01 21:44:56.000000000 +0930
@@ -1071,6 +1071,27 @@ do a @samp{make -C gcc gnatlib_and_tools
 Specify that the compiler should
 use DWARF 2 debugging information as the default.
 
+ at item --enable-targets=all
+ at itemx --enable-targets=@var{target_list}
+Some GCC targets, e.g.@: powerpc64-linux, build bi-arch compilers.
+These are compilers that are able to generate either 64-bit or 32-bit
+code.  Typicially, the corresponding 32-bit target, e.g.@:
+powerpc-linux for powerpc64-linux, only generates 32-bit code.  This
+option enables the 32-bit target to be a bi-arch compiler, which is
+useful when you want a bi-arch compiler that defaults to 32-bit, and
+you are building a bi-arch or multi-arch binutils in a combined tree.
+Currently, this option only affects powerpc-linux.
+
+ at item --enable-secureplt
+This option enables @option{-msecure-plt} by default for powerpc-linux.
+ at ifnothtml
+ at xref{RS/6000 and PowerPC Options,, RS/6000 and PowerPC Options, gcc,
+Using the GNU Compiler Collection (GCC)},
+ at end ifnothtml
+ at ifhtml
+See ``RS/6000 and PowerPC Options'' in the main manual
+ at end ifhtml
+
 @item --enable-win32-registry
 @itemx --enable-win32-registry=@var{key}
 @itemx --disable-win32-registry
@@ -2464,7 +2485,7 @@ ARM-family processors.  These targets su
 ATMEL AVR-family micro controllers.  These are used in embedded
 applications.  There are no standard Unix configurations.
 @ifnothtml
- at xref{AVR Options,, AVR Options, gcc, Using and Porting the GNU Compiler
+ at xref{AVR Options,, AVR Options, gcc, Using the GNU Compiler
 Collection (GCC)},
 @end ifnothtml
 @ifhtml
@@ -2502,8 +2523,8 @@ indicates that you should upgrade to a n
 
 The Blackfin processor, an Analog Devices DSP.
 @ifnothtml
- at xref{Blackfin Options,, Blackfin Options, gcc, Using and Porting the GNU
-Compiler Collection (GCC)},
+ at xref{Blackfin Options,, Blackfin Options, gcc, Using the GNU Compiler
+Collection (GCC)},
 @end ifnothtml
 @ifhtml
 See ``Blackfin Options'' in the main manual
@@ -2521,8 +2542,8 @@ Texas Instruments TMS320C3x and TMS320C4
 Processors.  These are used in embedded applications.  There are no
 standard Unix configurations.
 @ifnothtml
- at xref{TMS320C3x/C4x Options,, TMS320C3x/C4x Options, gcc, Using and
-Porting the GNU Compiler Collection (GCC)},
+ at xref{TMS320C3x/C4x Options,, TMS320C3x/C4x Options, gcc, Using the
+GNU Compiler Collection (GCC)},
 @end ifnothtml
 @ifhtml
 See ``TMS320C3x/C4x Options'' in the main manual
@@ -2551,7 +2572,7 @@ CRIS is the CPU architecture in Axis Com
 series.  These are used in embedded applications.
 
 @ifnothtml
- at xref{CRIS Options,, CRIS Options, gcc, Using and Porting the GNU Compiler
+ at xref{CRIS Options,, CRIS Options, gcc, Using the GNU Compiler
 Collection (GCC)},
 @end ifnothtml
 @ifhtml
--- gcc/doc/invoke.texi	2005-05-19 18:44:04.000000000 +0930
+++ gcc/doc/invoke.texi	2005-06-01 21:43:42.000000000 +0930
@@ -625,6 +625,7 @@ See RS/6000 and PowerPC Options.
 -maix-struct-return  -msvr4-struct-return @gol
 -mabi=altivec  -mabi=no-altivec @gol
 -mabi=spe  -mabi=no-spe @gol
+-msecure-plt -mbss-plt @gol
 -misel=yes  -misel=no @gol
 -mspe=yes  -mspe=no @gol
 -mfloat-gprs=yes  -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol
@@ -10515,6 +10516,18 @@ ABI at .
 @opindex mabi=no-spe
 Disable Booke SPE ABI extensions for the current ABI at .
 
+ at item -msecure-plt
+ at opindex msecure-plt
+Generate code that allows ld and ld.so to build executables and shared
+libraries with non-exec .plt and .got sections.  This is a PowerPC
+32-bit SYSV ABI option.
+
+ at item -mbss-plt
+ at opindex mbss-plt
+Generate code that uses a BSS .plt section that ld.so fills in, and
+requires .plt and .got sections that are both writable and executable.
+This is a PowerPC 32-bit SYSV ABI option.
+
 @item -misel=@var{yes/no}
 @itemx -misel
 @opindex misel
--- gcc/config/rs6000/secureplt.h	1970-01-01 09:30:00.000000000 +0930
+++ gcc/config/rs6000/secureplt.h	2005-05-30 10:29:30.000000000 +0930
@@ -0,0 +1,21 @@
+/* Default to -msecure-plt.
+   Copyright (C) 2005 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, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
--- gcc/config/rs6000/sysv4.h	2005-02-16 09:06:57.000000000 +1030
+++ gcc/config/rs6000/sysv4.h	2005-05-30 10:52:01.000000000 +0930
@@ -55,6 +55,7 @@ extern enum rs6000_sdata_type rs6000_sda
 #define	MASK_REGNAMES		0x02000000	/* Use alternate register names.  */
 #define	MASK_PROTOTYPE		0x01000000	/* Only prototyped fcns pass variable args.  */
 #define MASK_NO_BITFIELD_WORD	0x00800000	/* Bitfields cannot cross word boundaries */
+#define MASK_SECURE_PLT		0x00400000	/* Use non-exec PLT/GOT.  */
 
 #define	TARGET_NO_BITFIELD_TYPE	(target_flags & MASK_NO_BITFIELD_TYPE)
 #define	TARGET_STRICT_ALIGN	(target_flags & MASK_STRICT_ALIGN)
@@ -149,12 +150,16 @@ extern const char *rs6000_tls_size_strin
     N_("Set the PPC_EMB bit in the ELF flags header") },		\
   { "windiss",		 0, N_("Use the WindISS simulator") },		\
   { "shlib",		 0, N_("no description yet") },			\
+  { "newlib",		 0, N_("no description yet") },			\
   { "64",		 MASK_64BIT | MASK_POWERPC64 | MASK_POWERPC,	\
 			 N_("Generate 64-bit code") },			\
   { "32",		 - (MASK_64BIT | MASK_POWERPC64),		\
 			 N_("Generate 32-bit code") },			\
-  EXTRA_SUBTARGET_SWITCHES						\
-  { "newlib",		 0, N_("no description yet") },
+  { "secure-plt",	 MASK_SECURE_PLT,				\
+			 N_("Generate code for non-exec PLT and GOT") },\
+  { "bss-plt",		 -MASK_SECURE_PLT,				\
+			 N_("Generate code for exec BSS PLT") },	\
+  EXTRA_SUBTARGET_SWITCHES
 
 /* This is meant to be redefined in the host dependent files.  */
 #define EXTRA_SUBTARGET_SWITCHES
@@ -299,6 +304,11 @@ do {									\
       error ("-mcall-aixdesc must be big endian");			\
     }									\
 									\
+  if (TARGET_SECURE_PLT != (target_flags & MASK_SECURE_PLT))		\
+    {									\
+      error ("-msecure-plt not supported by your assembler");		\
+    }									\
+									\
   /* Treat -fPIC the same as -mrelocatable.  */				\
   if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX)				\
     target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC; \
@@ -844,6 +854,10 @@ extern int fixuplabelno;
 
 #define	CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big)"
 
+#ifndef CC1_SECURE_PLT_DEFAULT_SPEC
+#define CC1_SECURE_PLT_DEFAULT_SPEC ""
+#endif
+
 /* Pass -G xxx to the compiler and set correct endian mode.  */
 #define	CC1_SPEC "%{G*} \
 %{mlittle|mlittle-endian: %(cc1_endian_little);           \
@@ -856,7 +870,6 @@ extern int fixuplabelno;
   mcall-gnu             : -mbig %(cc1_endian_big);        \
   mcall-i960-old        : -mlittle %(cc1_endian_little);  \
                         : %(cc1_endian_default)}          \
-%{mno-sdata: -msdata=none } \
 %{meabi: %{!mcall-*: -mcall-sysv }} \
 %{!meabi: %{!mno-eabi: \
     %{mrelocatable: -meabi } \
@@ -868,6 +881,7 @@ extern int fixuplabelno;
     %{mcall-openbsd: -mno-eabi }}} \
 %{msdata: -msdata=default} \
 %{mno-sdata: -msdata=none} \
+%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
 %{profile: -p}"
 
 /* Don't put -Y P,<path> for cross compilers.  */
@@ -1308,6 +1322,7 @@ ncrtn.o%s"
   { "cc1_endian_big",		CC1_ENDIAN_BIG_SPEC },			\
   { "cc1_endian_little",	CC1_ENDIAN_LITTLE_SPEC },		\
   { "cc1_endian_default",	CC1_ENDIAN_DEFAULT_SPEC },		\
+  { "cc1_secure_plt_default",	CC1_SECURE_PLT_DEFAULT_SPEC },		\
   { "cpp_os_ads",		CPP_OS_ADS_SPEC },			\
   { "cpp_os_yellowknife",	CPP_OS_YELLOWKNIFE_SPEC },		\
   { "cpp_os_mvme",		CPP_OS_MVME_SPEC },			\
--- gcc/config/rs6000/rs6000.h	2005-03-03 08:34:37.000000000 +1030
+++ gcc/config/rs6000/rs6000.h	2005-05-30 10:52:00.000000000 +0930
@@ -201,8 +201,8 @@ extern int target_flags;
 /* Use single field mfcr instruction.  */
 #define MASK_MFCRF		0x00080000
 
-/* The only remaining free bits are 0x00600000.  linux64.h uses
-   0x00100000, and sysv4.h uses 0x00800000 -> 0x40000000.
+/* The only remaining free bit is 0x00200000.  linux64.h uses
+   0x00100000, and sysv4.h uses 0x00400000 -> 0x40000000.
    0x80000000 is not available because target_flags is signed.  */
 
 #define TARGET_POWER		(target_flags & MASK_POWER)
@@ -234,6 +234,11 @@ extern int target_flags;
 #define TARGET_MFCRF 0
 #endif
 
+#ifdef HAVE_AS_REL16
+#define TARGET_SECURE_PLT	(target_flags & MASK_SECURE_PLT)
+#else
+#define TARGET_SECURE_PLT	0
+#endif
 
 #define TARGET_32BIT		(! TARGET_64BIT)
 #define TARGET_HARD_FLOAT	(! TARGET_SOFT_FLOAT)
--- gcc/config/rs6000/rs6000.c	2005-05-11 18:23:48.000000000 +0930
+++ gcc/config/rs6000/rs6000.c	2005-05-30 10:29:30.000000000 +0930
@@ -13466,15 +13520,49 @@ rs6000_emit_load_toc_table (int fromprol
   rtx dest, insn;
   dest = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM);
 
-  if (TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 1)
+  if (TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI != ABI_AIX && flag_pic)
     {
-      rtx temp = (fromprolog
-		  ? gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM)
-		  : gen_reg_rtx (Pmode));
-      insn = emit_insn (gen_load_toc_v4_pic_si (temp));
+      char buf[30];
+      rtx lab, tmp1, tmp2, got, tempLR;
+
+      ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno);
+      lab = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
+      if (flag_pic == 2)
+	got = gen_rtx_SYMBOL_REF (Pmode, toc_label_name);
+      else
+	got = rs6000_got_sym ();
+      tmp1 = tmp2 = dest;
+      if (!fromprolog)
+	{
+	  tmp1 = gen_reg_rtx (Pmode);
+	  tmp2 = gen_reg_rtx (Pmode);
+	}
+      tempLR = (fromprolog
+		? gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM)
+		: gen_reg_rtx (Pmode));
+      insn = emit_insn (gen_load_toc_v4_PIC_1 (tempLR, lab));
+      if (fromprolog)
+	rs6000_maybe_dead (insn);
+      insn = emit_move_insn (tmp1, tempLR);
+      if (fromprolog)
+	rs6000_maybe_dead (insn);
+      insn = emit_insn (gen_load_toc_v4_PIC_3b (tmp2, tmp1, got, lab));
+      if (fromprolog)
+	rs6000_maybe_dead (insn);
+      insn = emit_insn (gen_load_toc_v4_PIC_3c (dest, tmp2, got, lab));
+      if (fromprolog)
+	rs6000_maybe_dead (insn);
+    }
+  else if (TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 1)
+    {
+      rtx tempLR = (fromprolog
+		    ? gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM)
+		    : gen_reg_rtx (Pmode));
+
+      insn = emit_insn (gen_load_toc_v4_pic_si (tempLR));
       if (fromprolog)
 	rs6000_maybe_dead (insn);
-      insn = emit_move_insn (dest, temp);
+      insn = emit_move_insn (dest, tempLR);
       if (fromprolog)
 	rs6000_maybe_dead (insn);
     }
@@ -14565,7 +14653,8 @@ rs6000_emit_prologue (void)
 
   /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up.  */
   if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
-      || (DEFAULT_ABI == ABI_V4 && flag_pic == 1
+      || (DEFAULT_ABI == ABI_V4
+	  && (flag_pic == 1 || (flag_pic && TARGET_SECURE_PLT))
 	  && regs_ever_live[RS6000_PIC_OFFSET_TABLE_REGNUM]))
     {
       /* If emit_load_toc_table will use the link register, we need to save
@@ -18082,6 +18171,7 @@ rs6000_elf_declare_function_name (FILE *
     }
 
   if (TARGET_RELOCATABLE
+      && !TARGET_SECURE_PLT
       && (get_pool_size () != 0 || current_function_profile)
       && uses_TOC ())
     {
--- gcc/config/rs6000/rs6000.md	2005-03-31 21:02:13.000000000 +0930
+++ gcc/config/rs6000/rs6000.md	2005-05-30 10:29:30.000000000 +0930
@@ -7653,26 +7653,6 @@
 
 ;; Now define ways of moving data around.
 
-;; Elf specific ways of loading addresses for non-PIC code.
-;; The output of this could be r0, but we make a very strong
-;; preference for a base register because it will usually
-;; be needed there.
-(define_insn "elf_high"
-  [(set (match_operand:SI 0 "gpc_reg_operand" "=b*r")
-	(high:SI (match_operand 1 "" "")))]
-  "TARGET_ELF && ! TARGET_64BIT"
-  "{liu|lis} %0,%1 at ha")
-
-(define_insn "elf_low"
-  [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
-	(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,!*r")
-		   (match_operand 2 "" "")))]
-   "TARGET_ELF && ! TARGET_64BIT"
-   "@
-    {cal|la} %0,%2 at l(%1)
-    {ai|addic} %0,%1,%K2")
-
-
 ;; Set up a register with a value from the GOT table
 
 (define_expand "movsi_got"
@@ -10133,7 +10111,8 @@
   [(set (match_operand:SI 0 "register_operand" "=l")
 	(match_operand:SI 1 "immediate_operand" "s"))
    (use (unspec [(match_dup 1)] UNSPEC_TOC))]
-  "TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2"
+  "TARGET_ELF && DEFAULT_ABI != ABI_AIX
+   && (flag_pic == 2 || (flag_pic && TARGET_SECURE_PLT))"
   "bcl 20,31,%1\\n%1:"
   [(set_attr "type" "branch")
    (set_attr "length" "4")])
@@ -10156,6 +10135,23 @@
   "{l|lwz} %0,%2-%3(%1)"
   [(set_attr "type" "load")])
 
+(define_insn "load_toc_v4_PIC_3b"
+  [(set (match_operand:SI 0 "gpc_reg_operand" "=b")
+	(plus:SI (match_operand:SI 1 "gpc_reg_operand" "r")
+		 (high:SI
+		   (minus:SI (match_operand:SI 2 "symbol_ref_operand" "s")
+			     (match_operand:SI 3 "symbol_ref_operand" "s")))))]
+  "TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI != ABI_AIX && flag_pic"
+  "{cau|addis} %0,%1,%2-%3 at ha")
+
+(define_insn "load_toc_v4_PIC_3c"
+  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
+	(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b")
+		   (minus:SI (match_operand:SI 2 "symbol_ref_operand" "s")
+			     (match_operand:SI 3 "symbol_ref_operand" "s"))))]
+  "TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI != ABI_AIX && flag_pic"
+  "{cal|addi} %0,%1,%2-%3 at l")
+
 
 ;; If the TOC is shared over a translation unit, as happens with all
 ;; the kinds of PIC that we support, we need to restore the TOC
@@ -10190,6 +10186,26 @@
     rs6000_emit_load_toc_table (FALSE);
   DONE;
 }")
+
+;; Elf specific ways of loading addresses for non-PIC code.
+;; The output of this could be r0, but we make a very strong
+;; preference for a base register because it will usually
+;; be needed there.
+(define_insn "elf_high"
+  [(set (match_operand:SI 0 "gpc_reg_operand" "=b*r")
+	(high:SI (match_operand 1 "" "")))]
+  "TARGET_ELF && ! TARGET_64BIT"
+  "{liu|lis} %0,%1 at ha")
+
+(define_insn "elf_low"
+  [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
+	(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,!*r")
+		   (match_operand 2 "" "")))]
+   "TARGET_ELF && ! TARGET_64BIT"
+   "@
+    {cal|la} %0,%2 at l(%1)
+    {ai|addic} %0,%1,%K2")
+
 
 ;; A function pointer under AIX is a pointer to a data area whose first word
 ;; contains the actual address of the function, whose second word contains a
@@ -10306,6 +10322,25 @@
 
   operands[0] = XEXP (operands[0], 0);
 
+  if (DEFAULT_ABI == ABI_V4 && TARGET_SECURE_PLT
+      && flag_pic
+      && GET_CODE (operands[0]) == SYMBOL_REF
+      && !SYMBOL_REF_LOCAL_P (operands[0]))
+    {
+      rtx call;
+      rtvec tmp;
+
+      tmp = gen_rtvec (3,
+		       gen_rtx_CALL (VOIDmode,
+				     gen_rtx_MEM (SImode, operands[0]),
+				     operands[1]),
+		       gen_rtx_USE (VOIDmode, operands[2]),
+		       gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (SImode)));
+      call = emit_call_insn (gen_rtx_PARALLEL (VOIDmode, tmp));
+      use_reg (&CALL_INSN_FUNCTION_USAGE (call), pic_offset_table_rtx);
+      DONE;
+    }
+
   if (GET_CODE (operands[0]) != SYMBOL_REF
       || (DEFAULT_ABI == ABI_AIX && !SYMBOL_REF_FUNCTION_P (operands[0]))
       || (DEFAULT_ABI != ABI_DARWIN && (INTVAL (operands[2]) & CALL_LONG) != 0))
@@ -10354,6 +10389,28 @@
 
   operands[1] = XEXP (operands[1], 0);
 
+  if (DEFAULT_ABI == ABI_V4 && TARGET_SECURE_PLT
+      && flag_pic
+      && GET_CODE (operands[1]) == SYMBOL_REF
+      && !SYMBOL_REF_LOCAL_P (operands[1]))
+    {
+      rtx call;
+      rtvec tmp;
+
+      tmp = gen_rtvec (3,
+		       gen_rtx_SET (VOIDmode,
+				    operands[0],
+				    gen_rtx_CALL (VOIDmode,
+						  gen_rtx_MEM (SImode,
+							       operands[1]),
+						  operands[2])),
+		       gen_rtx_USE (VOIDmode, operands[3]),
+		       gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (SImode)));
+      call = emit_call_insn (gen_rtx_PARALLEL (VOIDmode, tmp));
+      use_reg (&CALL_INSN_FUNCTION_USAGE (call), pic_offset_table_rtx);
+      DONE;
+    }
+
   if (GET_CODE (operands[1]) != SYMBOL_REF
       || (DEFAULT_ABI == ABI_AIX && !SYMBOL_REF_FUNCTION_P (operands[1]))
       || (DEFAULT_ABI != ABI_DARWIN && (INTVAL (operands[3]) & CALL_LONG) != 0))
@@ -10624,7 +10681,18 @@
 #if TARGET_MACHO
   return output_call(insn, operands, 0, 2);
 #else
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? "bl %z0 at plt" : "bl %z0";
+  if (DEFAULT_ABI == ABI_V4 && flag_pic)
+    {
+      if (TARGET_SECURE_PLT && flag_pic == 2)
+	/* The magic 32768 offset here and in the other sysv call insns
+	   corresponds to the offset of r30 in .got2, as given by LCTOC1.
+	   See sysv4.h:toc_section.  */
+	return "bl %z0+32768 at plt";
+      else
+	return "bl %z0 at plt";
+    }
+  else
+    return "bl %z0";
 #endif
 }
   [(set_attr "type" "branch,branch")
@@ -10669,7 +10737,15 @@
 #if TARGET_MACHO
   return output_call(insn, operands, 1, 3);
 #else
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? "bl %z1 at plt" : "bl %z1";
+  if (DEFAULT_ABI == ABI_V4 && flag_pic)
+    {
+      if (TARGET_SECURE_PLT && flag_pic == 2)
+	return "bl %z1+32768 at plt";
+      else
+	return "bl %z1 at plt";
+    }
+  else
+    return "bl %z1";
 #endif
 }
   [(set_attr "type" "branch,branch")
@@ -10884,7 +10960,15 @@
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z0 at plt\" : \"b %z0\";
+  if (DEFAULT_ABI == ABI_V4 && flag_pic)
+    {
+      if (TARGET_SECURE_PLT && flag_pic == 2)
+	return \"b %z0+32768 at plt\";
+      else
+	return \"b %z0 at plt\";
+    }
+  else
+    return \"b %z0\";
 }"
   [(set_attr "type" "branch,branch")
    (set_attr "length" "4,8")])
@@ -10930,7 +11014,15 @@
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z1 at plt\" : \"b %z1\";
+  if (DEFAULT_ABI == ABI_V4 && flag_pic)
+    {
+      if (TARGET_SECURE_PLT && flag_pic == 2)
+	return \"b %z1+32768 at plt\";
+      else
+	return \"b %z1 at plt\";
+    }
+  else
+    return \"b %z1\";
 }"
   [(set_attr "type" "branch,branch")
    (set_attr "length" "4,8")])
--- gcc/config/rs6000/tramp.asm	2003-06-06 14:41:22.000000000 +0930
+++ gcc/config/rs6000/tramp.asm	2005-05-24 10:52:09.000000000 +0930
@@ -44,7 +44,7 @@
 	.align	2
 trampoline_initial:
 	mflr	r0
-	bl	1f
+	bcl	20,31,1f
 .Lfunc = .-trampoline_initial
 	.long	0			/* will be replaced with function address */
 .Lchain = .-trampoline_initial
@@ -67,7 +67,7 @@ trampoline_size = .-trampoline_initial
 
 FUNC_START(__trampoline_setup)
 	mflr	r0		/* save return address */
-        bl	.LCF0		/* load up __trampoline_initial into r7 */
+        bcl	20,31,.LCF0	/* load up __trampoline_initial into r7 */
 .LCF0:
         mflr	r11
         addi	r7,r11,trampoline_initial-4-.LCF0 /* trampoline address -4 */
@@ -105,6 +105,12 @@ FUNC_START(__trampoline_setup)
 	blr
 
 .Labort:
+#if defined SHARED && defined HAVE_AS_REL16
+	bcl	20,31,1f
+1:	mflr	r30
+	addis	r30,r30,_GLOBAL_OFFSET_TABLE_-1b at ha
+	addi	r30,r30,_GLOBAL_OFFSET_TABLE_-1b at l
+#endif
 	bl	JUMP_TARGET(abort)
 FUNC_END(__trampoline_setup)
 
--- libffi/src/powerpc/ppc_closure.S	2004-09-03 22:42:23.000000000 +0930
+++ libffi/src/powerpc/ppc_closure.S	2005-05-24 10:25:49.000000000 +0930
@@ -57,7 +57,7 @@ ENTRY(ffi_closure_SYSV)
 	addi %r7,%r1,152
 
 	# make the call
-	bl JUMPTARGET(ffi_closure_helper_SYSV)
+	bl ffi_closure_helper_SYSV at local
 
 	# now r3 contains the return type
 	# so use it to look up in a table
--- libffi/src/powerpc/sysv.S	2004-09-03 22:42:23.000000000 +0930
+++ libffi/src/powerpc/sysv.S	2005-05-24 10:25:47.000000000 +0930
@@ -60,7 +60,7 @@ ENTRY(ffi_call_SYSV)
 
 	/* Call ffi_prep_args_SYSV.  */
 	mr	%r4,%r1
-	bl	JUMPTARGET(ffi_prep_args_SYSV)
+	bl	ffi_prep_args_SYSV at local
 
 	/* Now do the call.  */
 	/* Set up cr1 with bits 4-7 of the flags.  */

gcc4-pr21149-test.patch:
 i386-sse-13.c |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+)

--- NEW FILE gcc4-pr21149-test.patch ---
2005-07-27  Jakub Jelinek  <jakub at redhat.com>

	PR target/21149
	* gcc.dg/i386-sse-13.c: New test.

--- gcc/testsuite/gcc.dg/i386-sse-13.c.jj	2005-07-27 10:27:24.000000000 +0200
+++ gcc/testsuite/gcc.dg/i386-sse-13.c	2005-07-27 10:32:47.000000000 +0200
@@ -0,0 +1,53 @@
+/* PR target/21149 */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -msse" } */
+#include <xmmintrin.h>
+#include "i386-cpuid.h"
+
+extern void abort (void);
+
+void
+__attribute__((noinline))
+check (__m128 x, float a, float b, float c, float d)
+{
+  union { __m128 m; float f[4]; } u;
+  u.m = x;
+  if (u.f[0] != a || u.f[1] != b || u.f[2] != c || u.f[3] != d)
+    abort ();
+}
+
+static inline
+void
+foo (__m128 *x)
+{
+  __m128 y = _mm_setzero_ps ();
+  __m128 v = _mm_movehl_ps (y, *x);
+  __m128 w = _mm_movehl_ps (*x, y);
+  check (*x, 9, 1, 2, -3);
+  check (v, 2, -3, 0, 0);
+  check (w, 0, 0, 2, -3);
+}
+
+void
+__attribute__((noinline))
+run_tests (void)
+{
+  __m128 y = _mm_set_ps (-3, 2, 1, 9);
+  foo (&y);
+}
+
+int
+main ()
+{
+  unsigned long cpu_facilities;
+
+  cpu_facilities = i386_cpuid ();
+
+  if ((cpu_facilities & (bit_MMX | bit_SSE | bit_CMOV))
+      != (bit_MMX | bit_SSE | bit_CMOV))
+    /* If host has no vector support, pass.  */
+    return 0;
+
+  run_tests ();
+  return 0;
+}

gcc4-pr22503.patch:
 fortran/resolve.c                      |   11 ++++++++---
 testsuite/gfortran.dg/logical_comp.f90 |    9 +++++++++
 2 files changed, 17 insertions(+), 3 deletions(-)

--- NEW FILE gcc4-pr22503.patch ---
2005-07-27  Volker Reichelt  <reichelt at igpm.rwth-aachen.de>

	PR fortran/22503
	* resolve.c (resolve_operator): Improve diagnostic for comparison
	of logicals with invalid operator.

	* gfortran.dg/logical_comp.f90: New test.

--- gcc/fortran/resolve.c	22 Jul 2005 19:03:25 -0000	1.34.2.11
+++ gcc/fortran/resolve.c	27 Jul 2005 08:39:42 -0000	1.34.2.12
@@ -1514,9 +1514,14 @@ resolve_operator (gfc_expr * e)
 	  break;
 	}
 
-      sprintf (msg, "Operands of comparison operator '%s' at %%L are %s/%s",
-	       gfc_op2string (e->value.op.operator), gfc_typename (&op1->ts),
-	       gfc_typename (&op2->ts));
+      if (op1->ts.type == BT_LOGICAL && op2->ts.type == BT_LOGICAL)
+	sprintf (msg, "Logicals at %%L must be compared with %s instead of %s",
+		 e->value.op.operator == INTRINSIC_EQ ? ".EQV." : ".NEQV.",
+		 gfc_op2string (e->value.op.operator));
+      else
+	sprintf (msg, "Operands of comparison operator '%s' at %%L are %s/%s",
+		 gfc_op2string (e->value.op.operator), gfc_typename (&op1->ts),
+		 gfc_typename (&op2->ts));
 
       goto bad_op;
 
--- gcc/testsuite/gfortran.dg/logical_comp.f90 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gfortran.dg/logical_comp.f90	27 Jul 2005 08:39:46 -0000	1.1.2.1
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! PR fortran/22503
+! Suggest use of appropriate comparison operator
+
+program foo
+  logical :: b
+  b = b .eq. b  ! { dg-error ".EQV. instead of .eq." }
+  b = b .ne. b  ! { dg-error ".NEQV. instead of .ne." }
+end program

gcc4-libstdc++-pr22309.patch:
 mt_allocator.cc |  166 +++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 116 insertions(+), 50 deletions(-)

Index: gcc4-libstdc++-pr22309.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4-libstdc++-pr22309.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gcc4-libstdc++-pr22309.patch	14 Jul 2005 18:50:49 -0000	1.2
+++ gcc4-libstdc++-pr22309.patch	27 Jul 2005 09:23:46 -0000	1.3
@@ -7,8 +7,8 @@
 	(__gnu_internal::_M_destroy_thread_key): New function.
 	(__gnu_cxx::__pool<true>::_M_destroy): Don't delete
 	_M_thread_freelist_initial.
-	(__gnu_cxx::__pool<true>::_M_initialize): Add unused attribute to __d
-	argument.  Don't use _M_thread_freelist and _M_thread_freelist_initial
+	(__gnu_cxx::__pool<true>::_M_initialize): Make argument nameless.
+	Don't use _M_thread_freelist and _M_thread_freelist_initial
 	__pool<true> fields, instead use __gnu_cxx::freelist fields, call
 	gthread_key_create just once.  Use
 	__gnu_internal::_M_destroy_thread_key as key destructor.
@@ -81,15 +81,14 @@
  	  }
  	else
  	  {
-@@ -386,8 +414,9 @@ namespace __gnu_cxx
+@@ -386,8 +414,8 @@ namespace __gnu_cxx
      return reinterpret_cast<char*>(__block) + __options._M_align;
    }
  
 - void
 -  __pool<true>::_M_initialize(__destroy_handler __d)
 +  void
-+  __pool<true>::_M_initialize(__destroy_handler __d
-+			      __attribute__((__unused__)))
++  __pool<true>::_M_initialize(__destroy_handler)
    {
      // _M_force_new must not change after the first allocate(),
      // which in turn calls this method, so if it's false, it's false
@@ -234,15 +233,14 @@
        }
  
      // Otherwise (no thread support or inactive) all requests are
-@@ -538,14 +609,11 @@ namespace __gnu_cxx
+@@ -538,14 +609,10 @@ namespace __gnu_cxx
      return 0;
    }
  
 +  // Compatibility
    void
 -  __pool<true>::_M_destroy_thread_key(void* __freelist_pos)
-+  __pool<true>::_M_destroy_thread_key(void* __freelist_pos
-+				      __attribute__((__unused__)))
++  __pool<true>::_M_destroy_thread_key(void*)
    {
 -    // Return this thread id record to front of thread_freelist.
 -    __gnu_cxx::lock sentry(__gnu_internal::freelist_mutex);

gcc4-pr20606.patch:
 except.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

Index: gcc4-pr20606.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4-pr20606.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gcc4-pr20606.patch	20 Jul 2005 16:48:35 -0000	1.1
+++ gcc4-pr20606.patch	27 Jul 2005 09:23:46 -0000	1.2
@@ -1,5 +1,6 @@
 2005-07-14  Andrew Haley  <aph at redhat.com>
 
+	PR middle-end/20606
 	* except.c (expand_end_java_handler): Insert an empty ASM_EXPR at
 	the start of each catch block.
 	

gcc4-vsb-stack.patch:
 c-pragma.c                      |   22 ++--
 doc/invoke.texi                 |    4 
 testsuite/gcc.dg/visibility-d.c |  205 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 219 insertions(+), 12 deletions(-)

Index: gcc4-vsb-stack.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4-vsb-stack.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gcc4-vsb-stack.patch	14 Jul 2005 18:50:49 -0000	1.1
+++ gcc4-vsb-stack.patch	27 Jul 2005 09:23:46 -0000	1.2
@@ -6,6 +6,11 @@
 
 	* doc/invoke.texi: Remove the nested visibility push limit.
 
+2005-07-22  Jakub Jelinek  <jakub at redhat.com>
+
+	PR middle-end/20303
+	* gcc.dg/visibility-d.c: New test.
+
 --- gcc/c-pragma.c.jj	2004-11-29 15:47:36.000000000 -0800
 +++ gcc/c-pragma.c	2005-05-18 09:14:46.000000000 -0700
 @@ -34,6 +34,7 @@ Software Foundation, 59 Temple Place - S
@@ -86,3 +91,211 @@
  part of the API interface contract} and thus all new code should
  always specify visibility when it is not the default ie; declarations
  only for use within the local DSO should @strong{always} be marked explicitly
+--- gcc/testsuite/gcc.dg/visibility-d.c.jj	2005-07-22 11:58:19.000000000 +0200
++++ gcc/testsuite/gcc.dg/visibility-d.c	2005-07-22 11:59:20.000000000 +0200
+@@ -0,0 +1,205 @@
++/* PR middle-end/20303 */
++/* Test nesting of #pragma GCC visibility. */
++/* { dg-do compile } */
++/* { dg-require-visibility "" } */
++/* { dg-final { scan-not-hidden "foo00" } } */
++/* { dg-final { scan-hidden "foo01" } } */
++/* { dg-final { scan-not-hidden "foo02" } } */
++/* { dg-final { scan-hidden "foo03" } } */
++/* { dg-final { scan-not-hidden "foo04" } } */
++/* { dg-final { scan-not-hidden "foo05" } } */
++/* { dg-final { scan-not-hidden "foo06" } } */
++/* { dg-final { scan-hidden "foo07" } } */
++/* { dg-final { scan-not-hidden "foo08" } } */
++/* { dg-final { scan-hidden "foo09" } } */
++/* { dg-final { scan-not-hidden "foo10" } } */
++/* { dg-final { scan-hidden "foo11" } } */
++/* { dg-final { scan-hidden "foo12" } } */
++/* { dg-final { scan-hidden "foo13" } } */
++/* { dg-final { scan-not-hidden "foo14" } } */
++/* { dg-final { scan-hidden "foo15" } } */
++/* { dg-final { scan-not-hidden "foo16" } } */
++/* { dg-final { scan-hidden "foo17" } } */
++/* { dg-final { scan-not-hidden "foo18" } } */
++/* { dg-final { scan-hidden "foo19" } } */
++/* { dg-final { scan-not-hidden "foo20" } } */
++/* { dg-final { scan-hidden "foo21" } } */
++/* { dg-final { scan-not-hidden "foo22" } } */
++/* { dg-final { scan-hidden "foo23" } } */
++/* { dg-final { scan-not-hidden "foo24" } } */
++/* { dg-final { scan-hidden "foo25" } } */
++/* { dg-final { scan-not-hidden "foo26" } } */
++/* { dg-final { scan-hidden "foo27" } } */
++/* { dg-final { scan-not-hidden "foo28" } } */
++/* { dg-final { scan-hidden "foo29" } } */
++/* { dg-final { scan-not-hidden "foo30" } } */
++/* { dg-final { scan-hidden "foo31" } } */
++/* { dg-final { scan-not-hidden "foo32" } } */
++/* { dg-final { scan-hidden "foo33" } } */
++/* { dg-final { scan-not-hidden "foo34" } } */
++/* { dg-final { scan-hidden "foo35" } } */
++/* { dg-final { scan-not-hidden "foo36" } } */
++/* { dg-final { scan-hidden "foo37" } } */
++/* { dg-final { scan-not-hidden "foo38" } } */
++/* { dg-final { scan-hidden "foo39" } } */
++/* { dg-final { scan-not-hidden "foo40" } } */
++/* { dg-final { scan-hidden "foo41" } } */
++/* { dg-final { scan-not-hidden "foo42" } } */
++/* { dg-final { scan-hidden "foo43" } } */
++/* { dg-final { scan-not-hidden "foo44" } } */
++/* { dg-final { scan-hidden "foo45" } } */
++/* { dg-final { scan-hidden "foo46" } } */
++/* { dg-final { scan-hidden "foo47" } } */
++/* { dg-final { scan-not-hidden "foo48" } } */
++/* { dg-final { scan-hidden "foo49" } } */
++/* { dg-final { scan-not-hidden "foo50" } } */
++/* { dg-final { scan-hidden "foo51" } } */
++/* { dg-final { scan-not-hidden "foo52" } } */
++/* { dg-final { scan-not-hidden "foo53" } } */
++/* { dg-final { scan-not-hidden "foo54" } } */
++/* { dg-final { scan-hidden "foo55" } } */
++/* { dg-final { scan-not-hidden "foo56" } } */
++/* { dg-final { scan-hidden "foo57" } } */
++/* { dg-final { scan-not-hidden "foo58" } } */
++/* { dg-final { scan-hidden "foo59" } } */
++
++#pragma GCC visibility push(default)
++void foo00();
++#pragma GCC visibility push(hidden)
++void foo01();
++#pragma GCC visibility push(default)
++void foo02();
++#pragma GCC visibility push(hidden)
++void foo03();
++#pragma GCC visibility push(default)
++void foo04();
++#pragma GCC visibility push(default)
++void foo05();
++#pragma GCC visibility push(default)
++void foo06();
++#pragma GCC visibility push(hidden)
++void foo07();
++#pragma GCC visibility push(default)
++void foo08();
++#pragma GCC visibility push(hidden)
++void foo09();
++#pragma GCC visibility push(default)
++void foo10();
++#pragma GCC visibility push(hidden)
++void foo11();
++#pragma GCC visibility push(hidden)
++void foo12();
++#pragma GCC visibility push(hidden)
++void foo13();
++#pragma GCC visibility push(default)
++void foo14();
++#pragma GCC visibility push(hidden)
++void foo15();
++#pragma GCC visibility push(default)
++void foo16();
++#pragma GCC visibility push(hidden)
++void foo17();
++#pragma GCC visibility push(default)
++void foo18();
++#pragma GCC visibility push(hidden)
++void foo19();
++#pragma GCC visibility push(default)
++void foo20();
++#pragma GCC visibility push(hidden)
++void foo21();
++#pragma GCC visibility push(default)
++void foo22();
++#pragma GCC visibility push(hidden)
++void foo23();
++#pragma GCC visibility push(default)
++void foo24();
++#pragma GCC visibility push(hidden)
++void foo25();
++#pragma GCC visibility push(default)
++void foo26();
++#pragma GCC visibility push(hidden)
++void foo27();
++#pragma GCC visibility push(default)
++void foo28();
++#pragma GCC visibility push(hidden)
++void foo29();
++#pragma GCC visibility pop
++void foo30();
++#pragma GCC visibility pop
++void foo31();
++#pragma GCC visibility pop
++void foo32();
++#pragma GCC visibility pop
++void foo33();
++#pragma GCC visibility pop
++void foo34();
++#pragma GCC visibility pop
++void foo35();
++#pragma GCC visibility pop
++void foo36();
++#pragma GCC visibility pop
++void foo37();
++#pragma GCC visibility pop
++void foo38();
++#pragma GCC visibility pop
++void foo39();
++#pragma GCC visibility pop
++void foo40();
++#pragma GCC visibility pop
++void foo41();
++#pragma GCC visibility pop
++void foo42();
++#pragma GCC visibility pop
++void foo43();
++#pragma GCC visibility pop
++void foo44();
++#pragma GCC visibility pop
++void foo45();
++#pragma GCC visibility pop
++void foo46();
++#pragma GCC visibility pop
++void foo47();
++#pragma GCC visibility pop
++void foo48();
++#pragma GCC visibility pop
++void foo49();
++#pragma GCC visibility pop
++void foo50();
++#pragma GCC visibility pop
++void foo51();
++#pragma GCC visibility pop
++void foo52();
++#pragma GCC visibility pop
++void foo53();
++#pragma GCC visibility pop
++void foo54();
++#pragma GCC visibility pop
++void foo55();
++#pragma GCC visibility pop
++void foo56();
++#pragma GCC visibility pop
++void foo57();
++#pragma GCC visibility pop
++void foo58();
++#pragma GCC visibility push (hidden)
++void foo59();
++#pragma GCC visibility pop
++#pragma GCC visibility pop
++
++#define D(N) \
++void foo##N##0() { } \
++void foo##N##1() { } \
++void foo##N##2() { } \
++void foo##N##3() { } \
++void foo##N##4() { } \
++void foo##N##5() { } \
++void foo##N##6() { } \
++void foo##N##7() { } \
++void foo##N##8() { } \
++void foo##N##9() { }
++D(0)
++D(1)
++D(2)
++D(3)
++D(4)
++D(5)


Index: gcc4.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- gcc4.spec	20 Jul 2005 16:48:35 -0000	1.59
+++ gcc4.spec	27 Jul 2005 09:23:46 -0000	1.60
@@ -1,6 +1,6 @@
-%define DATE 20050720
+%define DATE 20050727
 %define gcc_version 4.0.1
-%define gcc_release 4
+%define gcc_release 5
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} alpha ia64 x86_64 s390 sparc sparc64
@@ -38,6 +38,10 @@
 # Make sure pthread.h doesn't contain __thread tokens
 # Make sure glibc supports stack protector
 BuildRequires: glibc-devel >= 2.3.90-2
+%ifarch %{multilib_64_archs} sparc ppc
+# Ensure glibc{,-devel} is installed for both multilib arches
+BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
+%endif
 %if %{build_ada}
 # Ada requires Ada to build
 BuildRequires: gcc-gnat >= 3.1, libgnat >= 3.1
@@ -91,12 +95,11 @@
 Patch18: gcc4-ia64-stack-protector.patch
 Patch19: gcc4-s390-stack-protector.patch
 Patch20: gcc4-pr22052.patch
-Patch21: gcc4-fortran-bzbn.patch
-Patch22: gcc4-fortran-inf.patch
-Patch23: gcc4-fortran-data-range.patch
+Patch21: gcc4-fortran-equiv.patch
+Patch22: gcc4-pr21149-test.patch
+Patch23: gcc4-ppc32-msecure-plt.patch
 Patch24: gcc4-pr20606.patch
-Patch25: gcc4-pr21828.patch
-Patch26: gcc4-rh163058.patch
+Patch25: gcc4-pr22503.patch
 
 %define _gnu %{nil}
 %ifarch sparc
@@ -426,12 +429,11 @@
 %patch18 -p0 -b .ia64-stack-protector~
 %patch19 -p0 -b .s390-stack-protector~
 %patch20 -p0 -b .pr22052~
-%patch21 -p0 -b .fortran-bzbn~
-%patch22 -p0 -b .fortran-inf~
-%patch23 -p0 -b .fortran-data-range~
+%patch21 -p0 -b .fortran-equiv~
+%patch22 -p0 -b .pr21149-test~
+#%patch23 -p0 -b .ppc32-msecure-plt~
 %patch24 -p0 -b .pr20606~
-%patch25 -p0 -b .pr21828~
-%patch26 -p0 -b .rh163058~
+%patch25 -p0 -b .pr22503~
 
 perl -pi -e 's/4\.0\.2/4.0.1/' gcc/version.c
 perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
@@ -1456,6 +1458,19 @@
 %endif
 
 %changelog
+* Wed Jul 27 2005 Jakub Jelinek  <jakub at redhat.com> 4.0.1-5
+- update from CVS
+  - PRs tree-optimization/22591, fortran/16940, libfortran/22570,
+	libstdc++/23053, middle-end/16719, middle-end/18421,
+	target/21149, target/22576
+- fix fortran EQUIVALENCE handling with substrings (#160853,
+  PRs fortran/18833, fortran/20850)
+- improve fortran diagnostics for comparison of logicals (Volker Reichelt,
+  PR fortran/22503)
+- fix GCSE hoisting (Richard Sandiford, PR rtl-optimization/22167)
+- add BuildRequires that ensure glibc{,-devel} is installed for
+  both multilib arches where needed for GCC build (#114601)
+
 * Wed Jul 20 2005 Jakub Jelinek  <jakub at redhat.com> 4.0.1-4
 - update from CVS
   - PRs c++/22132, c++/22139, c++/22263, c/22421, fortran/13257,


--- gcc4-fortran-bzbn.patch DELETED ---


--- gcc4-fortran-data-range.patch DELETED ---


--- gcc4-fortran-inf.patch DELETED ---


--- gcc4-pr21828.patch DELETED ---


--- gcc4-rh163058.patch DELETED ---




More information about the fedora-cvs-commits mailing list