Hello community, here is the log from the commit of package gcc42 checked in at Thu Mar 29 00:38:54 CEST 2007. -------- --- gcc42/cross-avr-gcc42.changes 2007-01-16 10:33:08.000000000 +0100 +++ /mounts/work_src_done/STABLE/gcc42/cross-avr-gcc42.changes 2007-03-27 18:29:42.000000000 +0200 @@ -1,0 +2,46 @@ +Tue Mar 27 18:28:42 CEST 2007 - rguenther@suse.de + +- Update to SVN branch head (r123261). [#256074] + +------------------------------------------------------------------- +Mon Mar 26 11:59:42 CEST 2007 - rguenther@suse.de + +- Fix misplaced %endif. +- Add zlib-devel BuildRequires. + +------------------------------------------------------------------- +Wed Mar 21 14:07:26 CET 2007 - rguenther@suse.de + +- Remove %versionspecificlibs define and dead parts of the spec file. + +------------------------------------------------------------------- +Sun Mar 18 11:01:35 CET 2007 - schwab@suse.de + +- Fix parsing of binutils version string also in libgomp. + +------------------------------------------------------------------- +Tue Mar 13 13:08:50 CET 2007 - rguenther@suse.de + +- Update to SVN branch head (r122880) + * includes -Wstrict-overflow support + * includes warning for C99 inline changes + +------------------------------------------------------------------- +Wed Feb 28 13:29:36 CET 2007 - dmueller@suse.de + +- Update to SVN branch head (r122404) + * includes backport for PR30636 + * removed several upstreamed patches +- update fortify patch (#246879) +- fix parsing of new binutils version string +- fix mathematical parentheses warning + +------------------------------------------------------------------- +Tue Jan 30 18:17:35 CET 2007 - rguenther@suse.de + +- Update to suse-gcc-4_2-branch head (r121459). +- Add patch for -ffortify +- Add patch for PR27657. +- Filter -ffortify and -fstack-protector from RPM_OPT_FLAGS. + +------------------------------------------------------------------- gcc42.changes: same change libgcj42.changes: same change Old: ---- AMD-0201.patch gcc-4.2.0-20070115.tar.bz2 pr29943.diff New: ---- fortify-2.diff gcc-4.2.0-20070327.tar.bz2 parentheses-mathematical-41.diff revert-mdim-fold-fix-for-ia64-bootstrap.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-avr-gcc42.spec ++++++ --- /var/tmp/diff_new_pack.i20014/_old 2007-03-29 00:35:45.000000000 +0200 +++ /var/tmp/diff_new_pack.i20014/_new 2007-03-29 00:35:45.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package cross-avr-gcc42 (Version 4.2.0_20070115) +# spec file for package cross-avr-gcc42 (Version 4.2.0_20070327) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -26,12 +26,11 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc URL: http://gcc.gnu.org/ License: BSD License and BSD-like, GNU General Public License (GPL) -Version: 4.2.0_20070115 -Release: 1 +Version: 4.2.0_20070327 +Release: 2 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.2 -%define versionspecificlibs 0 # COMMON-END # COMMON-BEGIN Group: Development/Languages/C and C++ @@ -40,17 +39,19 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec +Source100: README.First-for.SuSE.packagers Patch1: bug-reporting.patch Patch2: gcc-noalias-warn.diff Patch5: boehm-gc-strict-aliasing.patch Patch7: acats-timeout.patch +# hack to get ia64 bootstrapping again +Patch9: revert-mdim-fold-fix-for-ia64-bootstrap.diff Patch10: program-transform-name.diff Patch12: gcc4-ppc64-m32-m64-multilib-only.patch Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch38: large-gcc.diff Patch40: pr27880.diff -Patch41: pr29943.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -59,9 +60,11 @@ # Random stuff Patch70: gcc42-ssse3.patch # AMD stuff -Patch101: AMD-0201.patch Patch102: fold-floor.patch Patch104: pr3511.patch +# Enhancements +Patch200: fortify-2.diff +Patch201: parentheses-mathematical-41.diff # LIBJAVA-DELETE-BEGIN %description @@ -98,6 +101,7 @@ %patch2 %patch5 %patch7 +%patch9 %patch10 %if !%{build_nof} %patch12 @@ -106,16 +110,16 @@ %patch24 #%patch38 %patch40 -%patch41 %patch51 %patch55 %patch57 #%patch52 %patch70 -%patch101 cd gcc %patch102 %patch104 +%patch200 +%patch201 -p1 cd .. %build @@ -127,7 +131,7 @@ mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" -RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g'` +RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops @@ -281,7 +285,32 @@ %defattr(-,root,root) %{_prefix} -%changelog -n cross-avr-gcc42 +%changelog +* Tue Mar 27 2007 - rguenther@suse.de +- Update to SVN branch head (r123261). [#256074] +* Mon Mar 26 2007 - rguenther@suse.de +- Fix misplaced %%endif. +- Add zlib-devel BuildRequires. +* Wed Mar 21 2007 - rguenther@suse.de +- Remove %%versionspecificlibs define and dead parts of the spec file. +* Sun Mar 18 2007 - schwab@suse.de +- Fix parsing of binutils version string also in libgomp. +* Tue Mar 13 2007 - rguenther@suse.de +- Update to SVN branch head (r122880) + * includes -Wstrict-overflow support + * includes warning for C99 inline changes +* Wed Feb 28 2007 - dmueller@suse.de +- Update to SVN branch head (r122404) + * includes backport for PR30636 + * removed several upstreamed patches +- update fortify patch (#246879) +- fix parsing of new binutils version string +- fix mathematical parentheses warning +* Tue Jan 30 2007 - rguenther@suse.de +- Update to suse-gcc-4_2-branch head (r121459). +- Add patch for -ffortify +- Add patch for PR27657. +- Filter -ffortify and -fstack-protector from RPM_OPT_FLAGS. * Mon Jan 15 2007 - rguenther@suse.de - Update to SVN branch head (r120796). * Mon Jan 15 2007 - schwab@suse.de ++++++ gcc42.spec ++++++ --- /var/tmp/diff_new_pack.i20014/_old 2007-03-29 00:35:45.000000000 +0200 +++ /var/tmp/diff_new_pack.i20014/_new 2007-03-29 00:35:45.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package gcc42 (Version 4.2.0_20070115) +# spec file for package gcc42 (Version 4.2.0_20070327) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -42,7 +42,7 @@ %define build_objcp 0 %define run_tests 0 %endif -BuildRequires: bison flex gettext-devel glibc-devel-32bit texinfo +BuildRequires: bison flex gettext-devel glibc-devel-32bit texinfo zlib-devel %if %{build_ada} BuildRequires: gcc-ada %endif @@ -102,12 +102,11 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc URL: http://gcc.gnu.org/ License: GNU General Public License (GPL) -Version: 4.2.0_20070115 -Release: 1 +Version: 4.2.0_20070327 +Release: 2 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.2 -%define versionspecificlibs 0 # COMMON-END %if 0%{?!building_libjava:1} Requires: binutils glibc-devel @@ -123,17 +122,19 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec +Source100: README.First-for.SuSE.packagers Patch1: bug-reporting.patch Patch2: gcc-noalias-warn.diff Patch5: boehm-gc-strict-aliasing.patch Patch7: acats-timeout.patch +# hack to get ia64 bootstrapping again +Patch9: revert-mdim-fold-fix-for-ia64-bootstrap.diff Patch10: program-transform-name.diff Patch12: gcc4-ppc64-m32-m64-multilib-only.patch Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch38: large-gcc.diff Patch40: pr27880.diff -Patch41: pr29943.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -142,9 +143,11 @@ # Random stuff Patch70: gcc42-ssse3.patch # AMD stuff -Patch101: AMD-0201.patch Patch102: fold-floor.patch Patch104: pr3511.patch +# Enhancements +Patch200: fortify-2.diff +Patch201: parentheses-mathematical-41.diff # LIBJAVA-DELETE-BEGIN %description @@ -816,24 +819,10 @@ %ifarch ppc64 %define versnoflibdir %{libsubdir}/32/nof %endif -%if %{versionspecificlibs} -%define mainlibdir %{libsubdir} -%define mainlibdirbi32 %{libsubdir}/32 -%define mainlibdirbi64 %{libsubdir}/64 -%ifarch ppc -%define noflibdir %{libsubdir}/nof -%define mainlibdirbi32 %{libsubdir} -%define mainlibdirbi64 %{libsubdir}/64 -%endif -%ifarch ppc64 -%define noflibdir %{libsubdir}/32/nof -%endif -%else %define mainlibdir %{_libdir} %define mainlibdirbi32 %{_prefix}/lib %define mainlibdirbi64 %{_prefix}/lib64 %define noflibdir %{_prefix}/lib/nof -%endif %if %{build_nof} %define mainlib() %{mainlibdir}/%1\ %{noflibdir}/%1\ @@ -944,6 +933,7 @@ %patch2 %patch5 %patch7 +%patch9 %patch10 %if !%{build_nof} %patch12 @@ -952,16 +942,16 @@ %patch24 #%patch38 %patch40 -%patch41 %patch51 %patch55 %patch57 #%patch52 %patch70 -%patch101 cd gcc %patch102 %patch104 +%patch200 +%patch201 -p1 cd .. %build @@ -973,7 +963,7 @@ mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" -RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g'` +RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops @@ -1193,8 +1183,6 @@ done # LIBJAVA-DELETE-END # Move shared libs around -%if %{versionspecificlibs} -%else # libjava possibly breaks, ada is broken for libname in \ %if %{build_libjava} @@ -1238,7 +1226,6 @@ %endif %endif done -%endif # Move libgcc_s around rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so @@ -1256,8 +1243,8 @@ ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s} %endif -# LIBJAVA-DELETE-END %endif +# LIBJAVA-DELETE-END %if %{build_ada} mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir} ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir} && echo libgnarl-*.so) $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so @@ -1394,16 +1381,6 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1 rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-scan%{binsuffix}.1 %endif -# Delete some files... -%if %{versionspecificlibs} -%if %{build_libjava} -rm $RPM_BUILD_ROOT%{_libdir}/logging.properties -rm $RPM_BUILD_ROOT%{_libdir}/security/classpath.security -rm $RPM_BUILD_ROOT%{_libdir}/security/libgcj.security -%endif -rm $RPM_BUILD_ROOT%{_infodir}/*.info* -rm $RPM_BUILD_ROOT%{_prefix}/share/locale/*/LC_MESSAGES/*.mo -%endif # LIBJAVA-DELETE-BEGIN %post info @@ -1412,6 +1389,7 @@ %install_info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz +%install_info --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz %if %{build_fortran} %install_info --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz %endif @@ -1430,6 +1408,7 @@ %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz +%install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz %if %{build_fortran} %install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz %endif @@ -1548,7 +1527,6 @@ %versbiarchlib libgomp.spec %endif -%if !%{versionspecificlibs} %files locale %defattr(-,root,root) @@ -1558,7 +1536,6 @@ %if 0%{!?build_for_base:1} %{_prefix}/share/locale/*/LC_MESSAGES/libstdc++.mo %endif -%endif %files c++ %defattr(-,root,root) @@ -1595,11 +1572,6 @@ %files -n libgcc42 %defattr(-,root,root) -%if %{versionspecificlibs} - -%versmainlib libgcc_s.so.%{libgcc_s} -%else -# not versionspecificlibs /%{_lib}/libgcc_s.so.%{libgcc_s} %if %{build_nof} %dir /lib/nof @@ -1616,29 +1588,18 @@ %endif %endif %endif -%endif %if %{separate_bi64} %files -n libgcc42-64bit %defattr(-,root,root) -%if %{versionspecificlibs} - -%versbiarchlib libgcc_s.so.%{libgcc_s} -%else /lib64/libgcc_s.so.%{libgcc_s} %endif -%endif %if %{separate_bi32} %files -n libgcc42-32bit %defattr(-,root,root) -%if %{versionspecificlibs} - -%versbiarchlib libgcc_s.so.%{libgcc_s} -%else /lib/libgcc_s.so.%{libgcc_s} %endif -%endif %files -n libgomp42 %defattr(-,root,root) @@ -1721,7 +1682,6 @@ %biarchlib libmudflapth.so.* %endif -%if !%{versionspecificlibs} %files info %defattr(-,root,root) @@ -1730,6 +1690,7 @@ %doc %{_infodir}/gcc.info*.gz %doc %{_infodir}/gccint.info*.gz %doc %{_infodir}/gccinstall.info*.gz +%doc %{_infodir}/libgomp.info*.gz %if %{build_fortran} %doc %{_infodir}/gfortran.info*.gz %endif @@ -1741,7 +1702,6 @@ %doc %{_infodir}/gnat_rm.info*gz %doc %{_infodir}/gnat_ugn_unw.info*gz %endif -%endif %files -n cpp42 %defattr(-,root,root) @@ -1839,11 +1799,9 @@ %{_prefix}/share/java/libgcj-%{gcc_version}.jar %{_prefix}/share/java/libgcj-tools-%{gcc_version}.jar %{_libdir}/gcj-%{gcc_version}/classmap.db -%if !%{versionspecificlibs} %dir %{_libdir}/security %{_libdir}/security/classpath.security #%{_libdir}/security/libgcj.security -%endif # We usually do not multilib libjava %if %{biarch_libjava} @@ -1864,9 +1822,7 @@ %{_libdir}/gcj-%{gcc_version}/libjvm.la %{_libdir}/gcj-%{gcc_version}/libjvm.so %endif -%if !%{versionspecificlibs} %{_libdir}/logging.properties -%endif %files -n libgcj42-devel %defattr(-,root,root) @@ -1975,7 +1931,32 @@ %doc testresults/*.log %endif -%changelog -n gcc42 +%changelog +* Tue Mar 27 2007 - rguenther@suse.de +- Update to SVN branch head (r123261). [#256074] +* Mon Mar 26 2007 - rguenther@suse.de +- Fix misplaced %%endif. +- Add zlib-devel BuildRequires. +* Wed Mar 21 2007 - rguenther@suse.de +- Remove %%versionspecificlibs define and dead parts of the spec file. +* Sun Mar 18 2007 - schwab@suse.de +- Fix parsing of binutils version string also in libgomp. +* Tue Mar 13 2007 - rguenther@suse.de +- Update to SVN branch head (r122880) + * includes -Wstrict-overflow support + * includes warning for C99 inline changes +* Wed Feb 28 2007 - dmueller@suse.de +- Update to SVN branch head (r122404) + * includes backport for PR30636 + * removed several upstreamed patches +- update fortify patch (#246879) +- fix parsing of new binutils version string +- fix mathematical parentheses warning +* Tue Jan 30 2007 - rguenther@suse.de +- Update to suse-gcc-4_2-branch head (r121459). +- Add patch for -ffortify +- Add patch for PR27657. +- Filter -ffortify and -fstack-protector from RPM_OPT_FLAGS. * Mon Jan 15 2007 - rguenther@suse.de - Update to SVN branch head (r120796). * Mon Jan 15 2007 - schwab@suse.de ++++++ libgcj42.spec ++++++ --- /var/tmp/diff_new_pack.i20014/_old 2007-03-29 00:35:45.000000000 +0200 +++ /var/tmp/diff_new_pack.i20014/_new 2007-03-29 00:35:45.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package libgcj42 (Version 4.2.0_20070115) +# spec file for package libgcj42 (Version 4.2.0_20070327) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -54,7 +54,7 @@ %define build_objcp 0 %define run_tests 0 %endif -BuildRequires: bison flex gettext-devel glibc-devel-32bit texinfo +BuildRequires: bison flex gettext-devel glibc-devel-32bit texinfo zlib-devel %if %{build_ada} BuildRequires: gcc-ada %endif @@ -114,12 +114,11 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc Url: http://gcc.gnu.org/ License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL) -Version: 4.2.0_20070115 -Release: 1 +Version: 4.2.0_20070327 +Release: 2 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.2 -%define versionspecificlibs 0 # COMMON-END %if 0%{?!building_libjava:1} Requires: binutils glibc-devel @@ -135,17 +134,19 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec +Source100: README.First-for.SuSE.packagers Patch1: bug-reporting.patch Patch2: gcc-noalias-warn.diff Patch5: boehm-gc-strict-aliasing.patch Patch7: acats-timeout.patch +# hack to get ia64 bootstrapping again +Patch9: revert-mdim-fold-fix-for-ia64-bootstrap.diff Patch10: program-transform-name.diff Patch12: gcc4-ppc64-m32-m64-multilib-only.patch Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch38: large-gcc.diff Patch40: pr27880.diff -Patch41: pr29943.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -154,9 +155,11 @@ # Random stuff Patch70: gcc42-ssse3.patch # AMD stuff -Patch101: AMD-0201.patch Patch102: fold-floor.patch Patch104: pr3511.patch +# Enhancements +Patch200: fortify-2.diff +Patch201: parentheses-mathematical-41.diff Summary: Java Runtime Library for gcc Group: System/Libraries Provides: libgcj8 = %{version}-%{release} @@ -303,24 +306,10 @@ %ifarch ppc64 %define versnoflibdir %{libsubdir}/32/nof %endif -%if %{versionspecificlibs} -%define mainlibdir %{libsubdir} -%define mainlibdirbi32 %{libsubdir}/32 -%define mainlibdirbi64 %{libsubdir}/64 -%ifarch ppc -%define noflibdir %{libsubdir}/nof -%define mainlibdirbi32 %{libsubdir} -%define mainlibdirbi64 %{libsubdir}/64 -%endif -%ifarch ppc64 -%define noflibdir %{libsubdir}/32/nof -%endif -%else %define mainlibdir %{_libdir} %define mainlibdirbi32 %{_prefix}/lib %define mainlibdirbi64 %{_prefix}/lib64 %define noflibdir %{_prefix}/lib/nof -%endif %if %{build_nof} %define mainlib() %{mainlibdir}/%1\ %{noflibdir}/%1\ @@ -431,6 +420,7 @@ %patch2 %patch5 %patch7 +%patch9 %patch10 %if !%{build_nof} %patch12 @@ -439,16 +429,16 @@ %patch24 #%patch38 %patch40 -%patch41 %patch51 %patch55 %patch57 #%patch52 %patch70 -%patch101 cd gcc %patch102 %patch104 +%patch200 +%patch201 -p1 cd .. %build @@ -460,7 +450,7 @@ mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" -RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g'` +RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops @@ -643,8 +633,6 @@ %endif %endif # Move shared libs around -%if %{versionspecificlibs} -%else # libjava possibly breaks, ada is broken for libname in \ %if %{build_libjava} @@ -660,7 +648,6 @@ %endif %endif done -%endif %if %{build_ada} mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir} ln -sf %{_libdir}/$(cd $RPM_BUILD_ROOT%{_libdir} && echo libgnarl-*.so) $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so @@ -797,16 +784,6 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1 rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-scan%{binsuffix}.1 %endif -# Delete some files... -%if %{versionspecificlibs} -%if %{build_libjava} -rm $RPM_BUILD_ROOT%{_libdir}/logging.properties -rm $RPM_BUILD_ROOT%{_libdir}/security/classpath.security -rm $RPM_BUILD_ROOT%{_libdir}/security/libgcj.security -%endif -rm $RPM_BUILD_ROOT%{_infodir}/*.info* -rm $RPM_BUILD_ROOT%{_prefix}/share/locale/*/LC_MESSAGES/*.mo -%endif %if %{build_java} %if %{build_libjava} @@ -816,11 +793,9 @@ %{_prefix}/share/java/libgcj-%{gcc_version}.jar %{_prefix}/share/java/libgcj-tools-%{gcc_version}.jar %{_libdir}/gcj-%{gcc_version}/classmap.db -%if !%{versionspecificlibs} %dir %{_libdir}/security %{_libdir}/security/classpath.security #%{_libdir}/security/libgcj.security -%endif # We usually do not multilib libjava %if %{biarch_libjava} @@ -841,9 +816,7 @@ %{_libdir}/gcj-%{gcc_version}/libjvm.la %{_libdir}/gcj-%{gcc_version}/libjvm.so %endif -%if !%{versionspecificlibs} %{_libdir}/logging.properties -%endif %files -n libgcj42-devel %defattr(-,root,root) @@ -952,7 +925,32 @@ %doc testresults/*.log %endif -%changelog -n libgcj42 +%changelog +* Tue Mar 27 2007 - rguenther@suse.de +- Update to SVN branch head (r123261). [#256074] +* Mon Mar 26 2007 - rguenther@suse.de +- Fix misplaced %%endif. +- Add zlib-devel BuildRequires. +* Wed Mar 21 2007 - rguenther@suse.de +- Remove %%versionspecificlibs define and dead parts of the spec file. +* Sun Mar 18 2007 - schwab@suse.de +- Fix parsing of binutils version string also in libgomp. +* Tue Mar 13 2007 - rguenther@suse.de +- Update to SVN branch head (r122880) + * includes -Wstrict-overflow support + * includes warning for C99 inline changes +* Wed Feb 28 2007 - dmueller@suse.de +- Update to SVN branch head (r122404) + * includes backport for PR30636 + * removed several upstreamed patches +- update fortify patch (#246879) +- fix parsing of new binutils version string +- fix mathematical parentheses warning +* Tue Jan 30 2007 - rguenther@suse.de +- Update to suse-gcc-4_2-branch head (r121459). +- Add patch for -ffortify +- Add patch for PR27657. +- Filter -ffortify and -fstack-protector from RPM_OPT_FLAGS. * Mon Jan 15 2007 - rguenther@suse.de - Update to SVN branch head (r120796). * Mon Jan 15 2007 - schwab@suse.de ++++++ fortify-2.diff ++++++ --- doc/invoke.texi +++ doc/invoke.texi @@ -302,7 +302,7 @@ @xref{Optimize Options,,Options that Control Optimization}. @gccoptlist{-falign-functions=@var{n} -falign-jumps=@var{n} @gol -falign-labels=@var{n} -falign-loops=@var{n} @gol --fbounds-check -fmudflap -fmudflapth -fmudflapir @gol +-fbounds-check -ffortify=@var{n} -fmudflap -fmudflapth -fmudflapir @gol -fbranch-probabilities -fprofile-values -fvpt -fbranch-target-load-optimize @gol -fbranch-target-load-optimize2 -fbtr-bb-exclusive @gol -fcaller-saves -fcprop-registers -fcse-follow-jumps @gol @@ -4796,6 +4796,18 @@ currently only supported by the Java and Fortran front-ends, where this option defaults to true and false respectively. +@item -ffortify +@itemx -ffortify=@var{n} +Instrument a set of string, memory and printf related functions into their +_chk variants. @var{n} controls the behaviour in detail. A fortify level +of 1 will produce compile warnings, but expand the _chk variants +back into the non-checking equivalent, and therefore not introduce any +run-time overhead in the generated code. A level of 2 will emit calls +to the _chk variants if the overflow checking can only be done during +runtime. Higher fortify levels are passed down to the printf related +check functions and might control further fortify levels. A level of 0 +disables the instrumentation. + @item -fmudflap -fmudflapth -fmudflapir @opindex fmudflap @opindex fmudflapth --- tree.h +++ tree.h @@ -2989,6 +2989,16 @@ not an alias. */ #define DECL_IS_MALLOC(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.malloc_flag) +/* Nonzero in a FUNCTION_DECL means this function is a language + variant of a malloc like function and the values describes + the size: + 0) unknown / no size associated + 1) first parameter is size in bytes + 2) second parameter is size in bytes + 3) first * second parameter is size in bytes */ +#define DECL_MALLOC_SIZE_PARM(NODE) (FUNCTION_DECL_CHECK \ + (NODE)->function_decl.lang_malloc_size) + /* Nonzero in a FUNCTION_DECL means this function may return more than once. */ #define DECL_IS_RETURNS_TWICE(NODE) \ @@ -3078,13 +3088,14 @@ unsigned malloc_flag : 1; unsigned pure_flag : 1; - unsigned declared_inline_flag : 1; unsigned regdecl_flag : 1; unsigned inline_flag : 1; unsigned no_instrument_function_entry_exit : 1; unsigned no_limit_stack : 1; + unsigned lang_malloc_size : 2; ENUM_BITFIELD(built_in_class) built_in_class : 2; + unsigned declared_inline_flag : 1; struct function *f; }; --- cp/call.c +++ cp/call.c @@ -2834,7 +2834,17 @@ result = error_mark_node; } else + { + result = NULL_TREE; + /* If the function is an overloaded builtin, resolve it. */ + if (TREE_CODE (cand->fn) == FUNCTION_DECL + && (DECL_BUILT_IN_CLASS (cand->fn) == BUILT_IN_NORMAL + || DECL_BUILT_IN_CLASS (cand->fn) == BUILT_IN_MD)) + result = resolve_overloaded_builtin (cand->fn, cand->args); + + if (!result) result = build_over_call (cand, LOOKUP_NORMAL); + } /* Free all the conversions we allocated. */ obstack_free (&conversion_obstack, p); @@ -2944,6 +2954,11 @@ if (fn) *fn = cand->fn; + if (POINTER_TYPE_P (TREE_TYPE (TREE_TYPE (cand->fn)))) + DECL_IS_MALLOC (cand->fn) = 1; + + DECL_MALLOC_SIZE_PARM (cand->fn) = 1; + /* Build the CALL_EXPR. */ return build_over_call (cand, LOOKUP_NORMAL); } --- cp/semantics.c +++ cp/semantics.c @@ -1832,15 +1832,7 @@ } else if (is_overloaded_fn (fn)) { - /* If the function is an overloaded builtin, resolve it. */ - if (TREE_CODE (fn) == FUNCTION_DECL - && (DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL - || DECL_BUILT_IN_CLASS (fn) == BUILT_IN_MD)) - result = resolve_overloaded_builtin (fn, args); - - if (!result) - /* A call to a namespace-scope function. */ - result = build_new_function_call (fn, args, koenig_p); + result = build_new_function_call (fn, args, koenig_p); } else if (TREE_CODE (fn) == PSEUDO_DTOR_EXPR) { --- common.opt +++ common.opt @@ -296,6 +296,10 @@ Common Report Var(flag_bounds_check) Generate code to check bounds before indexing arrays +ffortify= +Common Report Joined UInteger Var(flag_fortify) +Fortify all calls to string functions into their _chk variants + fbranch-count-reg Common Report Var(flag_branch_on_count_reg) Init(1) Replace add, compare, branch with branch on count register --- c-common.c +++ c-common.c @@ -48,6 +48,7 @@ #include "opts.h" #include "real.h" #include "cgraph.h" +#include "convert.h" cpp_reader *parse_in; /* Declared in c-pragma.h. */ @@ -6302,6 +6303,114 @@ return convert (ptype, result); } + +/* A helper to construct a function call to __builtin_object_size + with ARG0 and ARG1. */ + +static tree +build_bos_call (tree arg0, tree arg1) +{ + tree fn, a; + + a = build_tree_list (NULL_TREE, arg0); + TREE_CHAIN (a) = build_tree_list (NULL_TREE, arg1); + + fn = build_function_call (implicit_built_in_decls[BUILT_IN_OBJECT_SIZE], a); + + if (fn == error_mark_node) + return NULL_TREE; + + return fn; +} + + +/* Fortify the str* or mem* related builtin FUNCTION into the appropriate + _chk variant given by FCODE, by constructing an additional parameter + calling __builtin_object_size with the parameter BOS on the first argument + of PARAMS. If anything fails, return NULL_TREE. */ + + +static tree +fortify_mem_builtin_fn(enum built_in_function fcode, int bos, tree function, tree params) +{ + if (TREE_VALUE (params)) + { + tree a,fn; + + fn = build_bos_call (TREE_VALUE (params), + bos && flag_fortify > 1 ? integer_one_node : integer_zero_node); + + if (!fn) + return NULL_TREE; + + a = built_in_decls[fcode]; + if (a) + { + /* Append to params. */ + TREE_CHAIN (tree_last (params)) = build_tree_list (NULL_TREE, fn); + fn = build_function_call (a, params); + if (fn == error_mark_node) + return NULL_TREE; + + (void) function; + return fn; + } + } + + return NULL_TREE; +} + + +/* Fortify the *printf related builtin FUNCTION by rewriting it into + the _chk variant and adding the fortify flag to the PARAMS + as determined by the fortify level. */ + +static tree +fortify_printf_builtin_fn (int flag_num, bool append_bos, + enum built_in_function fcode, tree function, tree params) +{ + tree orig_params = params; + tree fn = NULL_TREE; + tree flag; + + flag = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, flag_fortify - 1)); + + if (append_bos) + { + tree bos_fn = build_bos_call (TREE_VALUE (orig_params), flag_fortify > 1 + ? integer_one_node : + integer_zero_node); + TREE_CHAIN (flag) = build_tree_list (NULL_TREE, bos_fn); + } + + if (flag_num == 0) + { + TREE_CHAIN (tree_last (flag)) = orig_params; + orig_params = flag; + } + else + { + tree h; + + while (--flag_num && TREE_CHAIN (params)) + params = TREE_CHAIN (params); + + h = TREE_CHAIN (params); + TREE_CHAIN (params) = flag; + TREE_CHAIN (tree_last (params)) = h; + } + + if (built_in_decls[fcode]) + fn = build_function_call (built_in_decls[fcode], orig_params); + + if (fn == error_mark_node) + return NULL_TREE; + + (void) function; + + return fn; +} + /* Some builtin functions are placeholders for other expressions. This function should be called immediately after parsing the call expression before surrounding code has committed to the type of the expression. @@ -6329,6 +6438,49 @@ } /* Handle BUILT_IN_NORMAL here. */ + + if (flag_fortify) + { + switch (orig_code) + { + case BUILT_IN_MEMCPY: + return fortify_mem_builtin_fn (BUILT_IN_MEMCPY_CHK, 0, function, params); + case BUILT_IN_MEMPCPY: + return fortify_mem_builtin_fn (BUILT_IN_MEMPCPY_CHK, 0, function, params); + case BUILT_IN_MEMMOVE: + return fortify_mem_builtin_fn (BUILT_IN_MEMMOVE_CHK, 0, function, params); + case BUILT_IN_MEMSET: + return fortify_mem_builtin_fn (BUILT_IN_MEMSET_CHK, 0, function, params); + case BUILT_IN_STRCAT: + return fortify_mem_builtin_fn (BUILT_IN_STRCAT_CHK, 1, function, params); + case BUILT_IN_STPCPY: + return fortify_mem_builtin_fn (BUILT_IN_STPCPY_CHK, 1, function, params); + case BUILT_IN_STRCPY: + return fortify_mem_builtin_fn (BUILT_IN_STRCPY_CHK, 1, function, params); + case BUILT_IN_STRNCPY: + return fortify_mem_builtin_fn (BUILT_IN_STRNCPY_CHK, 1, function, params); + case BUILT_IN_STRNCAT: + return fortify_mem_builtin_fn (BUILT_IN_STRNCAT_CHK, 1, function, params); + case BUILT_IN_PRINTF: + return fortify_printf_builtin_fn (0, false, BUILT_IN_PRINTF_CHK, function, params); + case BUILT_IN_VPRINTF: + return fortify_printf_builtin_fn (0, false, BUILT_IN_VPRINTF_CHK, function, params); + case BUILT_IN_FPRINTF: + return fortify_printf_builtin_fn (1, false, BUILT_IN_FPRINTF_CHK, function, params); + case BUILT_IN_VFPRINTF: + return fortify_printf_builtin_fn (1, false, BUILT_IN_VFPRINTF_CHK, function, params); + case BUILT_IN_SPRINTF: + return fortify_printf_builtin_fn (1, true, BUILT_IN_SPRINTF_CHK, function, params); + case BUILT_IN_VSPRINTF: + return fortify_printf_builtin_fn (1, true, BUILT_IN_VSPRINTF_CHK, function, params); + case BUILT_IN_SNPRINTF: + return fortify_printf_builtin_fn (2, true, BUILT_IN_SNPRINTF_CHK, function, params); + case BUILT_IN_VSNPRINTF: + return fortify_printf_builtin_fn (2, true, BUILT_IN_VSNPRINTF_CHK, function, params); + default: break; + } + } + switch (orig_code) { case BUILT_IN_FETCH_AND_ADD_N: ++++++ gcc-4.2.0-20070115.tar.bz2 -> gcc-4.2.0-20070327.tar.bz2 ++++++ gcc42/gcc-4.2.0-20070115.tar.bz2 /mounts/work_src_done/STABLE/gcc42/gcc-4.2.0-20070327.tar.bz2 differ: byte 11, line 1 ++++++ gcc.spec.in ++++++ --- gcc42/gcc.spec.in 2007-01-16 10:32:28.000000000 +0100 +++ /mounts/work_src_done/STABLE/gcc42/gcc.spec.in 2007-03-27 18:49:36.000000000 +0200 @@ -50,7 +50,7 @@ Name: gcc@base_ver@ -BuildRequires: glibc-devel-32bit flex bison gettext-devel texinfo +BuildRequires: bison flex gettext-devel glibc-devel-32bit texinfo zlib-devel %if %{build_ada} BuildRequires: gcc-ada %endif @@ -117,12 +117,11 @@ URL: http://gcc.gnu.org/ License: GPL -Version: 4.2.0_20070115 +Version: 4.2.0_20070327 Release: 1 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.2 -%define versionspecificlibs 0 # COMMON-END %if 0%{?!building_libjava:1} @@ -140,17 +139,19 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2 Source1: change_spec +Source100: README.First-for.SuSE.packagers Patch1: bug-reporting.patch Patch2: gcc-noalias-warn.diff Patch5: boehm-gc-strict-aliasing.patch Patch7: acats-timeout.patch +# hack to get ia64 bootstrapping again +Patch9: revert-mdim-fold-fix-for-ia64-bootstrap.diff Patch10: program-transform-name.diff Patch12: gcc4-ppc64-m32-m64-multilib-only.patch Patch23: libjava-no-multilib.diff Patch24: tls-no-direct.diff Patch38: large-gcc.diff Patch40: pr27880.diff -Patch41: pr29943.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -159,9 +160,11 @@ # Random stuff Patch70: gcc42-ssse3.patch # AMD stuff -Patch101: AMD-0201.patch Patch102: fold-floor.patch Patch104: pr3511.patch +# Enhancements +Patch200: fortify-2.diff +Patch201: parentheses-mathematical-41.diff # LIBJAVA-DELETE-BEGIN %description @@ -540,25 +543,10 @@ %define versnoflibdir %{libsubdir}/32/nof %endif -# If we use versionspecific libs, they end in libsubdir -%if %{versionspecificlibs} -%define mainlibdir %{libsubdir} -%define mainlibdirbi32 %{libsubdir}/32 -%define mainlibdirbi64 %{libsubdir}/64 -%ifarch ppc -%define noflibdir %{libsubdir}/nof -%define mainlibdirbi32 %{libsubdir} -%define mainlibdirbi64 %{libsubdir}/64 -%endif -%ifarch ppc64 -%define noflibdir %{libsubdir}/32/nof -%endif -%else %define mainlibdir %{_libdir} %define mainlibdirbi32 %{_prefix}/lib %define mainlibdirbi64 %{_prefix}/lib64 %define noflibdir %{_prefix}/lib/nof -%endif # Now define a few macros that make it easy to package libs and @@ -682,6 +670,7 @@ %patch2 %patch5 %patch7 +%patch9 %patch10 %if !%{build_nof} %patch12 @@ -690,16 +679,16 @@ %patch24 #%patch38 %patch40 -%patch41 %patch51 %patch55 %patch57 #%patch52 %patch70 -%patch101 cd gcc %patch102 %patch104 +%patch200 +%patch201 -p1 cd .. %build @@ -713,7 +702,7 @@ mkdir obj-%{GCCDIST} cd obj-%{GCCDIST} RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" -RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g'` +RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g'` %ifarch %ix86 # -mcpu is superceded by -mtune but -mtune is not supported by # our bootstrap compiler. -mcpu gives a warning that stops @@ -947,8 +936,6 @@ # LIBJAVA-DELETE-END # Move shared libs around -%if %{versionspecificlibs} -%else # libjava possibly breaks, ada is broken for libname in \ %if %{build_libjava} @@ -992,7 +979,6 @@ %endif %endif done -%endif # Move libgcc_s around rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so @@ -1011,8 +997,8 @@ ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s} %endif -# LIBJAVA-DELETE-END %endif +# LIBJAVA-DELETE-END %if %{build_ada} mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir} @@ -1158,17 +1144,6 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-scan%{binsuffix}.1 %endif -# Delete some files... -%if %{versionspecificlibs} -%if %{build_libjava} -rm $RPM_BUILD_ROOT%{_libdir}/logging.properties -rm $RPM_BUILD_ROOT%{_libdir}/security/classpath.security -rm $RPM_BUILD_ROOT%{_libdir}/security/libgcj.security -%endif -rm $RPM_BUILD_ROOT%{_infodir}/*.info* -rm $RPM_BUILD_ROOT%{_prefix}/share/locale/*/LC_MESSAGES/*.mo -%endif - # LIBJAVA-DELETE-BEGIN %post info %install_info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz @@ -1176,6 +1151,7 @@ %install_info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz +%install_info --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz %if %{build_fortran} %install_info --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz %endif @@ -1194,6 +1170,7 @@ %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz +%install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz %if %{build_fortran} %install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz %endif @@ -1292,7 +1269,6 @@ %versbiarchlib libgomp.spec %endif -%if !%{versionspecificlibs} %files locale %defattr(-,root,root) %{_prefix}/share/locale/*/LC_MESSAGES/gcc.mo @@ -1301,7 +1277,6 @@ %if 0%{!?build_for_base:1} %{_prefix}/share/locale/*/LC_MESSAGES/libstdc++.mo %endif -%endif %files c++ %defattr(-,root,root) @@ -1332,10 +1307,6 @@ %files -n libgcc@base_ver@ %defattr(-,root,root) -%if %{versionspecificlibs} -%versmainlib libgcc_s.so.%{libgcc_s} -%else -# not versionspecificlibs /%{_lib}/libgcc_s.so.%{libgcc_s} %if %{build_nof} %dir /lib/nof @@ -1352,27 +1323,18 @@ %endif %endif %endif -%endif %if %{separate_bi64} %files -n libgcc@base_ver@-64bit %defattr(-,root,root) -%if %{versionspecificlibs} -%versbiarchlib libgcc_s.so.%{libgcc_s} -%else /lib64/libgcc_s.so.%{libgcc_s} %endif -%endif %if %{separate_bi32} %files -n libgcc@base_ver@-32bit %defattr(-,root,root) -%if %{versionspecificlibs} -%versbiarchlib libgcc_s.so.%{libgcc_s} -%else /lib/libgcc_s.so.%{libgcc_s} %endif -%endif %files -n libgomp@base_ver@ @@ -1442,7 +1404,6 @@ %biarchlib libmudflapth.so.* %endif -%if !%{versionspecificlibs} %files info %defattr(-,root,root) %doc %{_infodir}/cpp.info*.gz @@ -1450,6 +1411,7 @@ %doc %{_infodir}/gcc.info*.gz %doc %{_infodir}/gccint.info*.gz %doc %{_infodir}/gccinstall.info*.gz +%doc %{_infodir}/libgomp.info*.gz %if %{build_fortran} %doc %{_infodir}/gfortran.info*.gz %endif @@ -1461,7 +1423,6 @@ %doc %{_infodir}/gnat_rm.info*gz %doc %{_infodir}/gnat_ugn_unw.info*gz %endif -%endif %files -n cpp@base_ver@ %defattr(-,root,root) @@ -1556,11 +1517,9 @@ %{_prefix}/share/java/libgcj-%{gcc_version}.jar %{_prefix}/share/java/libgcj-tools-%{gcc_version}.jar %{_libdir}/gcj-%{gcc_version}/classmap.db -%if !%{versionspecificlibs} %dir %{_libdir}/security %{_libdir}/security/classpath.security #%{_libdir}/security/libgcj.security -%endif # We usually do not multilib libjava %if %{biarch_libjava} %mainlib libgcj.so.* @@ -1578,9 +1537,7 @@ %{_libdir}/gcj-%{gcc_version}/libjvm.la %{_libdir}/gcj-%{gcc_version}/libjvm.so %endif -%if !%{versionspecificlibs} %{_libdir}/logging.properties -%endif %files -n libgcj@base_ver@-devel %defattr(-,root,root) ++++++ parentheses-mathematical-41.diff ++++++ --- gcc/c-typeck.c +++ gcc/c-typeck.c @@ -2553,13 +2553,23 @@ warning (OPT_Wparentheses, "suggest parentheses around comparison in operand of &"); } - /* Similarly, check for cases like 1<=i<=10 that are probably errors. */ - if (TREE_CODE_CLASS (code) == tcc_comparison - && (TREE_CODE_CLASS (code1) == tcc_comparison - || TREE_CODE_CLASS (code2) == tcc_comparison)) - warning (OPT_Wparentheses, "comparisons like X<=Y<=Z do not " - "have their mathematical meaning"); - + if (code == EQ_EXPR || code == NE_EXPR) + { + if (TREE_CODE_CLASS (code1) == tcc_comparison + || TREE_CODE_CLASS (code2) == tcc_comparison) + warning (OPT_Wparentheses, + "suggest parentheses around comparison in operand of %s", + code == EQ_EXPR ? "==" : "!="); + } + else if (TREE_CODE_CLASS (code) == tcc_comparison) + { + if ((TREE_CODE_CLASS (code1) == tcc_comparison + && code1 != NE_EXPR && code1 != EQ_EXPR) + || (TREE_CODE_CLASS (code2) == tcc_comparison + && code2 != NE_EXPR && code2 != EQ_EXPR)) + warning (OPT_Wparentheses, "comparisons like X<=Y<=Z do not " + "have their mathematical meaning"); + } } unsigned_conversion_warning (result.value, arg1.value); --- gcc/testsuite/gcc.dg/Wparentheses-2.c +++ gcc/testsuite/gcc.dg/Wparentheses-2.c @@ -10,58 +10,112 @@ int bar (int a, int b, int c) { - foo (a <= b <= c); /* { dg-warning "comparison" "correct warning" } */ + foo (a <= b <= c); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((a <= b) <= c); foo (a <= (b <= c)); - foo (1 <= 2 <= c); /* { dg-warning "comparison" "correct warning" } */ + foo (1 <= 2 <= c); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((1 <= 2) <= c); foo (1 <= (2 <= c)); - foo (1 <= 2 <= 3); /* { dg-warning "comparison" "correct warning" } */ + foo (1 <= 2 <= 3); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((1 <= 2) <= 3); foo (1 <= (2 <= 3)); - foo (a > b > c); /* { dg-warning "comparison" "correct warning" } */ + foo (a > b > c); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((a > b) > c); foo (a > (b > c)); - foo (1 > 2 > c); /* { dg-warning "comparison" "correct warning" } */ + foo (1 > 2 > c); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((1 > 2) > c); foo (1 > (2 > c)); - foo (1 > 2 > 3); /* { dg-warning "comparison" "correct warning" } */ + foo (1 > 2 > 3); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((1 > 2) > 3); foo (1 > (2 > 3)); - foo (a < b <= c); /* { dg-warning "comparison" "correct warning" } */ + foo (a < b <= c); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((a < b) <= c); foo (a < (b <= c)); - foo (1 < 2 <= c); /* { dg-warning "comparison" "correct warning" } */ + foo (1 < 2 <= c); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((1 < 2) <= c); foo (1 < (2 <= c)); - foo (1 < 2 <= 3); /* { dg-warning "comparison" "correct warning" } */ + foo (1 < 2 <= 3); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((1 < 2) <= 3); foo (1 < (2 <= 3)); - foo (a <= b > c); /* { dg-warning "comparison" "correct warning" } */ + foo (a <= b > c); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((a <= b) > c); foo (a <= (b > c)); - foo (1 <= 2 > c); /* { dg-warning "comparison" "correct warning" } */ + foo (1 <= 2 > c); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((1 <= 2) > c); foo (1 <= (2 > c)); - foo (1 <= 2 > 3); /* { dg-warning "comparison" "correct warning" } */ + foo (1 <= 2 > 3); /* { dg-warning "mathematical meaning" "correct warning" } */ foo ((1 <= 2) > 3); foo (1 <= (2 > 3)); - foo (a <= b == c); /* { dg-warning "comparison" "correct warning" } */ + foo (a <= b == c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ foo ((a <= b) == c); foo (a <= (b == c)); - foo (1 <= 2 == c); /* { dg-warning "comparison" "correct warning" } */ + foo (1 <= 2 == c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ foo ((1 <= 2) == c); foo (1 <= (2 == c)); - foo (1 <= 2 == 3); /* { dg-warning "comparison" "correct warning" } */ + foo (1 <= 2 == 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ foo ((1 <= 2) == 3); foo (1 <= (2 == 3)); - foo (a != b != c); /* { dg-warning "comparison" "correct warning" } */ + foo (a != b != c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ foo ((a != b) != c); foo (a != (b != c)); - foo (1 != 2 != c); /* { dg-warning "comparison" "correct warning" } */ + foo (1 != 2 != c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ foo ((1 != 2) != c); foo (1 != (2 != c)); - foo (1 != 2 != 3); /* { dg-warning "comparison" "correct warning" } */ + foo (1 != 2 != 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ foo ((1 != 2) != 3); foo (1 != (2 != 3)); + foo (a < b == c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a < b) == c); + foo (a < (b == c)); + foo (a > b == c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a > b) == c); + foo (a > (b == c)); + foo (a == b < c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a == b) < c); + foo (a == (b < c)); + foo (a == b > c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a == b) > c); + foo (a == (b > c)); + foo (a == b == c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a == b) == c); + foo (a == (b == c)); + foo (1 == 2 == 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 == 2) == 3); + foo (1 == (2 == 3)); + foo (1 < 2 == 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 < 2) == 3); + foo (1 < (2 == 3)); + foo (1 > 2 == 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 > 2) == 3); + foo (1 > (2 == 3)); + foo (1 == 2 < 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 == 2) < 3); + foo (1 == (2 < 3)); + foo (1 == 2 > 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 == 2) > 3); + foo (1 == (2 > 3)); + foo (a < b != c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a < b) != c); + foo (a < (b != c)); + foo (a > b != c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a > b) != c); + foo (a > (b != c)); + foo (a != b < c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a != b) < c); + foo (a != (b < c)); + foo (a != b > c); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((a != b) > c); + foo (a != (b > c)); + foo (1 < 2 != 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 < 2) != 3); + foo (1 < (2 != 3)); + foo (1 > 2 != 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 > 2) != 3); + foo (1 > (2 != 3)); + foo (1 != 2 < 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 != 2) < 3); + foo (1 != (2 < 3)); + foo (1 != 2 > 3); /* { dg-warning "suggest parentheses around comparison" "correct warning" } */ + foo ((1 != 2) > 3); + foo (1 != (2 > 3)); } ++++++ revert-mdim-fold-fix-for-ia64-bootstrap.diff ++++++ --- gcc/fold-const.c +++ gcc/fold-const.c @@ -6582,7 +6582,6 @@ tree ref = TREE_OPERAND (addr, 0), pref; tree ret, pos; tree itype; - bool mdim = false; /* Canonicalize op1 into a possibly non-constant delta and an INTEGER_CST s. */ @@ -6622,10 +6621,6 @@ { if (TREE_CODE (ref) == ARRAY_REF) { - /* Remember if this was a multi-dimensional array. */ - if (TREE_CODE (TREE_OPERAND (ref, 0)) == ARRAY_REF) - mdim = true; - itype = TYPE_DOMAIN (TREE_TYPE (TREE_OPERAND (ref, 0))); if (! itype) continue; @@ -6648,32 +6643,8 @@ delta = tmp; } - /* Only fold here if we can verify we do not overflow one - dimension of a multi-dimensional array. */ - if (mdim) - { - tree tmp; - - if (TREE_CODE (TREE_OPERAND (ref, 1)) != INTEGER_CST - || !INTEGRAL_TYPE_P (itype) - || !TYPE_MAX_VALUE (itype) - || TREE_CODE (TYPE_MAX_VALUE (itype)) != INTEGER_CST) - continue; - - tmp = fold_binary (code, itype, - fold_convert (itype, - TREE_OPERAND (ref, 1)), - fold_convert (itype, delta)); - if (!tmp - || TREE_CODE (tmp) != INTEGER_CST - || tree_int_cst_lt (TYPE_MAX_VALUE (itype), tmp)) - continue; - } - break; } - else - mdim = false; if (!handled_component_p (ref)) return NULL_TREE; --- gcc/testsuite/g++.dg/tree-ssa/tmmti-2.C +++ gcc/testsuite/g++.dg/tree-ssa/tmmti-2.C @@ -17,6 +17,6 @@ return *(&b[0].x + i*2); // b[i].x } -/* { dg-final { scan-tree-dump "a\\\[.*i.*\\\]\\\[0\\\]" "optimized" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "a\\\[.*i.*\\\]\\\[0\\\]" "optimized" } } */ /* { dg-final { scan-tree-dump "b\\\[.*i.*\\\].x" "optimized" } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ --- gcc/testsuite/g++.dg/warn/pr30636.C +++ gcc/testsuite/g++.dg/warn/pr30636.C @@ -1,17 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -Warray-bounds" } */ - -typedef char one_buffer[512]; -static one_buffer emergency_buffer[4]; - -void free_exception (void *vptr) -{ - char *base = (char *) &emergency_buffer[0][0]; - char *ptr = (char *) vptr; - if (ptr >= base && ptr < base + sizeof (emergency_buffer)) /* { dg-bogus "subscript" } */ - { - /* Do something. */ - __builtin_exit (0); - } -} - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org