[cross-gcc] de-cloog and de-isl gcc srpm
David Howells
dhowells at fedoraproject.org
Wed Jan 14 14:55:02 UTC 2015
commit 4c9c91a471cb38d59bc470a64fe03fdb678d88d4
Author: David Howells <dhowells at redhat.com>
Date: Wed Dec 10 21:32:31 2014 +0000
de-cloog and de-isl gcc srpm
cross-gcc.spec | 96 ++++----------------------------------------------
gcc49-cloog-dl.patch | 16 +++++++-
sources | 2 -
3 files changed, 21 insertions(+), 93 deletions(-)
---
diff --git a/cross-gcc.spec b/cross-gcc.spec
index 9b3fa2e..4ea699b 100644
--- a/cross-gcc.spec
+++ b/cross-gcc.spec
@@ -53,7 +53,6 @@
# not available in binutils-2.22
%define build_unicore32 0
-%global build_cloog 1
%global multilib_64_archs sparc64 ppc64 s390x x86_64
# we won't build libgcc for these as it depends on C library or kernel headers
@@ -75,6 +74,8 @@
%global gcc_release 5
%global cross_gcc_release 2
%global cross_binutils_version 2.25-1
+%global isl_version 0.14
+%global cloog_version 0.18.3
Summary: Cross C compiler
Name: %{cross}-gcc
@@ -85,6 +86,8 @@ Release: %{cross_gcc_release}%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Group: Development/Languages
URL: http://gcc.gnu.org
+BuildRequires: isl >= %{isl_version}
+BuildRequires: cloog >= %{cloog_version}
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
@@ -92,10 +95,6 @@ URL: http://gcc.gnu.org
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
%define srcdir gcc-%{version}-%{DATE}
Source0: %{srcdir}.tar.bz2
-%global isl_version 0.12.2
-Source1: ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-%{isl_version}.tar.bz2
-%global cloog_version 0.18.1
-Source2: ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-%{cloog_version}.tar.gz
Patch0: gcc49-hack.patch
Patch1: gcc49-java-nomulti.patch
@@ -106,7 +105,6 @@ Patch5: gcc49-sparc-config-detection.patch
Patch6: gcc49-libgomp-omp_h-multilib.patch
Patch7: gcc49-libtool-no-rpath.patch
Patch8: gcc49-cloog-dl.patch
-Patch9: gcc49-cloog-dl2.patch
Patch10: gcc49-pr38757.patch
Patch11: gcc49-libstdc++-docs.patch
Patch12: gcc49-no-add-needed.patch
@@ -125,8 +123,6 @@ Patch901: cross-gcc-with-libgcc.patch
Patch903: cross-gcc-bfin.patch
Patch904: cross-gcc-c6x.patch
-Patch1100: cloog-0.18.1-ppc64le-config.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: binutils >= 2.20.51.0.2-12
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
@@ -166,6 +162,8 @@ Group: Development/Languages \
Requires: %{cross}-gcc-common == %{version}-%{release} \
BuildRequires: %{rpmprefix}binutils-%1 >= %{cross_binutils_version} \
Requires: %{rpmprefix}binutils-%1 >= %{cross_binutils_version} \
+Requires: isl >= %{isl_version} \
+Requires: cloog >= %{cloog_version} \
%description -n %{rpmprefix}gcc-%1 \
Cross-build GNU C compiler. \
\
@@ -257,7 +255,7 @@ the number of packages. \
###############################################################################
%prep
-%setup -q -n %{srcdir} -c -a 1 -a 2
+%setup -q -n %{srcdir} -c
cd %{srcdir}
%patch0 -p0 -b .hack~
%patch1 -p0 -b .java-nomulti~
@@ -267,10 +265,7 @@ cd %{srcdir}
%patch5 -p0 -b .sparc-config-detection~
%patch6 -p0 -b .libgomp-omp_h-multilib~
%patch7 -p0 -b .libtool-no-rpath~
-%if %{build_cloog}
%patch8 -p0 -b .cloog-dl~
-%patch9 -p0 -b .cloog-dl2~
-%endif
%patch10 -p0 -b .pr38757~
# % if %{build_libstdcxx_docs}
# % patch11 -p0 -b .libstdc++-docs~
@@ -291,10 +286,6 @@ rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch903 -p0 -b .bfin~
%patch904 -p0 -b .c6x~
-cd ..
-%patch1100 -p0 -b .cloog-ppc64le-config~
-cd %{srcdir}
-
# Move the version number back
sed -i -e 's/4\.9\.3/4.9.2/' gcc/BASE-VER
echo 'Red Hat Cross %{version}-%{cross_gcc_release}' > gcc/DEV-PHASE
@@ -393,66 +384,6 @@ fi
export CONFIG_SITE=NONE
#
-# Configure and build the ISL and CLooG libraries
-#
-%if %{build_cloog}
-
-%define isl_source %{builddir}/isl-%{isl_version}
-%define isl_build %{builddir}/isl-build
-%define isl_install %{builddir}/isl-install
-
-mkdir %{isl_build} %{isl_install}
-%ifarch s390 s390x
-ISL_FLAG_PIC=-fPIC
-%else
-ISL_FLAG_PIC=-fpic
-%endif
-cd %{isl_build}
-%{isl_source}/configure \
- --disable-shared \
- CC=/usr/bin/gcc \
- CXX=/usr/bin/g++ \
- CFLAGS="${CFLAGS:-%optflags} $ISL_FLAG_PIC" \
- --prefix=%{isl_install}
-make %{?_smp_mflags}
-make install
-cd ..
-
-%define cloog_source %{builddir}/cloog-%{cloog_version}
-%define cloog_build %{builddir}/cloog-build
-%define cloog_install %{builddir}/cloog-install
-
-mkdir %{cloog_build} %{builddir}/cloog-install
-cd %{cloog_build}
-cat >> %{cloog_source}/source/isl/constraints.c << \EOF
-#include <isl/flow.h>
-static void __attribute__((used)) *s1 = (void *) isl_union_map_compute_flow;
-static void __attribute__((used)) *s2 = (void *) isl_map_dump;
-EOF
-sed -i 's|libcloog|libgcc49privatecloog|g' \
- %{cloog_source}/{,test/}Makefile.{am,in}
-
-%{cloog_source}/configure \
- --with-isl=system \
- --with-isl-prefix=%{isl_install} \
- CC=/usr/bin/gcc \
- CXX=/usr/bin/g++ \
- CFLAGS="${CFLAGS:-%optflags}" \
- CXXFLAGS="${CXXFLAGS:-%optflags}" \
- --prefix=%{cloog_install}
-sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-make %{?_smp_mflags}
-make %{?_smp_mflags} install
-cd %{cloog_install}/lib
-rm libgcc49privatecloog-isl.so{,.4}
-mv libgcc49privatecloog-isl.so.4.0.0 libcloog-isl.so.4
-ln -sf libcloog-isl.so.4 libcloog-isl.so
-ln -sf libcloog-isl.so.4 libcloog.so
-
-%endif
-
-#
# Configure the compiler
#
cd %{builddir}
@@ -581,11 +512,6 @@ function config_target () {
--with-system-libunwind \
--with-system-zlib \
--without-headers \
-%if %{build_cloog}
- --with-isl=%{isl_install} --with-cloog=%{cloog_install} \
-%else
- --without-isl --without-cloog \
-%endif
$CONFIG_FLAGS
%if 0
--libdir=%{_libdir} # we want stuff in /usr/lib/gcc/ not /usr/lib64/gcc
@@ -673,14 +599,6 @@ done
grep ^powerpc target.list | sed -e s/powerpc/ppc/ >symlink-target.list
-# We have to copy cloog somewhere graphite can dlopen it from
-%if %{build_cloog}
-for i in %{buildroot}%{_prefix}/lib/gcc/*/%{gcc_version}
-do
- cp -a %{cloog_install}/lib/libcloog-isl.so.4 $i
-done
-%endif
-
# For cross-gcc we drop the documentation.
rm -rf %{buildroot}%{_infodir}
diff --git a/gcc49-cloog-dl.patch b/gcc49-cloog-dl.patch
index 8a72509..dc1cc27 100644
--- a/gcc49-cloog-dl.patch
+++ b/gcc49-cloog-dl.patch
@@ -27,17 +27,25 @@
# and compile them.
--- gcc/graphite-poly.h.jj 2012-12-13 11:31:27.000000000 +0100
+++ gcc/graphite-poly.h 2012-12-14 13:41:41.970800726 +0100
-@@ -22,6 +22,371 @@ along with GCC; see the file COPYING3.
+@@ -22,6 +22,383 @@ along with GCC; see the file COPYING3.
#ifndef GCC_GRAPHITE_POLY_H
#define GCC_GRAPHITE_POLY_H
+#include <isl/aff.h>
++#include <isl/deprecated/aff_int.h>
++#include <isl/deprecated/constraint_int.h>
+#include <isl/schedule.h>
+#include <isl/ilp.h>
++#include <isl/deprecated/ilp_int.h>
+#include <isl/flow.h>
+#include <isl/options.h>
+#include <cloog/isl/cloog.h>
+#include <dlfcn.h>
++#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
++#define DYNSYM_ISL_BAND_MEMBER_IS_COINCIDENT DYNSYM (isl_band_member_is_coincident)
++#else
++#define DYNSYM_ISL_BAND_MEMBER_IS_COINCIDENT DYNSYM (isl_band_member_is_zero_distance)
++#endif
+#define DYNSYMS \
+ DYNSYM (clast_pprint); \
+ DYNSYM (cloog_clast_create_from_input); \
@@ -69,7 +77,7 @@
+ DYNSYM (isl_band_list_get_band); \
+ DYNSYM (isl_band_list_get_ctx); \
+ DYNSYM (isl_band_list_n_band); \
-+ DYNSYM (isl_band_member_is_zero_distance); \
++ DYNSYM_ISL_BAND_MEMBER_IS_COINCIDENT; \
+ DYNSYM (isl_band_n_member); \
+ DYNSYM (isl_basic_map_add_constraint); \
+ DYNSYM (isl_basic_map_project_out); \
@@ -252,7 +260,11 @@
+#define isl_band_list_get_band (*cloog_pointers__.p_isl_band_list_get_band)
+#define isl_band_list_get_ctx (*cloog_pointers__.p_isl_band_list_get_ctx)
+#define isl_band_list_n_band (*cloog_pointers__.p_isl_band_list_n_band)
++#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
++#define isl_band_member_is_coincident (*cloog_pointers__.p_isl_band_member_is_coincident)
++#else
+#define isl_band_member_is_zero_distance (*cloog_pointers__.p_isl_band_member_is_zero_distance)
++#endif
+#define isl_band_n_member (*cloog_pointers__.p_isl_band_n_member)
+#define isl_basic_map_add_constraint (*cloog_pointers__.p_isl_basic_map_add_constraint)
+#define isl_basic_map_project_out (*cloog_pointers__.p_isl_basic_map_project_out)
diff --git a/sources b/sources
index a581d40..c1a53ec 100644
--- a/sources
+++ b/sources
@@ -1,3 +1 @@
-e039bfcfb6c2ab039b8ee69bf883e824 isl-0.12.2.tar.bz2
-e34fca0540d840e5d0f6427e98c92252 cloog-0.18.1.tar.gz
689887cca4a28c1385169bc5d3a14c77 gcc-4.9.2-20150107.tar.bz2
More information about the scm-commits
mailing list