rpms/gcc/devel gcc43-ada-profiledbootstrap.patch, NONE, 1.1 gcc43-pr29978.patch, NONE, 1.1 gcc43-pr34003.patch, NONE, 1.1 .cvsignore, 1.215, 1.216 gcc43.spec, 1.2, 1.3 sources, 1.217, 1.218

Jakub Jelinek (jakub) fedora-extras-commits at redhat.com
Fri Dec 14 18:01:21 UTC 2007


Author: jakub

Update of /cvs/pkgs/rpms/gcc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31571/devel

Modified Files:
	.cvsignore gcc43.spec sources 
Added Files:
	gcc43-ada-profiledbootstrap.patch gcc43-pr29978.patch 
	gcc43-pr34003.patch 
Log Message:
4.3.0-0.3


gcc43-ada-profiledbootstrap.patch:

--- NEW FILE gcc43-ada-profiledbootstrap.patch ---
--- gcc/ada/Make-lang.in.jj	2007-12-07 14:47:58.000000000 +0100
+++ gcc/ada/Make-lang.in	2007-12-14 13:20:46.000000000 +0100
@@ -286,11 +286,11 @@ TARGET_ADA_SRCS =
 # Since the RTL should be built with the latest compiler, remove the
 #  stamp target in the parent directory whenever gnat1 is rebuilt
 gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBDEPS)
-	$(GCC_LINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBS) $(SYSLIBS)
+	$(GCC_LINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) $(ALL_CFLAGS) $(LIBS) $(SYSLIBS)
 	$(RM) stamp-gnatlib2 stamp-tools
 
 gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS)
-	$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) $(LIBS) $(SYSLIBS)
+	$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) $(ALL_CFLAGS) $(LIBS) $(SYSLIBS)
 
 # use cross-gcc
 gnat-cross: force

gcc43-pr29978.patch:

--- NEW FILE gcc43-pr29978.patch ---
2007-12-14  Jakub Jelinek  <jakub at redhat.com>

	PR target/29978
	* config/i386/i386.c (ix86_expand_branch): Optimize LE/LEU/GT/GTU
	DImode comparisons against constant with all 1's in the lower word.

	* gcc.target/i386/pr29978.c: New test.

--- gcc/config/i386/i386.c.jj	2007-12-14 00:26:23.000000000 +0100
+++ gcc/config/i386/i386.c	2007-12-14 14:14:51.000000000 +0100
@@ -12093,16 +12093,28 @@ ix86_expand_branch (enum rtx_code code, 
 
 	/* Otherwise, if we are doing less-than or greater-or-equal-than,
 	   op1 is a constant and the low word is zero, then we can just
-	   examine the high word.  */
+	   examine the high word.  Similarly for low word -1 and
+	   less-or-equal-than or greater-than.  */
 
-	if (CONST_INT_P (hi[1]) && lo[1] == const0_rtx)
+	if (CONST_INT_P (hi[1]))
 	  switch (code)
 	    {
 	    case LT: case LTU: case GE: case GEU:
-	      ix86_compare_op0 = hi[0];
-	      ix86_compare_op1 = hi[1];
-	      ix86_expand_branch (code, label);
-	      return;
+	      if (lo[1] == const0_rtx)
+		{
+		  ix86_compare_op0 = hi[0];
+		  ix86_compare_op1 = hi[1];
+		  ix86_expand_branch (code, label);
+		  return;
+		}
+	    case LE: case LEU: case GT: case GTU:
+	      if (lo[1] == constm1_rtx)
+		{
+		  ix86_compare_op0 = hi[0];
+		  ix86_compare_op1 = hi[1];
+		  ix86_expand_branch (code, label);
+		  return;
+		}
 	    default:
 	      break;
 	    }
--- gcc/testsuite/gcc.target/i386/pr29978.c.jj	2007-12-14 14:26:17.000000000 +0100
+++ gcc/testsuite/gcc.target/i386/pr29978.c	2007-12-14 14:26:04.000000000 +0100
@@ -0,0 +1,16 @@
+/* PR target/29978 */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+void g ();
+
+void
+f (long long v)
+{
+  if (v > 0xfffffffffLL)
+    g ();
+  g ();
+}
+
+/* Verify there are no redundant jumps jl .L2; jle .L2 */
+/* { dg-final { scan-assembler-not "jl\[^e\]*\\.L" { target ilp32 } } } */

gcc43-pr34003.patch:

--- NEW FILE gcc43-pr34003.patch ---
2007-12-13  Jakub Jelinek  <jakub at redhat.com>

	PR bootstrap/34003
	* c-decl.c (merge_decls): Copy RTL from olddecl to newdecl.
	* config/pa/pa.c (pa_encode_section_info): If !first, preserve
	SYMBOL_FLAG_REFERENCED flag.

	* gcc.dg/pr34003-1.c: New test.
	* gcc.dg/pr34003-2.c: New.

--- gcc/c-decl.c.jj	2007-11-26 22:14:08.000000000 +0100
+++ gcc/c-decl.c	2007-12-13 20:11:33.000000000 +0100
@@ -1670,6 +1670,9 @@ merge_decls (tree newdecl, tree olddecl,
 	}
     }
 
