%bcond_without objc # build without Objective-C support
%bcond_without objcxx # build without Objective-C++ support
# - features:
+%bcond_with cloogpplleg # use cloog-ppl-legacy (0.15.x) backend (instead of cloog-isl)
+%bcond_with cloogppl # use cloog-ppl 0.16.1 backend (instead of cloog-isl)
%bcond_without gomp # build without OpenMP support
%bcond_without mudflap # build without Mudflap pointer debugging support
%bcond_without multilib # build without multilib support (it needs glibc[32&64]-devel)
%bcond_without x # don't build libgcj Xlib-dependent AWTs (incl. GTK/Qt)
# - other:
%bcond_without bootstrap # omit 3-stage bootstrap
+%bcond_with ppc64_nof # "nof" multilib target in ppc64 compiler
%bcond_with tests # torture gcc
%bcond_with symvers # enable versioned symbols in libstdc++ (WARNING: changes soname from .so.6 to so.7)
%undefine with_ada
%endif
+%if %{with cloogppl}
+%define cloog_backend ppl
+%else
+%if %{with cloogpplleg}
+%define cloog_backend ppl-legacy
+%else
+%define cloog_backend isl
+%endif
+%endif
+
%define major_ver 4.7
-%define minor_ver 1
+%define minor_ver 2
%define major_ecj_ver 4.5
# class data version seen with file(1) that this jvm is able to load
%define _classdataversion 50.0
Summary(pt_BR.UTF-8): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados
Name: gcc
Version: %{major_ver}.%{minor_ver}
-Release: 4
+Release: 1
Epoch: 6
License: GPL v3+
Group: Development/Languages
Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: 933e6f15f51c031060af64a9e14149ff
+# Source0-md5: cc308a0891e778cfda7a151ab8a6e762
Source1: %{name}-optimize-la.pl
Source2: ftp://sourceware.org/pub/java/ecj-%{major_ecj_ver}.jar
# Source2-md5: d7cd6a27c8801e66cbaa964a039ecfdb
# check libffi version with libffi/configure.ac
Source3: libffi.pc.in
-# svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_7_1_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch > gcc-branch.diff
+# svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_7_2_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch > gcc-branch.diff
Patch100: %{name}-branch.diff
Patch0: %{name}-info.patch
+Patch1: %{name}-cloog.patch
Patch2: %{name}-nodebug.patch
Patch3: %{name}-ada-link.patch
Patch4: %{name}-sparc64-ada_fix.patch
BuildRequires: binutils >= 3:2.17.50.0.9-1
BuildRequires: bison
BuildRequires: chrpath >= 0.13-2
-BuildRequires: cloog-ppl-devel
+%if %{with cloogppl}
+BuildRequires: cloog-ppl-devel >= 0.16.1
+%else
+%if %{with cloogpplleg}
+BuildRequires: cloog-ppl-devel >= 0.15.9
+BuildRequires: cloog-ppl-devel < 0.16
+%else
+BuildRequires: cloog-isl-devel >= 0.16.1
+%endif
+%endif
%{?with_tests:BuildRequires: dejagnu}
BuildRequires: elfutils-devel >= 0.145-1
BuildRequires: fileutils >= 4.0.41
BuildRequires: gmp-c++-devel >= 4.1
BuildRequires: libmpc-devel
BuildRequires: mpfr-devel >= 2.3.0
-BuildRequires: ppl-devel
+BuildRequires: ppl-devel >= 0.11
%if %{with python}
BuildRequires: python-devel
BuildRequires: rpm-pythonprov
%setup -q
%patch100 -p0
%patch0 -p1
-# update if it makes speed difference for you
-#%patch2 -p1
+%patch1 -p1
+%patch2 -p1
%patch3 -p1
%patch4 -p1
-# update if you need it
-#%patch6 -p1
+%{!?with_ppc64_nof:%patch6 -p1}
%patch7 -p0
%if %{with qt}
%patch8 -p1
%endif
-# update if you need it
-#%patch10 -p1
+%patch10 -p1
%patch13 -p0
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--x-libraries=%{_libdir} \
+ --%{?with_bootstrap:en}%{!?with_bootstrap:dis}able-bootstrap \
+ --disable-build-with-cxx \
+ --disable-build-poststage1-with-cxx \
+ --enable-c99 \
--enable-checking=release \
+%ifarch %{ix86} %{x8664}
+ --disable-cld \
+%endif
+ --enable-cloog-backend=%{cloog_backend} \
+ %{?with_fortran:--enable-cmath} \
+ --enable-decimal-float \
--enable-gnu-unique-object \
- --with-linker-hash-style=gnu \
- --enable-shared \
- --enable-threads=posix \
- --enable-linker-build-id \
- --enable-linux-futex \
+ --enable-initfini-array \
--enable-languages="c%{?with_cxx:,c++}%{?with_fortran:,fortran}%{?with_objc:,objc}%{?with_objcxx:,obj-c++}%{?with_ada:,ada}%{?with_java:,java}%{?with_go:,go}" \
--%{?with_gomp:en}%{!?with_gomp:dis}able-libgomp \
+ --enable-libitm \
--%{?with_mudflap:en}%{!?with_mudflap:dis}able-libmudflap \
- --enable-c99 \
+ --enable-linker-build-id \
+ --enable-linux-futex \
--enable-long-long \
- --enable-decimal-float=yes \
%{!?with_multilib:--disable-multilib} \
--enable-nls \
- --disable-werror \
--enable-lto \
--enable-plugin \
-%ifarch %{ix86} %{x8664}
- --disable-cld \
+%ifarch ppc ppc64
+ --enable-secureplt \
%endif
+ --enable-shared \
+ --enable-threads=posix \
+ --disable-werror \
+ --with-cloog \
%ifarch sparc64
--with-cpu=ultrasparc \
%endif
+ --with-demangler-in-ld \
--with-gnu-as \
--with-gnu-ld \
- --with-demangler-in-ld \
- --with-system-zlib \
+ --with-linker-hash-style=gnu \
+ --with-long-double-128 \
+ --with-ppl \
--with-slibdir=%{_slibdir} \
%ifnarch ia64
--without-system-libunwind \
%else
--with-system-libunwind \
%endif
+ --with-system-zlib \
%{!?with_java:--without-x} \
- %{?with_fortran:--enable-cmath} \
- --with-long-double-128 \
- --with-ppl \
- --with-cloog-ppl \
- --enable-libitm \
-%ifarch ppc ppc64
- --enable-secureplt \
-%endif
- --enable-initfini-array \
- --disable-build-with-cxx \
- --disable-build-poststage1-with-cxx \
%if %{with cxx}
- --with-gxx-include-dir=%{_includedir}/c++/%{version} \
- --enable-libstdcxx-visibility \
- --disable-libstdcxx-pch \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
+ --disable-libstdcxx-pch \
--enable-libstdcxx-threads \
--enable-libstdcxx-time=rt \
+ --enable-libstdcxx-visibility \
--enable-symvers=gnu%{?with_symvers:-versioned-namespace} \
+ --with-gxx-include-dir=%{_includedir}/c++/%{version} \
%endif
%if %{with java}
- --enable-static-libjava=yes \
- --enable-libjava-multilib=no \
%{!?with_alsa:--disable-alsa} \
%{!?with_dssi:--disable-dssi} \
--disable-gconf-peer \
+ %{?with_gtk:--enable-gtk-cairo} \
%if %{with x}
--enable-java-awt="xlib%{?with_gtk:,gtk}%{?with_qt:,qt}" \
%endif
- %{?with_mozilla:--enable-plugin} \
+ --enable-jni \
--enable-libgcj \
--enable-libgcj-multifile \
--enable-libgcj-database \
- %{?with_gtk:--enable-gtk-cairo} \
- --enable-jni \
+ --disable-libjava-multilib \
+ %{?with_mozilla:--enable-plugin} \
+ --enable-static-libjava \
--enable-xmlj \
%endif
- --%{?with_bootstrap:en}%{!?with_bootstrap:dis}able-bootstrap \
--with-pkgversion="PLD-Linux" \
--with-bugurl="http://bugs.pld-linux.org" \
%{_target_platform}
DESTDIR=$RPM_BUILD_ROOT
cp -p gcc/specs $RPM_BUILD_ROOT%{gcclibdir}
-cp -p %{_target_platform}/libitm/libitm.spec $RPM_BUILD_ROOT%{gcclibdir}
%if %{with multilib}
# create links
%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
+# plugin, .la not needed
+%{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la
+# already packaged in binutils-devel
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+
%if %{with python}
for LIB in lib lib64; do
LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
%attr(755,root,root) %{_libdir}/libssp.so
%{_libdir}/libitm.la
%{_libdir}/libitm.a
+%{_libdir}/libitm.spec
%{_libdir}/libssp.la
%{_libdir}/libssp.a
%{_libdir}/libssp_nonshared.la
%{gcclibdir}/libgcc.a
%{gcclibdir}/libgcc_eh.a
%{gcclibdir}/libgcov.a
-%{gcclibdir}/libitm.spec
%{gcclibdir}/specs
%{gcclibdir}/crt*.o
%attr(755,root,root) %{gcclibdir}/cc1
%{py_sitescriptdir}/libstdcxx/*.py[co]
%dir %{py_sitescriptdir}/libstdcxx/v6
%{py_sitescriptdir}/libstdcxx/v6/*.py[co]
-%{_datadir}/gdb/auto-load/usr/lib*/libstdc++.so.%{cxx_sover}.*.*-gdb.py
+%{_datadir}/gdb/auto-load/usr/%{_lib}/libstdc++.so.%{cxx_sover}.*.*-gdb.py
+%if %{with multilib}
+%{_datadir}/gdb/auto-load/usr/lib/libstdc++.so.%{cxx_sover}.*.*-gdb.py
+%endif
%endif
%files -n libstdc++-devel