#
-# TODO:
-# - openmp
-#
# Conditional build:
-%bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt)
+%bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt, no gomp)
+%bcond_without gomp # OpenMP libraries
#
+%if %{with bootstrap}
+%undefine with_gomp
+%endif
Summary: Cross MinGW32 GNU binary utility development utilities - gcc
Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - MinGW32 gcc
Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - MinGW32 gcc
Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - MinGW32 gcc
Summary(tr.UTF-8): GNU geliştirme araçları - MinGW32 gcc
Name: crossmingw32-gcc
-Version: 4.9.2
-Release: 2
+Version: 4.9.3
+Release: 1
Epoch: 1
License: GPL v3+
Group: Development/Languages
Source0: https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2
-# Source0-md5: 4df8ee253b7f3863ad0b86359cd39c43
+# Source0-md5: 6f831b4d251872736e8e9cc09746f327
%define mingw32_ver 4.0.3
Source1: http://downloads.sourceforge.net/mingw/mingwrt-%{mingw32_ver}-1-mingw32-dev.tar.lzma
# Source1-md5: c2c9aa82e0cb47abac01760525684858
-# svn diff -x --ignore-eol-style --force svn://gcc.gnu.org/svn/gcc/tags/gcc_4_9_2_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch > gcc-branch.diff
+Source2: gcc-optimize-la.pl
+# svn diff -x --ignore-eol-style --force svn://gcc.gnu.org/svn/gcc/tags/gcc_4_9_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch > gcc-branch.diff
Patch100: gcc-branch.diff
-# Patch100-md5: 1f1a11566ddf413cca96fbb04fd790d4
+# Patch100-md5: 253cbf4cc2f71d9c9362f4a3be25bb17
Patch0: %{name}-buildsystem1.patch
Patch1: %{name}-buildsystem2.patch
Patch2: %{name}-lfs.patch
+Patch12: gcc-isl0.15-1.patch
+Patch13: gcc-isl0.15-2.patch
+URL: http://gcc.gnu.org/
BuildRequires: autoconf >= 2.64
BuildRequires: automake >= 1:1.9.3
BuildRequires: bison
BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2
+%{?with_gomp:BuildRequires: crossmingw32-pthreads-w32}
+%if %{without bootstrap}
+BuildRequires: crossmingw32-runtime >= 3.5
+BuildRequires: crossmingw32-w32api >= 3.1
+%endif
BuildRequires: cloog-isl-devel >= 0.17.0
BuildRequires: cloog-isl-devel < 0.19
BuildRequires: flex
BuildRequires: gmp-devel >= 4.1
BuildRequires: isl-devel >= 0.13
BuildRequires: libmpc-devel
-%if %{without bootstrap}
-BuildRequires: crossmingw32-runtime >= 3.5
-BuildRequires: crossmingw32-w32api >= 3.1
-%endif
BuildRequires: mpfr-devel
BuildRequires: perl-tools-pod
BuildRequires: ppl-devel >= 0.11
%description -n crossmingw32-libgcc-dll -l pl.UTF-8
Biblioteka DLL libgcc dla Windows.
+%package -n crossmingw32-libgomp
+Summary: GNU OpenMP library - cross MinGW32 version
+Summary(pl.UTF-8): Biblioteka GNU OpenMP - wersja skrośna MinGW32
+License: GPL v3+ with GCC Runtime Library Exception v3.1
+Group: Development/Libraries
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+%description -n crossmingw32-libgomp
+This package contains cross MinGW32 version of GNU OpenMP library.
+
+%description -n crossmingw32-libgomp -l pl.UTF-8
+Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU OpenMP.
+
+%package -n crossmingw32-libgomp-static
+Summary: Static GNU OpenMP library - cross MinGW32 version
+Summary(pl.UTF-8): Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32
+License: GPL v3+ with GCC Runtime Library Exception v3.1
+Group: Development/Libraries
+Requires: crossmingw32-libgomp = %{epoch}:%{version}-%{release}
+
+%description -n crossmingw32-libgomp-static
+Static GNU OpenMP library - cross MinGW32 version.
+
+%description -n crossmingw32-libgomp-static -l pl.UTF-8
+Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32.
+
+%package -n crossmingw32-libgomp-dll
+Summary: DLL GNU OpenMP library for Windows
+Summary(pl.UTF-8): Biblioteka DLL GNU OpenMP dla Windows
+License: GPL v3+ with GCC Runtime Library Exception v3.1
+Group: Development/Libraries
+Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
+Requires: crossmingw32-pthreads-dll
+
+%description -n crossmingw32-libgomp-dll
+DLL GNU OpenMP library for Windows.
+
+%description -n crossmingw32-libgomp-dll -l pl.UTF-8
+Biblioteka DLL GNU OpenMP dla Windows.
+
%package c++
Summary: MinGW32 binary utility development utilities - g++
Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - g++
%patch100 -p0
%patch0 -p1
%patch2 -p1
+%patch12 -p1
+%patch13 -p1
%if %{with bootstrap}
# note: "winsup" dir is special, handled by gcc's configure
--libexecdir=%{_libdir} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
+ --with-build-time-tools=%{arch}/bin \
%{!?with_bootstrap:--with-headers=%{arch}/include} \
--with-libs=%{!?with_bootstrap:%{arch}/lib}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
- --with-build-time-tools=%{arch}/bin \
--with-dwarf2 \
--with-gnu-as \
--with-gnu-ld \
--with-mangler-in-ld \
--with-long-double-128 \
+ --with-cloog \
--with-ppl \
- --disable-ppl-version-check \
+ --disable-isl-version-check \
+ --enable-shared \
--enable-threads \
--enable-languages="c,c++,fortran,java,objc" \
--enable-c99 \
- --enable-long-long \
--enable-fully-dynamic-string \
+ --enable-libgomp \
--enable-libstdcxx-allocator=new \
+ --enable-long-long \
--enable-version-specific-runtime-libs \
- --enable-shared \
+ --disable-libssp \
+ --disable-multilib \
--disable-nls \
- --disable-symvers \
--disable-sjlj-exceptions \
+ --disable-symvers \
--disable-win32-registry \
- --disable-multilib \
- --disable-libssp \
--target=%{target}
cd ..
%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a
%endif
+# avoid -L poisoning in *.la
+for f in libcaf_single.la libgfortran.la libgfortranbegin.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do
+ file="$RPM_BUILD_ROOT%{gcclibdir}/$f"
+ %{__perl} %{SOURCE2} "$file" %{gcclibdir} >"${file}.fixed"
+ %{__mv} "${file}.fixed" "$file"
+done
+
# for pretty-printers see native gcc
%{__rm} $RPM_BUILD_ROOT%{gcclibdir}/libstdc++.dll.a-gdb.py
%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx
%defattr(644,root,root,755)
%{_dlldir}/libgcc_s_dw2-1.dll
+%if %{with gomp}
+%files -n crossmingw32-libgomp
+%defattr(644,root,root,755)
+%{gcclibdir}/libgomp.dll.a
+%{gcclibdir}/libgomp.la
+%{gcclibdir}/libgomp.spec
+
+%files -n crossmingw32-libgomp-static
+%defattr(644,root,root,755)
+%{gcclibdir}/libgomp.a
+
+%files -n crossmingw32-libgomp-dll
+%defattr(644,root,root,755)
+%{_dlldir}/libgomp-1.dll
+%endif
+
%files c++
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/%{target}-g++
--- /dev/null
+List-Id: <gcc-patches.gcc.gnu.org>
+List-Archive: <http://gcc.gnu.org/ml/gcc-patches/>
+From: Mike Frysinger <vapier at gentoo dot org>
+To: gcc-patches at gcc dot gnu dot org
+Subject: [PATCH] gcc: fix building w/isl-0.15
+Date: Tue, 14 Jul 2015 10:45:12 -0400
+Message-Id: <1436885112-2174-1-git-send-email-vapier@gentoo.org>
+
+---
+ gcc/config.in | 6 ++++++
+ gcc/configure | 31 +++++++++++++++++++++++++++++++
+ gcc/configure.ac | 14 ++++++++++++++
+ gcc/graphite-dependences.c | 14 +++++++-------
+ gcc/graphite-optimize-isl.c | 8 ++++++--
+ gcc/graphite-poly.h | 5 +++++
+ 6 files changed, 69 insertions(+), 9 deletions(-)
+
+diff --git a/gcc/config.in b/gcc/config.in
+index b031a62..23e1757 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -1326,6 +1326,12 @@
+ #endif
+
+
++/* Define if isl_options_set_schedule_serialize_sccs exists. */
++#ifndef USED_FOR_TARGET
++#undef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
++#endif
++
++
+ /* Define if isl_schedule_constraints_compute_schedule exists. */
+ #ifndef USED_FOR_TARGET
+ #undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+diff --git a/gcc/configure b/gcc/configure
+index 9561e5c..6e81298 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -27947,6 +27947,8 @@
+
+ # Check whether isl_schedule_constraints_compute_schedule is available;
+ # it's new in ISL-0.13.
++ # Check whether isl_options_set_schedule_serialize_sccs is available;
++ # it's new in ISL-0.15.
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ISLINC"
+ saved_LIBS="$LIBS"
+@@ -27975,6 +27977,29 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
+ $as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_options_set_schedule_serialize_sccs" >&5
++$as_echo_n "checking Checking for isl_options_set_schedule_serialize_sccs... " >&6; }
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#include <isl/schedule.h>
++int
++main ()
++{
++isl_options_set_schedule_serialize_sccs (NULL, 0);
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++ ac_has_isl_options_set_schedule_serialize_sccs=yes
++else
++ ac_has_isl_options_set_schedule_serialize_sccs=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
++$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
++
+ LIBS="$saved_LIBS"
+ CFLAGS="$saved_CFLAGS"
+
+@@ -27983,6 +28008,12 @@
+ $as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
+
+ fi
++
++ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
++
++$as_echo "#define HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS 1" >>confdefs.h
++
++ fi
+ fi
+
+
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index cb14639..7fb964a 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5535,6 +5535,8 @@
+
+ # Check whether isl_schedule_constraints_compute_schedule is available;
+ # it's new in ISL-0.13.
++ # Check whether isl_options_set_schedule_serialize_sccs is available;
++ # it's new in ISL-0.15.
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ISLINC"
+ saved_LIBS="$LIBS"
+@@ -5547,6 +5549,13 @@
+ [ac_has_isl_schedule_constraints_compute_schedule=no])
+ AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
+
++ AC_MSG_CHECKING([Checking for isl_options_set_schedule_serialize_sccs])
++ AC_TRY_LINK([#include <isl/schedule.h>],
++ [isl_options_set_schedule_serialize_sccs (NULL, 0);],
++ [ac_has_isl_options_set_schedule_serialize_sccs=yes],
++ [ac_has_isl_options_set_schedule_serialize_sccs=no])
++ AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
++
+ LIBS="$saved_LIBS"
+ CFLAGS="$saved_CFLAGS"
+
+@@ -5554,6 +5563,11 @@
+ AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
+ [Define if isl_schedule_constraints_compute_schedule exists.])
+ fi
++
++ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
++ AC_DEFINE(HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS, 1,
++ [Define if isl_options_set_schedule_serialize_sccs exists.])
++ fi
+ fi
+
+
+diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
+index 50fe73e..9a0986d 100644
+--- a/gcc/graphite-dependences.c
++++ b/gcc/graphite-dependences.c
+@@ -205,7 +205,7 @@ scop_get_transformed_schedule (scop_p scop, vec<poly_bb_p> pbbs)
+ /* Helper function used on each MAP of a isl_union_map. Computes the
+ maximal output dimension. */
+
+-static int
++static isl_stat
+ max_number_of_out_dimensions (__isl_take isl_map *map, void *user)
+ {
+ int global_max = *((int *) user);
+@@ -217,7 +217,7 @@ max_number_of_out_dimensions (__isl_take isl_map *map, void *user)
+
+ isl_map_free (map);
+ isl_space_free (space);
+- return 0;
++ return isl_stat_ok;
+ }
+
+ /* Extends the output dimension of MAP to MAX dimensions. */
+@@ -241,12 +241,12 @@ struct extend_schedule_str {
+
+ /* Helper function for extend_schedule. */
+
+-static int
++static isl_stat
+ extend_schedule_1 (__isl_take isl_map *map, void *user)
+ {
+ struct extend_schedule_str *str = (struct extend_schedule_str *) user;
+ str->umap = isl_union_map_add_map (str->umap, extend_map (map, str->max));
+- return 0;
++ return isl_stat_ok;
+ }
+
+ /* Return a relation that has uniform output dimensions. */
+@@ -255,16 +255,16 @@ __isl_give isl_union_map *
+ extend_schedule (__isl_take isl_union_map *x)
+ {
+ int max = 0;
+- int res;
++ isl_stat res;
+ struct extend_schedule_str str;
+
+ res = isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max);
+- gcc_assert (res == 0);
++ gcc_assert (res == isl_stat_ok);
+
+ str.max = max;
+ str.umap = isl_union_map_empty (isl_union_map_get_space (x));
+ res = isl_union_map_foreach_map (x, extend_schedule_1, (void *) &str);
+- gcc_assert (res == 0);
++ gcc_assert (res == isl_stat_ok);
+
+ isl_union_map_free (x);
+ return str.umap;
+diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
+index f490401..388e25c 100644
+--- a/gcc/graphite-optimize-isl.c
++++ b/gcc/graphite-optimize-isl.c
+@@ -506,13 +506,13 @@ getScheduleMap (isl_schedule *Schedule, isl_union_map **map_sepcl)
+ return ScheduleMap;
+ }
+
+-static int
++static isl_stat
+ getSingleMap (__isl_take isl_map *map, void *user)
+ {
+ isl_map **singleMap = (isl_map **) user;
+ *singleMap = map;
+
+- return 0;
++ return isl_stat_ok;
+ }
+
+ static void
+@@ -584,7 +584,11 @@ optimize_isl (scop_p scop)
+
+ isl_options_set_schedule_max_constant_term (scop->ctx, CONSTANT_BOUND);
+ isl_options_set_schedule_maximize_band_depth (scop->ctx, 1);
++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
++ isl_options_set_schedule_serialize_sccs (scop->ctx, 1);
++#else
+ isl_options_set_schedule_fuse (scop->ctx, ISL_SCHEDULE_FUSE_MIN);
++#endif
+ isl_options_set_on_error (scop->ctx, ISL_ON_ERROR_CONTINUE);
+
+ #ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
+diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
+index 7ffd18e..7022a1d 100644
+--- a/gcc/graphite-poly.h
++++ b/gcc/graphite-poly.h
+@@ -24,6 +24,11 @@ along with GCC; see the file COPYING3. If not see
+
+ #include "sese.h"
+
++#ifndef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
++# define isl_stat int
++# define isl_stat_ok 0
++#endif
++
+ typedef struct poly_dr *poly_dr_p;
+
+ typedef struct poly_bb *poly_bb_p;
+--
+2.4.4
+
--- /dev/null
+List-Id: <gcc-patches.gcc.gnu.org>
+List-Archive: <http://gcc.gnu.org/ml/gcc-patches/>
+From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
+To: gcc-patches at gcc dot gnu dot org
+Subject: [PATCH] gcc/: Fix building with isl-0.15.0; includes
+Date: Fri, 17 Jul 2015 13:10:26 +0200
+Message-Id: <1437131426-27008-1-git-send-email-rep.dot.nop@gmail.com>
+In-Reply-To: <1436885112-2174-1-git-send-email-vapier at gentoo dot org>
+References: <1436885112-2174-1-git-send-email-vapier@gentoo.org>
+
+In addition to Mike's "[PATCH] gcc: fix building w/isl-0.15" in
+https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01162.html
+I seem to also need a couple of more includes for isl-0.15.0:
+
+2015-07-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
+
+ * graphite-blocking.c, graphite-dependences.c,
+ graphite-interchange.c, graphite-isl-ast-to-gimple.c,
+ graphite-optimize-isl.c, graphite-poly.c,
+ graphite-scop-detection.c, graphite-sese-to-poly.c,
+ graphite.c: Add missing isl includes.
+---
+ gcc/graphite-blocking.c | 1 +
+ gcc/graphite-dependences.c | 1 +
+ gcc/graphite-interchange.c | 1 +
+ gcc/graphite-isl-ast-to-gimple.c | 2 ++
+ gcc/graphite-optimize-isl.c | 2 ++
+ gcc/graphite-poly.c | 1 +
+ gcc/graphite-scop-detection.c | 1 +
+ gcc/graphite-sese-to-poly.c | 1 +
+ gcc/graphite.c | 1 +
+ 9 files changed, 11 insertions(+)
+
+diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c
+index aee51a8..bcf7f3b 100644
+--- a/gcc/graphite-interchange.c
++++ b/gcc/graphite-interchange.c
+@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3.
+ #include "config.h"
+
+ #ifdef HAVE_cloog
++#include <isl/constraint.h>
+ #include <isl/aff.h>
+ #include <isl/set.h>
+ #include <isl/map.h>
+diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
+index 388e25c..2b55783 100644
+--- a/gcc/graphite-optimize-isl.c
++++ b/gcc/graphite-optimize-isl.c
+@@ -21,7 +21,9 @@ along with GCC; see the file COPYING3.
+ #include "config.h"
+
+ #ifdef HAVE_cloog
++#include <isl/constraint.h>
+ #include <isl/set.h>
++#include <isl/union_set.h>
+ #include <isl/map.h>
+ #include <isl/union_map.h>
+ #include <isl/schedule.h>
+diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
+index 47e0da0..22fdde3 100644
+--- a/gcc/graphite-scop-detection.c
++++ b/gcc/graphite-scop-detection.c
+@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3.
+ #include "config.h"
+
+ #ifdef HAVE_cloog
++#include <isl/constraint.h>
+ #include <isl/set.h>
+ #include <isl/map.h>
+ #include <isl/union_map.h>
+diff --git a/gcc/graphite.c b/gcc/graphite.c
+index a81ef6a..32f405a 100644
+--- a/gcc/graphite.c
++++ b/gcc/graphite.c
+@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3.
+ #include "config.h"
+
+ #ifdef HAVE_cloog
++#include <isl/constraint.h>
+ #include <isl/set.h>
+ #include <isl/map.h>
+ #include <isl/options.h>
+--
+1.7.10.4
+
--- /dev/null
+#!/usr/bin/perl
+
+sub trim
+{
+ my $string = shift;
+ $string =~ s/^\s+//;
+ $string =~ s/\s+$//;
+ return $string;
+}
+
+open(F, $ARGV[0]) or die("cannot open file: $ARGV[0]\n");
+@lines = <F>;
+close(F);
+
+@deps = ();
+
+foreach (@lines)
+{
+ if (/(^dependency_libs='(.*)')[\ \t]*$/)
+ {
+ my $trimmed = trim($2);
+ $trimmed =~ y/'//d;
+ @libs = split(/[\ \t\n]+/, $trimmed);
+ @L = grep(/^-L.*gcc\/.*\/\d\.\d\.\d(\/(32|64|x32|nof))*$/, @libs);
+ @l = grep(/^(-l.*|\/.*\.la$)/, @libs);
+ $opt_L = join(' ', @L);
+ $opt_l = join(' ', @l);
+ print("dependency_libs='");
+ print($opt_L);
+ if (scalar(@L))
+ {
+ print(" ");
+ }
+ print($opt_l);
+ print("'\n");
+ }
+ elsif (/^libdir='(.*)'/)
+ {
+ print("libdir='$ARGV[1]'\n");
+ }
+ else
+ {
+ print($_);
+ }
+}