Hello community, here is the log from the commit of package gcc6 for openSUSE:Factory checked in at 2016-07-16 22:10:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcc6 (Old) and /work/SRC/openSUSE:Factory/.gcc6.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc6" Changes: -------- --- /work/SRC/openSUSE:Factory/gcc6/cross-aarch64-gcc6.changes 2016-06-07 23:49:41.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.gcc6.new/cross-aarch64-gcc6.changes 2016-07-16 22:10:23.000000000 +0200 @@ -1,0 +2,30 @@ +Thu Jul 7 11:58:26 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r238085) + * Fixes compile-time issues in the C++ frontend. [bnc#988017] +- Enable plugin support for Tumbleweed and add gcc6-devel package + for the hearder files required to develop plugins. [bnc#988009] + +------------------------------------------------------------------- +Wed Jun 15 10:08:25 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r237469) +- Refresh gcc6-SOURCE_DATE_EPOCH.patch with patch for PR71183. +- Use %preun instead of %postun for info file deletion. Register + libitm.info. [bnc#984767] + +------------------------------------------------------------------- +Mon Jun 13 08:35:10 UTC 2016 - [email protected] + +- Add cross-arm-gcc6 that should work with cross-arm-binutils and + defaults to armv6hl settings, but without builing an icecream + environment for it. + +------------------------------------------------------------------- +Fri Jun 10 11:12:34 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r237296). +- Add gcc6-SOURCE_DATE_EPOCH.patch to backport SOURCE_DATE_EPOCH. + [bnc#982182] + +------------------------------------------------------------------- New Changes file: --- /dev/null 2016-07-07 10:01:34.856033756 +0200 +++ /work/SRC/openSUSE:Factory/.gcc6.new/cross-arm-gcc6.changes 2016-07-16 22:10:23.000000000 +0200 @@ -0,0 +1,129 @@ +------------------------------------------------------------------- +Thu Jul 7 11:58:26 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r238085) + * Fixes compile-time issues in the C++ frontend. [bnc#988017] +- Enable plugin support for Tumbleweed and add gcc6-devel package + for the hearder files required to develop plugins. [bnc#988009] + +------------------------------------------------------------------- +Wed Jun 15 10:08:25 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r237469) +- Refresh gcc6-SOURCE_DATE_EPOCH.patch with patch for PR71183. +- Use %preun instead of %postun for info file deletion. Register + libitm.info. [bnc#984767] + +------------------------------------------------------------------- +Mon Jun 13 08:35:10 UTC 2016 - [email protected] + +- Add cross-arm-gcc6 that should work with cross-arm-binutils and + defaults to armv6hl settings, but without builing an icecream + environment for it. + +------------------------------------------------------------------- +Fri Jun 10 11:12:34 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r237296). +- Add gcc6-SOURCE_DATE_EPOCH.patch to backport SOURCE_DATE_EPOCH. + [bnc#982182] + +------------------------------------------------------------------- +Mon Jun 6 11:29:15 UTC 2016 - [email protected] + +- Update disk-space _constraints, add libgcj-gcc6 _constraints similar + to gcc6-testresults as that one is also building libjava. + +------------------------------------------------------------------- +Wed Jun 1 13:17:59 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r236988). +- Enable profiledbootstrap for AARCH64. + +------------------------------------------------------------------- +Tue May 10 09:59:24 UTC 2016 - [email protected] + +- Add gcc6-disable-aarch64-tsan.patch to disable TSAN on aarch64 because + libtsan0 is not installable. + +------------------------------------------------------------------- +Wed May 4 08:27:42 UTC 2016 - [email protected] + +- Fix HSA build conditional for crosses. + +------------------------------------------------------------------- +Mon May 2 07:22:08 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r235696). + * Fixes libgcj_bc1 version check issue. + +------------------------------------------------------------------- +Wed Apr 27 10:37:26 UTC 2016 - [email protected] + +- Update to GCC 6.1.0 release (r235473). + * Includes fix for python3 miscompile [bnc#976024] +- Enable profiledbootstrap, but not if building libjava where also + disable bootstrap + +------------------------------------------------------------------- +Mon Apr 18 14:01:38 UTC 2016 - [email protected] + +- Add gcc6-hsa-enablement.patch and enable HSA offloading target. + +------------------------------------------------------------------- +Thu Apr 14 12:38:43 UTC 2016 - [email protected] + +- Update to SVN trunk head (r234970). + +------------------------------------------------------------------- +Thu Apr 14 12:05:43 UTC 2016 - [email protected] + +- Enable Ada on ppc64le and aarch64. + +------------------------------------------------------------------- +Thu Mar 24 09:16:23 UTC 2016 - [email protected] + +- Update to SVN trunk head (r234449). +- Do not build libffi packages for now. +- Adds support for %disable_32bit. +- Build with release checking. +- Enable cross compiler builds. + +------------------------------------------------------------------- +Thu Mar 10 12:45:44 UTC 2016 - [email protected] + +- Update to SVN trunk head (r234106). + * Bumps libgo SO version to 9 + * Bumps libffi SO version to 7 +- Refresh gcc44-rename-info-files.patch + +------------------------------------------------------------------- +Thu Dec 17 14:02:56 UTC 2015 - [email protected] + +- New package, inherits from gcc5 + * gcc-dir-version.patch, drop patchlevel from install directory names + * gcc-add-defaultsspec.diff, add the ability to provide a specs file + that is read by default + * libjava-no-multilib.diff, do not build multilibs for libjava even on + multilib systems (we use baselibs for it) + * tls-no-direct.diff, avoid direct %fs references on x86 to not slow down + Xen + * gcc43-no-unwind-tables.diff, do not produce unwind tables for CRT files + * gcc41-java-slow_pthread_self.patch, force us to assume pthread_self + is fast + * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr for ppc + * gcc44-textdomain.patch, make translation files version specific and + adjust textdomain to find them + * gcc44-rename-info-files.patch, fix cross-references in info files when + renaming them to be version specific + * gcc48-libstdc++-api-reference.patch, fix link in the installed libstdc++ + html documentation + * gcc48-remove-mpfr-2.4.0-requirement.patch, make GCC work with earlier + mpfr versions on old products + * gcc5-libsanitize-aarch64-va42.patch, make address sanitizer work with 42bit + address space on aarch64 + * gcc5-no-return-gcc43-workaround.patch, make build work with host gcc 4.3 +- Drops + * Wunprototyped-calls.diff because -std=gnu11 is default now. + * gcc5-libgo-fix-certificates-lookup.patch, no longer applies and is only + required for SLE11 --- /work/SRC/openSUSE:Factory/gcc6/cross-armv6hl-gcc6.changes 2016-06-07 23:49:41.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.gcc6.new/cross-armv6hl-gcc6.changes 2016-07-16 22:10:23.000000000 +0200 @@ -1,0 +2,30 @@ +Thu Jul 7 11:58:26 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r238085) + * Fixes compile-time issues in the C++ frontend. [bnc#988017] +- Enable plugin support for Tumbleweed and add gcc6-devel package + for the hearder files required to develop plugins. [bnc#988009] + +------------------------------------------------------------------- +Wed Jun 15 10:08:25 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r237469) +- Refresh gcc6-SOURCE_DATE_EPOCH.patch with patch for PR71183. +- Use %preun instead of %postun for info file deletion. Register + libitm.info. [bnc#984767] + +------------------------------------------------------------------- +Mon Jun 13 08:35:10 UTC 2016 - [email protected] + +- Add cross-arm-gcc6 that should work with cross-arm-binutils and + defaults to armv6hl settings, but without builing an icecream + environment for it. + +------------------------------------------------------------------- +Fri Jun 10 11:12:34 UTC 2016 - [email protected] + +- Update to gcc-6-branch head (r237296). +- Add gcc6-SOURCE_DATE_EPOCH.patch to backport SOURCE_DATE_EPOCH. + [bnc#982182] + +------------------------------------------------------------------- cross-armv7hl-gcc6.changes: same change cross-avr-gcc6.changes: same change cross-i386-gcc6.changes: same change cross-m68k-gcc6.changes: same change cross-ppc64-gcc6.changes: same change cross-ppc64le-gcc6.changes: same change cross-s390x-gcc6.changes: same change cross-sparc-gcc6.changes: same change cross-sparc64-gcc6.changes: same change cross-x86_64-gcc6.changes: same change gcc6-testresults.changes: same change gcc6.changes: same change libgcj-gcc6.changes: same change Old: ---- gcc-6.1.1-r236988.tar.bz2 New: ---- cross-arm-gcc6.changes cross-arm-gcc6.spec gcc-6.1.1-r238085.tar.bz2 gcc6-SOURCE_DATE_EPOCH.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-aarch64-gcc6.spec ++++++ --- /var/tmp/diff_new_pack.aYon0d/_old 2016-07-16 22:10:34.000000000 +0200 +++ /var/tmp/diff_new_pack.aYon0d/_new 2016-07-16 22:10:34.000000000 +0200 @@ -40,6 +40,8 @@ %define build_go 0 %define build_hsa 0 +%define enable_plugins 0 + %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm @@ -115,7 +117,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ -Version: 6.1.1+r236988 +Version: 6.1.1+r238085 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1) @@ -144,6 +146,7 @@ Patch10: gcc5-no-return-gcc43-workaround.patch Patch11: gcc6-hsa-enablement.patch Patch12: gcc6-disable-aarch64-tsan.patch +Patch13: gcc6-SOURCE_DATE_EPOCH.patch # A set of patches from the RH srpm Patch50: gcc41-java-slow_pthread_self.patch Patch51: gcc41-ppc32-retaddr.patch @@ -220,6 +223,7 @@ %patch10 %patch11 -p1 %patch12 +%patch13 %patch50 %patch51 %patch60 @@ -379,7 +383,12 @@ %ifnarch %mpx_arch --disable-libmpx \ %endif + --disable-libcc1 \ +%if %{enable_plugins} + --enable-plugin \ +%else --disable-plugin \ +%endif --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} @@ -445,6 +454,14 @@ --with-newlib \ %endif %endif +%if "%{TARGET_ARCH}" == "arm" + --with-arch=armv6zk \ + --with-tune=arm1176jzf-s \ + --with-float=hard \ + --with-abi=aapcs-linux \ + --with-fpu=vfp \ + --disable-sjlj-exceptions \ +%endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ @@ -537,7 +554,7 @@ make %{?jobs:-j%jobs} all-host %endif -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} %package -n cross-%cross_arch-gcc6-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ @@ -581,7 +598,7 @@ rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target @@ -636,7 +653,7 @@ %{sysroot} %endif -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} %files -n cross-%cross_arch-gcc6-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs ++++++ cross-arm-gcc6.spec ++++++ ++++ 662 lines (skipped) ++++++ cross-armv6hl-gcc6.spec ++++++ --- /var/tmp/diff_new_pack.aYon0d/_old 2016-07-16 22:10:34.000000000 +0200 +++ /var/tmp/diff_new_pack.aYon0d/_new 2016-07-16 22:10:34.000000000 +0200 @@ -40,6 +40,8 @@ %define build_go 0 %define build_hsa 0 +%define enable_plugins 0 + %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm @@ -115,7 +117,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ -Version: 6.1.1+r236988 +Version: 6.1.1+r238085 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1) @@ -144,6 +146,7 @@ Patch10: gcc5-no-return-gcc43-workaround.patch Patch11: gcc6-hsa-enablement.patch Patch12: gcc6-disable-aarch64-tsan.patch +Patch13: gcc6-SOURCE_DATE_EPOCH.patch # A set of patches from the RH srpm Patch50: gcc41-java-slow_pthread_self.patch Patch51: gcc41-ppc32-retaddr.patch @@ -220,6 +223,7 @@ %patch10 %patch11 -p1 %patch12 +%patch13 %patch50 %patch51 %patch60 @@ -379,7 +383,12 @@ %ifnarch %mpx_arch --disable-libmpx \ %endif + --disable-libcc1 \ +%if %{enable_plugins} + --enable-plugin \ +%else --disable-plugin \ +%endif --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} @@ -445,6 +454,14 @@ --with-newlib \ %endif %endif +%if "%{TARGET_ARCH}" == "arm" + --with-arch=armv6zk \ + --with-tune=arm1176jzf-s \ + --with-float=hard \ + --with-abi=aapcs-linux \ + --with-fpu=vfp \ + --disable-sjlj-exceptions \ +%endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ @@ -537,7 +554,7 @@ make %{?jobs:-j%jobs} all-host %endif -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} %package -n cross-%cross_arch-gcc6-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ @@ -581,7 +598,7 @@ rm -rf $RPM_BUILD_ROOT%{_mandir} rm -rf $RPM_BUILD_ROOT%{_infodir} -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target @@ -636,7 +653,7 @@ %{sysroot} %endif -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} %files -n cross-%cross_arch-gcc6-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs cross-armv7hl-gcc6.spec: same change cross-avr-gcc6.spec: same change cross-i386-gcc6.spec: same change cross-m68k-gcc6.spec: same change cross-ppc64-gcc6.spec: same change cross-ppc64le-gcc6.spec: same change cross-s390x-gcc6.spec: same change cross-sparc-gcc6.spec: same change cross-sparc64-gcc6.spec: same change cross-x86_64-gcc6.spec: same change ++++++ gcc6-testresults.spec ++++++ --- /var/tmp/diff_new_pack.aYon0d/_old 2016-07-16 22:10:34.000000000 +0200 +++ /var/tmp/diff_new_pack.aYon0d/_new 2016-07-16 22:10:34.000000000 +0200 @@ -106,6 +106,13 @@ %define build_hsa 0 %endif +# Enable plugins just for Tumbleweed, not for SLE13 +%if %{suse_version} == 1330 +%define enable_plugins 1 +%else +%define enable_plugins 0 +%endif + # Shared library SONAME versions %ifarch hppa %define libgcc_s 4 @@ -266,7 +273,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ -Version: 6.1.1+r236988 +Version: 6.1.1+r238085 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1) @@ -333,6 +340,7 @@ Patch10: gcc5-no-return-gcc43-workaround.patch Patch11: gcc6-hsa-enablement.patch Patch12: gcc6-disable-aarch64-tsan.patch +Patch13: gcc6-SOURCE_DATE_EPOCH.patch # A set of patches from the RH srpm Patch50: gcc41-java-slow_pthread_self.patch Patch51: gcc41-ppc32-retaddr.patch @@ -460,6 +468,7 @@ %patch10 %patch11 -p1 %patch12 +%patch13 %patch50 %patch51 %patch60 @@ -619,7 +628,12 @@ %ifnarch %mpx_arch --disable-libmpx \ %endif + --disable-libcc1 \ +%if %{enable_plugins} + --enable-plugin \ +%else --disable-plugin \ +%endif --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} @@ -685,6 +699,14 @@ --with-newlib \ %endif %endif +%if "%{TARGET_ARCH}" == "arm" + --with-arch=armv6zk \ + --with-tune=arm1176jzf-s \ + --with-float=hard \ + --with-abi=aapcs-linux \ + --with-fpu=vfp \ + --disable-sjlj-exceptions \ +%endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ ++++++ gcc6.spec ++++++ --- /var/tmp/diff_new_pack.aYon0d/_old 2016-07-16 22:10:34.000000000 +0200 +++ /var/tmp/diff_new_pack.aYon0d/_new 2016-07-16 22:10:34.000000000 +0200 @@ -88,6 +88,13 @@ %define build_hsa 0 %endif +# Enable plugins just for Tumbleweed, not for SLE13 +%if %{suse_version} == 1330 +%define enable_plugins 1 +%else +%define enable_plugins 0 +%endif + # Shared library SONAME versions %ifarch hppa %define libgcc_s 4 @@ -248,7 +255,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ -Version: 6.1.1+r236988 +Version: 6.1.1+r238085 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1) @@ -315,6 +322,7 @@ Patch10: gcc5-no-return-gcc43-workaround.patch Patch11: gcc6-hsa-enablement.patch Patch12: gcc6-disable-aarch64-tsan.patch +Patch13: gcc6-SOURCE_DATE_EPOCH.patch # A set of patches from the RH srpm Patch50: gcc41-java-slow_pthread_self.patch Patch51: gcc41-ppc32-retaddr.patch @@ -427,6 +435,16 @@ This package contains 64bit support for the GNU Compiler Collection. +%package devel +Summary: Development files for developing GCC plugins +License: GPL-3.0+ +Group: Development/Languages/C and C++ +Requires: gcc6 = %{version}-%{release} + +%description devel +Development files for developing GCC plugins. + + %package locale Summary: Locale Data for the GNU Compiler Collection License: GPL-3.0+ @@ -1949,6 +1967,7 @@ %patch10 %patch11 -p1 %patch12 +%patch13 %patch50 %patch51 %patch60 @@ -2108,7 +2127,12 @@ %ifnarch %mpx_arch --disable-libmpx \ %endif + --disable-libcc1 \ +%if %{enable_plugins} + --enable-plugin \ +%else --disable-plugin \ +%endif --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} @@ -2174,6 +2198,14 @@ --with-newlib \ %endif %endif +%if "%{TARGET_ARCH}" == "arm" + --with-arch=armv6zk \ + --with-tune=arm1176jzf-s \ + --with-float=hard \ + --with-abi=aapcs-linux \ + --with-fpu=vfp \ + --disable-sjlj-exceptions \ +%endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ @@ -2616,8 +2648,10 @@ rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/mathdef.h rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys/ucontext.h +%if !%{enable_plugins} # no plugins rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin +%endif rm -f $RPM_BUILD_ROOT%{_infodir}/dir %if 0%{?building_libjava:1} @@ -2725,6 +2759,9 @@ %install_info --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz +%ifarch %itm_arch +%install_info --info-dir=%{_infodir} %{_infodir}/libitm%{binsuffix}.info.gz +%endif %if %{build_fortran} %install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz %ifarch %quadmath_arch @@ -2740,13 +2777,16 @@ %install_info --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz %endif -%postun info +%preun info %install_info_delete --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz +%ifarch %itm_arch +%install_info_delete --info-dir=%{_infodir} %{_infodir}/libitm%{binsuffix}.info.gz +%endif %if %{build_fortran} %install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz %ifarch %quadmath_arch @@ -3026,6 +3066,13 @@ %endif %endif +%if %{enable_plugins} +%files devel +%defattr(-,root,root) +%dir %{libsubdir}/plugin +%{libsubdir}/plugin +%endif + %files locale -f gcc6-locale.lang %files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale -f libstdc++.lang @@ -3569,7 +3616,7 @@ %post -n libffi-devel%{libdevel_suffix} %install_info --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz -%postun -n libffi-devel%{libdevel_suffix} +%preun -n libffi-devel%{libdevel_suffix} %install_info_delete --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz %files -n libffi-devel%{libdevel_suffix} ++++++ libgcj-gcc6.spec ++++++ --- /var/tmp/diff_new_pack.aYon0d/_old 2016-07-16 22:10:34.000000000 +0200 +++ /var/tmp/diff_new_pack.aYon0d/_new 2016-07-16 22:10:34.000000000 +0200 @@ -105,6 +105,13 @@ %define build_hsa 0 %endif +# Enable plugins just for Tumbleweed, not for SLE13 +%if %{suse_version} == 1330 +%define enable_plugins 1 +%else +%define enable_plugins 0 +%endif + # Shared library SONAME versions %ifarch hppa %define libgcc_s 4 @@ -265,7 +272,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 Url: http://gcc.gnu.org/ -Version: 6.1.1+r236988 +Version: 6.1.1+r238085 Release: 0 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1) @@ -332,6 +339,7 @@ Patch10: gcc5-no-return-gcc43-workaround.patch Patch11: gcc6-hsa-enablement.patch Patch12: gcc6-disable-aarch64-tsan.patch +Patch13: gcc6-SOURCE_DATE_EPOCH.patch # A set of patches from the RH srpm Patch50: gcc41-java-slow_pthread_self.patch Patch51: gcc41-ppc32-retaddr.patch @@ -723,6 +731,7 @@ %patch10 %patch11 -p1 %patch12 +%patch13 %patch50 %patch51 %patch60 @@ -882,7 +891,12 @@ %ifnarch %mpx_arch --disable-libmpx \ %endif + --disable-libcc1 \ +%if %{enable_plugins} + --enable-plugin \ +%else --disable-plugin \ +%endif --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} @@ -948,6 +962,14 @@ --with-newlib \ %endif %endif +%if "%{TARGET_ARCH}" == "arm" + --with-arch=armv6zk \ + --with-tune=arm1176jzf-s \ + --with-float=hard \ + --with-abi=aapcs-linux \ + --with-fpu=vfp \ + --disable-sjlj-exceptions \ +%endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ @@ -1313,8 +1335,10 @@ rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/mathdef.h rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys/ucontext.h +%if !%{enable_plugins} # no plugins rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin +%endif rm -f $RPM_BUILD_ROOT%{_infodir}/dir %if 0%{?building_libjava:1} @@ -1559,7 +1583,7 @@ %post -n libffi-devel%{libdevel_suffix} %install_info --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz -%postun -n libffi-devel%{libdevel_suffix} +%preun -n libffi-devel%{libdevel_suffix} %install_info_delete --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz %files -n libffi-devel%{libdevel_suffix} ++++++ change_spec ++++++ --- /var/tmp/diff_new_pack.aYon0d/_old 2016-07-16 22:10:34.000000000 +0200 +++ /var/tmp/diff_new_pack.aYon0d/_new 2016-07-16 22:10:34.000000000 +0200 @@ -142,6 +142,7 @@ add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux %define gcc_icecream 1 add_cross cross-armv6hl-gcc$base_ver armv6hl armv6hl-suse-linux-gnueabi %define gcc_icecream 1 add_cross cross-armv7hl-gcc$base_ver armv7hl armv7hl-suse-linux-gnueabi %define gcc_icecream 1 +add_cross cross-arm-gcc$base_ver arm arm-suse-linux-gnueabi %define gcc_icecream 0 add_cross cross-avr-gcc$base_ver avr avr-suse-linux %define gcc_icecream 1 add_cross cross-i386-gcc$base_ver i386 i586-suse-linux %define gcc_icecream 1 add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define gcc_icecream 1 ++++++ cross.spec.in ++++++ --- /var/tmp/diff_new_pack.aYon0d/_old 2016-07-16 22:10:34.000000000 +0200 +++ /var/tmp/diff_new_pack.aYon0d/_new 2016-07-16 22:10:34.000000000 +0200 @@ -19,6 +19,8 @@ %define build_go 0 %define build_hsa 0 +%define enable_plugins 0 + %define binutils_target %{cross_arch} %if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl" %define binutils_target arm @@ -102,7 +104,7 @@ %endif -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} %package -n cross-%cross_arch-gcc@base_ver@-icecream-backend Summary: Icecream backend for the GNU C Compiler Group: Development/Languages/C and C++ @@ -149,7 +151,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir} -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment # The assembler comes from the cross-binutils, and hence is _not_ # named funnily, not even on ppc, so there we need the original target @@ -204,7 +206,7 @@ %{sysroot} %endif -%if 0%{?gcc_icecream:1} +%if 0%{?gcc_icecream:%gcc_icecream} %files -n cross-%cross_arch-gcc@base_ver@-icecream-backend %defattr(-,root,root) /usr/share/icecream-envs ++++++ gcc-6.1.1-r236988.tar.bz2 -> gcc-6.1.1-r238085.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/gcc6/gcc-6.1.1-r236988.tar.bz2 /work/SRC/openSUSE:Factory/.gcc6.new/gcc-6.1.1-r238085.tar.bz2 differ: char 11, line 1 ++++++ gcc.spec.in ++++++ --- /var/tmp/diff_new_pack.aYon0d/_old 2016-07-16 22:10:34.000000000 +0200 +++ /var/tmp/diff_new_pack.aYon0d/_new 2016-07-16 22:10:34.000000000 +0200 @@ -90,6 +90,13 @@ %define build_hsa 0 %endif +# Enable plugins just for Tumbleweed, not for SLE13 +%if %{suse_version} == 1330 +%define enable_plugins 1 +%else +%define enable_plugins 0 +%endif + # Shared library SONAME versions %ifarch hppa %define libgcc_s 4 @@ -254,7 +261,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: http://gcc.gnu.org/ -Version: 6.1.1+r236988 +Version: 6.1.1+r238085 Release: 1 %define gcc_version %(echo %version | sed 's/+.*//') %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1) @@ -323,6 +330,7 @@ Patch10: gcc5-no-return-gcc43-workaround.patch Patch11: gcc6-hsa-enablement.patch Patch12: gcc6-disable-aarch64-tsan.patch +Patch13: gcc6-SOURCE_DATE_EPOCH.patch # A set of patches from the RH srpm Patch50: gcc41-java-slow_pthread_self.patch Patch51: gcc41-ppc32-retaddr.patch @@ -438,6 +446,16 @@ This package contains 64bit support for the GNU Compiler Collection. +%package devel +Summary: Development files for developing GCC plugins +License: GPL-3.0+ +Group: Development/Languages/C and C++ +Requires: gcc@base_ver@ = %{version}-%{release} + +%description devel +Development files for developing GCC plugins. + + %package locale Summary: Locale Data for the GNU Compiler Collection License: GPL-3.0+ @@ -1214,6 +1232,7 @@ %patch10 %patch11 -p1 %patch12 +%patch13 %patch50 %patch51 %patch60 @@ -1373,7 +1392,12 @@ %ifnarch %mpx_arch --disable-libmpx \ %endif + --disable-libcc1 \ +%if %{enable_plugins} + --enable-plugin \ +%else --disable-plugin \ +%endif --with-bugurl="http://bugs.opensuse.org/" \ --with-pkgversion="SUSE Linux" \ %if !%{build_libjava} @@ -1439,6 +1463,14 @@ --with-newlib \ %endif %endif +%if "%{TARGET_ARCH}" == "arm" + --with-arch=armv6zk \ + --with-tune=arm1176jzf-s \ + --with-float=hard \ + --with-abi=aapcs-linux \ + --with-fpu=vfp \ + --disable-sjlj-exceptions \ +%endif %if "%{TARGET_ARCH}" == "armv5tel" --with-arch=armv5te \ --with-float=soft \ @@ -1895,8 +1927,10 @@ rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/mathdef.h rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys/ucontext.h +%if !%{enable_plugins} # no plugins rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin +%endif rm -f $RPM_BUILD_ROOT%{_infodir}/dir @@ -2008,6 +2042,9 @@ %install_info --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz +%ifarch %itm_arch +%install_info --info-dir=%{_infodir} %{_infodir}/libitm%{binsuffix}.info.gz +%endif %if %{build_fortran} %install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz %ifarch %quadmath_arch @@ -2023,13 +2060,16 @@ %install_info --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz %endif -%postun info +%preun info %install_info_delete --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz +%ifarch %itm_arch +%install_info_delete --info-dir=%{_infodir} %{_infodir}/libitm%{binsuffix}.info.gz +%endif %if %{build_fortran} %install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz %ifarch %quadmath_arch @@ -2309,6 +2349,13 @@ %endif %endif +%if %{enable_plugins} +%files devel +%defattr(-,root,root) +%dir %{libsubdir}/plugin +%{libsubdir}/plugin +%endif + %files locale -f gcc@[email protected] %files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale -f libstdc++.lang @@ -2868,7 +2915,7 @@ %post -n libffi-devel%{libdevel_suffix} %install_info --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz -%postun -n libffi-devel%{libdevel_suffix} +%preun -n libffi-devel%{libdevel_suffix} %install_info_delete --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz %files -n libffi-devel%{libdevel_suffix} ++++++ gcc6-SOURCE_DATE_EPOCH.patch ++++++ 2016-04-28 Eduard Sanou <[email protected]> Matthias Klose <[email protected]> * c-common.c (get_source_date_epoch): New function, gets the environment variable SOURCE_DATE_EPOCH and parses it as long long with error handling. * c-common.h (get_source_date_epoch): Prototype. * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch. * doc/cppenv.texi: Document SOURCE_DATE_EPOCH environment variable. * include/cpplib.h (cpp_init_source_date_epoch): Prototype. * init.c (cpp_init_source_date_epoch): New function. * internal.h: Added source_date_epoch variable to struct cpp_reader to store a reproducible date. * macro.c (_cpp_builtin_macro_text): Set pfile->date timestamp from pfile->source_date_epoch instead of localtime if source_date_epoch is set, to be used for __DATE__ and __TIME__ macros to help reproducible builds. 2016-06-01 Eduard Sanou <[email protected]> * c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. * c-common.c (cb_get_source_date_epoch): Use a single generic erorr message when the parsing fails. Use error_at instead of fatal_error. * c-common.h (get_source_date_epoch): Rename to cb_get_source_date_epoch. * c-common.h (cb_get_source_date_epoch): Prototype. * c-common.h (MAX_SOURCE_DATE_EPOCH): Define. * c-common.h (c_omp_region_type): Remove trailing comma. * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback. * c-lex.c (c_lex_with_flags): Remove initialization of pfile->source_date_epoch. * doc/cppenv.texi: Note that the `%s` in `date` is a non-standard extension. * gcc.c (driver_handle_option): Call set_source_date_epoch_envvar. * gcc.c (set_source_date_epoch_envvar): New function, sets the SOURCE_DATE_EPOCH environment variable to the current time. * gcc.dg/cpp/source_date_epoch-1.c: New file, test the proper behaviour of the macros __DATE__ and __TIME__ when SOURCE_DATE_EPOCH env var is set. * gcc.dg/cpp/source_date_epoch-2.c: New file, test the error output when parsing the SOURCE_DATE_EPOCH env var, and make sure it is only shown once. * lib/gcc-dg.exp (dg-set-compiler-env-var): New function, set env vars during compilation. * lib/gcc-dg.exp (restore-compiler-env-var): New function, restore env vars set by dg-set-compiler-env-var. * include/cpplib.h (cpp_callbacks): Add get_source_date_epoch callback. * include/cpplib.h (cpp_init_source_date_epoch): Remove prototype. * init.c (cpp_init_source_date_epoch): Remove function. * init.c (cpp_create_reader): Initialize pfile->source_date_epoch. * internal.h (cpp_reader): Extend comment about source_date_epoch. * macro.c (_cpp_builtin_macro_text): Use get_source_date_epoch callback only once, read pfile->source_date_epoch on future passes. Check that get_source_date_epoch callback is not NULL. 2016-06-13 Jakub Jelinek <[email protected]> PR preprocessor/71183 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch to cb_get_source_date_epoch. * gcc.dg/cpp/source_date_epoch-3.c: New test. Index: gcc/doc/cppenv.texi =================================================================== --- gcc/doc/cppenv.texi.orig 2016-04-18 10:20:41.370190643 +0200 +++ gcc/doc/cppenv.texi 2016-06-10 13:00:43.487479141 +0200 @@ -79,4 +79,21 @@ main input file is omitted. @ifclear cppmanual @xref{Preprocessor Options}. @end ifclear + +@item SOURCE_DATE_EPOCH +If this variable is set, its value specifies a UNIX timestamp to be +used in replacement of the current date and time in the @code{__DATE__} +and @code{__TIME__} macros, so that the embedded timestamps become +reproducible. + +The value of @env{SOURCE_DATE_EPOCH} must be a UNIX timestamp, +defined as the number of seconds (excluding leap seconds) since +01 Jan 1970 00:00:00 represented in ASCII; identical to the output of +@samp{@command{date +%s}} on GNU/Linux and other systems that support the +@code{%s} extension in the @code{date} command. + +The value should be a known timestamp such as the last modification +time of the source or package and it should be set by the build +process. + @end vtable Index: gcc/c-family/c-common.c =================================================================== --- gcc/c-family/c-common.c.orig 2016-04-18 10:19:20.737266917 +0200 +++ gcc/c-family/c-common.c 2016-06-10 13:00:43.491479186 +0200 @@ -12741,4 +12741,33 @@ valid_array_size_p (location_t loc, tree return true; } +/* Read SOURCE_DATE_EPOCH from environment to have a deterministic + timestamp to replace embedded current dates to get reproducible + results. Returns -1 if SOURCE_DATE_EPOCH is not defined. */ + +time_t +cb_get_source_date_epoch (cpp_reader *pfile ATTRIBUTE_UNUSED) +{ + char *source_date_epoch; + long long epoch; + char *endptr; + + source_date_epoch = getenv ("SOURCE_DATE_EPOCH"); + if (!source_date_epoch) + return (time_t) -1; + + errno = 0; + epoch = strtoll (source_date_epoch, &endptr, 10); + if (errno != 0 || endptr == source_date_epoch || *endptr != '\0' + || epoch < 0 || epoch > MAX_SOURCE_DATE_EPOCH) + { + error_at (input_location, "environment variable SOURCE_DATE_EPOCH must " + "expand to a non-negative integer less than or equal to %wd", + MAX_SOURCE_DATE_EPOCH); + return (time_t) -1; + } + + return (time_t) epoch; +} + #include "gt-c-family-c-common.h" Index: gcc/c-family/c-lex.c =================================================================== --- gcc/c-family/c-lex.c.orig 2016-04-18 10:19:20.737266917 +0200 +++ gcc/c-family/c-lex.c 2016-06-10 13:00:43.491479186 +0200 @@ -80,6 +80,7 @@ init_c_lex (void) cb->valid_pch = c_common_valid_pch; cb->read_pch = c_common_read_pch; cb->has_attribute = c_common_has_attribute; + cb->get_source_date_epoch = cb_get_source_date_epoch; /* Set the debug callbacks if we can use them. */ if ((debug_info_level == DINFO_LEVEL_VERBOSE Index: gcc/c-family/c-common.h =================================================================== --- gcc/c-family/c-common.h.orig 2016-05-09 14:29:06.713361354 +0200 +++ gcc/c-family/c-common.h 2016-06-10 13:00:43.491479186 +0200 @@ -1084,6 +1084,16 @@ extern vec<tree, va_gc> *make_tree_vecto c_register_builtin_type. */ extern GTY(()) tree registered_builtin_types; +/* Read SOURCE_DATE_EPOCH from environment to have a deterministic + timestamp to replace embedded current dates to get reproducible + results. Returns -1 if SOURCE_DATE_EPOCH is not defined. */ +extern time_t cb_get_source_date_epoch (cpp_reader *pfile); + +/* The value (as a unix timestamp) corresponds to date + "Dec 31 9999 23:59:59 UTC", which is the latest date that __DATE__ and + __TIME__ can store. */ +#define MAX_SOURCE_DATE_EPOCH HOST_WIDE_INT_C (253402300799) + /* In c-gimplify.c */ extern void c_genericize (tree); extern int c_gimplify_expr (tree *, gimple_seq *, gimple_seq *); Index: libcpp/macro.c =================================================================== --- libcpp/macro.c.orig 2016-04-18 10:19:14.297193140 +0200 +++ libcpp/macro.c 2016-06-10 13:00:43.491479186 +0200 @@ -357,13 +357,24 @@ _cpp_builtin_macro_text (cpp_reader *pfi time_t tt; struct tm *tb = NULL; - /* (time_t) -1 is a legitimate value for "number of seconds - since the Epoch", so we have to do a little dance to - distinguish that from a genuine error. */ - errno = 0; - tt = time(NULL); - if (tt != (time_t)-1 || errno == 0) - tb = localtime (&tt); + /* Set a reproducible timestamp for __DATE__ and __TIME__ macro + if SOURCE_DATE_EPOCH is defined. */ + if (pfile->source_date_epoch == (time_t) -2 + && pfile->cb.get_source_date_epoch != NULL) + pfile->source_date_epoch = pfile->cb.get_source_date_epoch (pfile); + + if (pfile->source_date_epoch >= (time_t) 0) + tb = gmtime (&pfile->source_date_epoch); + else + { + /* (time_t) -1 is a legitimate value for "number of seconds + since the Epoch", so we have to do a little dance to + distinguish that from a genuine error. */ + errno = 0; + tt = time (NULL); + if (tt != (time_t)-1 || errno == 0) + tb = localtime (&tt); + } if (tb) { Index: libcpp/include/cpplib.h =================================================================== --- libcpp/include/cpplib.h.orig 2016-04-18 10:19:14.301193186 +0200 +++ libcpp/include/cpplib.h 2016-06-10 13:00:43.491479186 +0200 @@ -594,6 +594,9 @@ struct cpp_callbacks /* Callback that can change a user builtin into normal macro. */ bool (*user_builtin_macro) (cpp_reader *, cpp_hashnode *); + + /* Callback to parse SOURCE_DATE_EPOCH from environment. */ + time_t (*get_source_date_epoch) (cpp_reader *); }; #ifdef VMS Index: libcpp/init.c =================================================================== --- libcpp/init.c.orig 2016-04-18 10:19:14.985201022 +0200 +++ libcpp/init.c 2016-06-10 13:00:43.491479186 +0200 @@ -257,6 +257,9 @@ cpp_create_reader (enum c_lang lang, cpp /* Do not force token locations by default. */ pfile->forced_token_location_p = NULL; + /* Initialize source_date_epoch to -2 (not yet set). */ + pfile->source_date_epoch = (time_t) -2; + /* The expression parser stack. */ _cpp_expand_op_stack (pfile); @@ -534,7 +537,7 @@ cpp_init_builtins (cpp_reader *pfile, in } /* Sanity-checks are dependent on command-line options, so it is - called as a subroutine of cpp_read_main_file (). */ + called as a subroutine of cpp_read_main_file. */ #if CHECKING_P static void sanity_checks (cpp_reader *); static void sanity_checks (cpp_reader *pfile) Index: libcpp/internal.h =================================================================== --- libcpp/internal.h.orig 2016-04-18 10:19:14.993201114 +0200 +++ libcpp/internal.h 2016-06-10 13:00:43.491479186 +0200 @@ -502,6 +502,11 @@ struct cpp_reader const unsigned char *date; const unsigned char *time; + /* Externally set timestamp to replace current date and time useful for + reproducibility. It should be initialized to -2 (not yet set) and + set to -1 to disable it or to a non-negative value to enable it. */ + time_t source_date_epoch; + /* EOF token, and a token forcing paste avoidance. */ cpp_token avoid_paste; cpp_token eof; Index: gcc/gcc.c =================================================================== --- gcc/gcc.c.orig 2016-06-10 13:00:43.319477245 +0200 +++ gcc/gcc.c 2016-06-10 13:00:43.491479186 +0200 @@ -3540,6 +3540,29 @@ save_switch (const char *opt, size_t n_a n_switches++; } +/* Set the SOURCE_DATE_EPOCH environment variable to the current time if it is + not set already. */ + +static void +set_source_date_epoch_envvar () +{ + /* Array size is 21 = ceil(log_10(2^64)) + 1 to hold string representations + of 64 bit integers. */ + char source_date_epoch[21]; + time_t tt; + + errno = 0; + tt = time (NULL); + if (tt < (time_t) 0 || errno != 0) + tt = (time_t) 0; + + snprintf (source_date_epoch, 21, "%llu", (unsigned long long) tt); + /* Using setenv instead of xputenv because we want the variable to remain + after finalizing so that it's still set in the second run when using + -fcompare-debug. */ + setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0); +} + /* Handle an option DECODED that is unknown to the option-processing machinery. */ @@ -3839,6 +3862,7 @@ driver_handle_option (struct gcc_options else compare_debug_opt = arg; save_switch (compare_debug_replacement_opt, 0, NULL, validated, true); + set_source_date_epoch_envvar (); return true; case OPT_fdiagnostics_color_: Index: gcc/testsuite/lib/gcc-dg.exp =================================================================== --- gcc/testsuite/lib/gcc-dg.exp.orig 2016-04-18 10:20:38.590158796 +0200 +++ gcc/testsuite/lib/gcc-dg.exp 2016-06-10 13:00:43.491479186 +0200 @@ -450,6 +450,38 @@ proc restore-target-env-var { } { } } +proc dg-set-compiler-env-var { args } { + global set_compiler_env_var + global saved_compiler_env_var + if { [llength $args] != 3 } { + error "dg-set-compiler-env-var: need two arguments" + return + } + set var [lindex $args 1] + set value [lindex $args 2] + if [info exists ::env($var)] { + lappend saved_compiler_env_var [list $var 1 $::env($var)] + } else { + lappend saved_compiler_env_var [list $var 0] + } + setenv $var $value + lappend set_compiler_env_var [list $var $value] +} + +proc restore-compiler-env-var { } { + global saved_compiler_env_var + for { set env_vari [llength $saved_compiler_env_var] } { + [incr env_vari -1] >= 0 } {} { + set env_var [lindex $saved_compiler_env_var $env_vari] + set var [lindex $env_var 0] + if [lindex $env_var 1] { + setenv $var [lindex $env_var 2] + } else { + unsetenv $var + } + } +} + # Utility routines. # @@ -873,6 +905,11 @@ if { [info procs saved-dg-test] == [list if [info exists set_target_env_var] { unset set_target_env_var } + if [info exists set_compiler_env_var] { + restore-compiler-env-var + unset set_compiler_env_var + unset saved_compiler_env_var + } if [info exists keep_saved_temps_suffixes] { unset keep_saved_temps_suffixes } Index: gcc/testsuite/gcc.dg/cpp/source_date_epoch-2.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ gcc/testsuite/gcc.dg/cpp/source_date_epoch-2.c 2016-06-10 13:00:43.491479186 +0200 @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-set-compiler-env-var SOURCE_DATE_EPOCH "AAA" } */ + +/* Make sure that SOURCE_DATE_EPOCH is only parsed once */ + +int +main(void) +{ + __builtin_printf ("%s %s\n", __DATE__, __TIME__); /* { dg-error "SOURCE_DATE_EPOCH must expand" } */ + __builtin_printf ("%s %s\n", __DATE__, __TIME__); + return 0; +} Index: gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c 2016-06-10 13:00:43.491479186 +0200 @@ -0,0 +1,11 @@ +/* { dg-do run } */ +/* { dg-set-compiler-env-var SOURCE_DATE_EPOCH "630333296" } */ + +int +main(void) +{ + __builtin_printf ("%s %s\n", __DATE__, __TIME__); + return 0; +} + +/* { dg-output "^Dec 22 1989 12:34:56\n$" } */ Index: gcc/c-family/c-ppoutput.c =================================================================== --- gcc/c-family/c-ppoutput.c (revision 237407) +++ gcc/c-family/c-ppoutput.c (revision 237408) @@ -150,6 +150,7 @@ init_pp_output (FILE *out_stream) } cb->has_attribute = c_common_has_attribute; + cb->get_source_date_epoch = cb_get_source_date_epoch; /* Initialize the print structure. */ print.src_line = 1; Index: gcc/testsuite/gcc.dg/cpp/source_date_epoch-3.c =================================================================== --- gcc/testsuite/gcc.dg/cpp/source_date_epoch-3.c (revision 0) +++ gcc/testsuite/gcc.dg/cpp/source_date_epoch-3.c (revision 237408) @@ -0,0 +1,9 @@ +/* PR preprocessor/71183 */ +/* { dg-do preprocess } */ +/* { dg-set-compiler-env-var SOURCE_DATE_EPOCH "630333296" } */ + +const char *date = __DATE__; +const char *time = __TIME__; + +/* { dg-final { scan-file source_date_epoch-3.i "Dec 22 1989" } } */ +/* { dg-final { scan-file source_date_epoch-3.i "12:34:56" } } */