+  /* Keep the old rtl since we can safely use it.  */
+  if (HAS_RTL_P (olddecl))
+    COPY_DECL_RTL (olddecl, newdecl);
 
   /* Merge the type qualifiers.  */
   if (TREE_READONLY (newdecl))
--- gcc/config/pa/pa.c.jj	2007-12-13 18:56:21.000000000 +0100
+++ gcc/config/pa/pa.c	2007-12-13 20:32:04.000000000 +0100
@@ -7834,6 +7834,12 @@ hppa_encode_label (rtx sym)
 static void
 pa_encode_section_info (tree decl, rtx rtl, int first)
 {
+  int old_referenced = 0;
+
+  if (!first && MEM_P (rtl) && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF)
+    old_referenced
+      = SYMBOL_REF_FLAGS (XEXP (rtl, 0)) & SYMBOL_FLAG_REFERENCED;
+
   default_encode_section_info (decl, rtl, first);
 
   if (first && TEXT_SPACE_P (decl))
@@ -7842,6 +7848,8 @@ pa_encode_section_info (tree decl, rtx r
       if (TREE_CODE (decl) == FUNCTION_DECL)
 	hppa_encode_label (XEXP (rtl, 0));
     }
+  else if (old_referenced)
+    SYMBOL_REF_FLAGS (XEXP (rtl, 0)) |= old_referenced;
 }
 
 /* This is sort of inverse to pa_encode_section_info.  */
--- gcc/testsuite/gcc.dg/pr34003-1.c.jj	2007-12-13 21:07:51.000000000 +0100
+++ gcc/testsuite/gcc.dg/pr34003-1.c	2007-12-13 21:07:15.000000000 +0100
@@ -0,0 +1,8 @@
+/* PR bootstrap/34003 */
+/* { dg-do link } */
+/* { dg-options "-O0" } */
+/* { dg-additional-sources "pr34003-2.c" } */
+
+extern void foo (void);
+int bar (void) { foo (); return 1; }
+extern void foo (void);
--- gcc/testsuite/gcc.dg/pr34003-2.c.jj	2007-12-13 21:07:59.000000000 +0100
+++ gcc/testsuite/gcc.dg/pr34003-2.c	2007-12-13 21:09:35.000000000 +0100
@@ -0,0 +1,20 @@
+/* PR bootstrap/34003 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+extern void abort (void);
+
+int seen = 0;
+
+void foo (void)
+{
+  ++seen;
+}
+
+int main (void)
+{
+  extern int bar (void);
+  if (bar () != 1 || seen != 1)
+    abort ();
+  return 0;
+}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -r1.215 -r1.216
--- .cvsignore	12 Dec 2007 20:16:35 -0000	1.215
+++ .cvsignore	14 Dec 2007 18:00:42 -0000	1.216
@@ -1 +1,2 @@
 gcc-4.3.0-20071212.tar.bz2
+fastjar-0.95.tar.gz


Index: gcc43.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/gcc43.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gcc43.spec	12 Dec 2007 23:29:33 -0000	1.2
+++ gcc43.spec	14 Dec 2007 18:00:42 -0000	1.3
@@ -1,6 +1,6 @@
 %define DATE 20071212
 %define gcc_version 4.3.0
-%define gcc_release 0.2
+%define gcc_release 0.3
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %define include_gappletviewer 1
@@ -41,6 +41,8 @@
 Source1: libgcc_post_upgrade.c
 Source2: README.libgcjwebplugin.so
 Source3: protoize.1
+%define fastjar_ver 0.95
+Source4: http://download.savannah.nongnu.org/releases/fastjar/fastjar-%{fastjar_ver}.tar.gz
 URL: http://gcc.gnu.org
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 # Need binutils with -pie support >= 2.14.90.0.4-4
@@ -140,6 +142,9 @@
 Patch13: gcc43-libjava-test.patch
 Patch14: gcc43-pr34427.patch
 Patch15: gcc43-libjava-gcjpath.patch
+Patch16: gcc43-pr34003.patch
+Patch17: gcc43-ada-profiledbootstrap.patch
+Patch18: gcc43-pr29978.patch
 
 # On ARM EABI systems, we do want -gnueabi to be part of the
 # target triple.
@@ -438,13 +443,18 @@
 %patch13 -p0 -b .libjava-test~
 %patch14 -p0 -E -b .pr34427~
 %patch15 -p0 -b .libjava-gcjpath~
+%patch16 -p0 -b .pr34003~
+%patch17 -p0 -b .ada-profiledbootstrap~
+%patch18 -p0 -b .pr29978~
+
+tar xzf %{SOURCE4}
 
 %if %{bootstrap_java}
 tar xjf %{SOURCE10}
 %endif
 
 sed -i -e 's/4\.3\.0/4.3.0/' gcc/BASE-VER
-echo '(Red Hat %{version}-%{gcc_release})' > gcc/DEV-PHASE
+echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
 
 cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
 
@@ -477,6 +487,17 @@
 
 %build
 
+%if %{build_java}
+# gjar isn't usable, so even when GCC source tree no longer includes
+# fastjar, build it anyway.
+mkdir fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
+cd fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
+../configure CFLAGS="$RPM_OPT_FLAGS" --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir}
+make %{?_smp_mflags}
+export PATH=`pwd`${PATH:+:$PATH}
+cd ../../
+%endif
+
 rm -fr obj-%{gcc_target_platform}
 mkdir obj-%{gcc_target_platform}
 cd obj-%{gcc_target_platform}
@@ -634,7 +655,7 @@
 # Copy various doc files here and there
 cd ..
 mkdir -p rpm.doc/gfortran rpm.doc/objc
-mkdir -p rpm.doc/boehm-gc rpm.doc/libffi rpm.doc/libjava
+mkdir -p rpm.doc/boehm-gc rpm.doc/fastjar rpm.doc/libffi rpm.doc/libjava
 mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/java,gcc/ada,libstdc++-v3,libobjc,libmudflap,libgomp}
 sed -e 's, at VERSION@,%{gcc_version},' %{SOURCE2} > rpm.doc/README.libgcjwebplugin.so
 
@@ -657,6 +678,9 @@
 (cd boehm-gc; for i in ChangeLog*; do
 	cp -p $i ../rpm.doc/boehm-gc/$i.gc
 done)
+(cd fastjar-%{fastjar_ver}; for i in ChangeLog* README*; do
+	cp -p $i ../rpm.doc/fastjar/$i.fastjar
+done)
 (cd libffi; for i in ChangeLog* README* LICENSE; do
 	cp -p $i ../rpm.doc/libffi/$i.libffi
 done)
@@ -690,6 +714,7 @@
 fi
 
 %if %{build_java}
+export PATH=`pwd`/../fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}${PATH:+:$PATH}
 %if !%{bootstrap_java}
 export PATH=`pwd`/java_hacks${PATH:+:$PATH}
 %endif
@@ -820,6 +845,10 @@
 fi
 
 %if %{build_java}
+pushd ../fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
+make install DESTDIR=$RPM_BUILD_ROOT
+popd
+
 if [ "%{_lib}" != "lib" ]; then
   mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_lib}/pkgconfig
   sed '/^libdir/s/lib$/%{_lib}/' $RPM_BUILD_ROOT%{_prefix}/lib/pkgconfig/libgcj-*.pc \
@@ -1112,11 +1141,15 @@
 /sbin/ldconfig
 /sbin/install-info \
   --info-dir=%{_infodir} %{_infodir}/cp-tools.info.gz || :
+/sbin/install-info \
+  --info-dir=%{_infodir} %{_infodir}/fastjar.info.gz || :
 
 %preun -n libgcj
 if [ $1 = 0 ]; then
   /sbin/install-info --delete \
     --info-dir=%{_infodir} %{_infodir}/cp-tools.info.gz || :
+  /sbin/install-info --delete \
+    --info-dir=%{_infodir} %{_infodir}/fastjar.info.gz || :
 fi
 
 %postun -n libgcj -p /sbin/ldconfig
@@ -1465,6 +1498,8 @@
 %{_prefix}/bin/jv-convert
 %{_prefix}/bin/gij
 %{_prefix}/bin/gjar
+%{_prefix}/bin/fastjar
+%{_prefix}/bin/grepjar
 %{_prefix}/bin/grmic
 %{_prefix}/bin/grmid
 %{_prefix}/bin/grmiregistry
@@ -1478,6 +1513,8 @@
 %{_mandir}/man1/gappletviewer.1*
 %endif
 %{_prefix}/bin/gjarsigner
+%{_mandir}/man1/fastjar.1*
+%{_mandir}/man1/grepjar.1*
 %{_mandir}/man1/gjar.1*
 %{_mandir}/man1/gjarsigner.1*
 %{_mandir}/man1/jv-convert.1*
@@ -1490,6 +1527,7 @@
 %{_mandir}/man1/grmid.1*
 %{_mandir}/man1/gserialver.1*
 %{_mandir}/man1/gtnameserv.1*
+%{_infodir}/fastjar.info*
 %{_infodir}/cp-tools.info*
 %{_prefix}/%{_lib}/libgcj.so.*
 %{_prefix}/%{_lib}/libgcj-tools.so.*
@@ -1546,7 +1584,7 @@
 %{_prefix}/include/c++/%{gcc_version}/org
 %{_prefix}/include/c++/%{gcc_version}/sun
 %{_prefix}/%{_lib}/pkgconfig/libgcj-*.pc
-%doc rpm.doc/boehm-gc/* rpm.doc/libffi/*
+%doc rpm.doc/boehm-gc/* rpm.doc/fastjar/* rpm.doc/libffi/*
 %doc rpm.doc/libjava/*
 
 %files -n libgcj-src
@@ -1615,6 +1653,10 @@
 %doc rpm.doc/changelogs/libmudflap/ChangeLog*
 
 %changelog
+* Fri Dec 14 2007 Jakub Jelinek <jakub at redhat.com> 4.3.0-0.3
+- build fastjar, gjar is uncomparably worse
+- fix profiledbootstrap and use it
+
 * Wed Dec 12 2007 Jakub Jelinek <jakub at redhat.com> 4.3.0-0.2
 - update from the trunk
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/sources,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -r1.217 -r1.218
--- sources	12 Dec 2007 20:16:35 -0000	1.217
+++ sources	14 Dec 2007 18:00:42 -0000	1.218
@@ -1 +1,2 @@
 65ac33620b3605f6c612b8591d7f7fa1  gcc-4.3.0-20071212.tar.bz2
+92a70f9e56223b653bce0f58f90cf950  fastjar-0.95.tar.gz




More information about the fedora-extras-commits mailing list