# TODO:
# - gconf peer? (but libgcj needs split anyway)
# - package?
-# /usr/bin/aot-compile
-# /usr/bin/gjdoc
-# /usr/share/man/man1/aot-compile.1.gz
+# /usr/bin/gjdoc [BR: antlr.jar] (but see gjdoc package, there are some additional jars?)
# /usr/share/man/man1/gjdoc.1.gz
-# /usr/share/python/aotcompile.py
-# /usr/share/python/classfile.py
-# - missing libffi.pc required by some packages (eg. python-pygobject)
#
# Conditional build:
+# - languages:
%bcond_without ada # build without ADA support
%bcond_without cxx # build without C++ support
%bcond_without fortran # build without Fortran support
-%bcond_without gomp # build without OpenMP support
+%bcond_without go # build without Go support
%bcond_without java # build without Java support
-%bcond_without mudflap # build without Mudflap pointer debugging support
%bcond_without objc # build without Objective-C support
%bcond_without objcxx # build without Objective-C++ support
+# - features:
+%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_with profiling # build with profiling
+%bcond_without python # build without libstdc++ printers for gdb and aot-compile for java
+# - libgcj options:
%bcond_without alsa # don't build libgcj ALSA MIDI interface
%bcond_without dssi # don't build libgcj DSSI MIDI interface
%bcond_without gtk # don't build libgcj GTK peer
%bcond_without apidocs # do not build and package API docs
-%bcond_with mozilla # don't build libgcjwebplugin (needs fix for new xulrunner)
+%bcond_with mozilla # build libgcjwebplugin (needs fix for new xulrunner)
%bcond_with qt # build libgcj Qt peer (currently doesn't build with libtool-2.x)
%bcond_without x # don't build libgcj Xlib-dependent AWTs (incl. GTK/Qt)
-%bcond_without multilib # build without multilib support (it needs glibc[32&64]-devel)
-%bcond_with profiling # build with profiling
-%bcond_without python # build without libstdc++ python pretty printers for gdb
+# - other:
%bcond_without bootstrap # omit 3-stage bootstrap
%bcond_with tests # torture gcc
%if %{without cxx}
+%undefine with_go
%undefine with_java
%undefine with_objcxx
%endif
%undefine with_multilib
%endif
+%ifarch i386 i486
+# __i686.get_pc_thunk.bx undefined in libgo (TODO: recheck on gcc updates)
+%undefine with_go
+%endif
+
%ifarch sparc64
%undefine with_ada
%endif
%define major_ver 4.6
-%define minor_ver 0
+%define minor_ver 3
%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: 0.1
+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: 93d1c436bf991564524701259b6285a2
+# Source0-md5: 773092fe5194353b02bb0110052a972e
Source1: %{name}-optimize-la.pl
Source2: ftp://sourceware.org/pub/java/ecj-%{major_ecj_ver}.jar
# Source2-md5: d7cd6a27c8801e66cbaa964a039ecfdb
-# svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_6_0_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch > gcc-branch.diff
+# 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_6_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch > gcc-branch.diff
Patch100: %{name}-branch.diff
Patch0: %{name}-info.patch
Patch2: %{name}-nodebug.patch
Patch10: %{name}-moresparcs.patch
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41757
Patch12: %{name}-plugin-decl-hook.patch
+Patch13: issue4664051.patch
URL: http://gcc.gnu.org/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.64
%{?with_tests:BuildRequires: autogen}
-BuildRequires: automake
+BuildRequires: automake >= 1:1.9.3
# binutils 2.17.50.0.9 or newer are required for fixing PR middle-end/20218.
-BuildRequires: binutils >= 2:2.17.50.0.9-1
+BuildRequires: binutils >= 3:2.17.50.0.9-1
BuildRequires: bison
BuildRequires: chrpath >= 0.13-2
+BuildRequires: cloog-ppl-devel
%{?with_tests:BuildRequires: dejagnu}
BuildRequires: elfutils-devel >= 0.145-1
BuildRequires: fileutils >= 4.0.41
BuildRequires: gmp-devel >= 4.1
BuildRequires: libmpc-devel
BuildRequires: mpfr-devel >= 2.3.0
+BuildRequires: ppl-devel
%if %{with python}
BuildRequires: python-devel
BuildRequires: rpm-pythonprov
BuildRequires: perl-base
BuildRequires: perl-tools-pod
BuildRequires: pkgconfig
+BuildRequires: sed >= 4.0
BuildRequires: unzip
BuildRequires: zip
%if %{with gtk}
Summary: libstdc++ pretty printers for GDB
Summary(pl.UTF-8): Funkcje wypisujące dane libstdc++ dla GDB
Group: Development/Debuggers
-Requires: python-gdb
%description -n libstdc++-gdb
This package contains Python scripts for GDB pretty printing of the
Group: Development/Languages/Fortran
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: libgfortran = %{epoch}:%{version}-%{release}
+Requires: libquadmath-devel = %{epoch}:%{version}-%{release}
Provides: gcc-g77 = %{epoch}:%{version}-%{release}
Obsoletes: egcs-g77
Obsoletes: gcc-g77
Group: Development/Languages/Fortran
Requires: %{name}-fortran = %{epoch}:%{version}-%{release}
Requires: libgfortran-multilib = %{epoch}:%{version}-%{release}
+Requires: libquadmath-multilib-devel = %{epoch}:%{version}-%{release}
%description fortran-multilib
This package adds support for compiling 32-bit Fortran 95 programs
Summary(pl.UTF-8): Biblioteka Fortrana 95
License: GPL v2+ with unlimited link permission
Group: Libraries
+Requires: libquadmath = %{epoch}:%{version}-%{release}
Obsoletes: libg2c
%description -n libgfortran
Summary(pl.UTF-8): Biblioteka Fortrana 95 - wersja 32-bitowa
License: GPL v2+ with unlimited link permission
Group: Libraries
+Requires: libquadmath-multilib = %{epoch}:%{version}-%{release}
%description -n libgfortran-multilib
Fortran 95 Library - 32-bit version.
oraz bajtkodu do kodu natywnego. Do używania go wymagany jest
dodatkowo pakiet libgcj.
+%package java-aotcompile
+Summary: Java AOT-compiler - compiling bytecode to native
+Summary(pl.UTF-8): Kompilator AOT dla Javy - kompilacja bajtkodu do kodu natywnego
+License: GPL v2+
+Group: Development/Tools
+Requires: %{name}-java = %{epoch}:%{version}-%{release}
+
+%description java-aotcompile
+aot-compile is a script that searches a directory for Java bytecode
+(as class files, or in jars) and uses gcj to compile it to native code
+and generate the databases from it.
+
+%description java-aotcompile -l pl.UTF-8
+aot-compile to skrypt wyszukujący w katalogu bajtkod Javy (w plikach
+class lub jarach) i kompilujący go przy użyciu gcj, a następnie
+generujący z niego bazy danych.
+
%package -n libgcj
Summary: Java Class Libraries
Summary(es.UTF-8): Bibliotecas de clases de Java
%description -n libobjc-multilib-static -l pl.UTF-8
Statyczna biblioteki Obiektowego C - wersja 32-bitowa.
+%package go
+Summary: Go language support for gcc
+Summary(pl.UTF-8): Obsługa języka Go dla kompilatora gcc
+License: GPL v3+ (gcc), BSD (Go-specific part)
+Group: Development/Languages
+Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: libgo-devel = %{epoch}:%{version}-%{release}
+
+%description go
+This package adds Go language support to the GNU Compiler Collection.
+
+%description go -l pl.UTF-8
+Ten pakiet dodaje obsługę języka Go do kompilatora gcc.
+
+%package go-multilib
+Summary: 32-bit Go language support for gcc
+Summary(pl.UTF-8): Obsługa 32-bitowych binariów języka Go dla kompilatora gcc
+License: GPL v3+ (gcc), BSD (Go-specific part)
+Group: Development/Languages
+Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: libgo-multilib-devel = %{epoch}:%{version}-%{release}
+
+%description go-multilib
+This package adds 32-bit Go language support to the GNU Compiler
+Collection.
+
+%description go-multilib -l pl.UTF-8
+Ten pakiet dodaje obsługę 32-bitowych binariów języka Go do
+kompilatora gcc.
+
+%package -n libgo
+Summary: Go language library
+Summary(pl.UTF-8): Biblioteka języka Go
+License: BSD
+Group: Libraries
+Requires: libgcc >= %{epoch}:%{version}-%{release}
+
+%description -n libgo
+Go language library.
+
+%description -n libgo -l pl.UTF-8
+Biblioteka języka Go.
+
+%package -n libgo-multilib
+Summary: Go language library - 32-bit version
+Summary(pl.UTF-8): Biblioteka języka Go - wersja 32-bitowa
+License: BSD
+Group: Libraries
+Requires: libgcc-multilib >= %{epoch}:%{version}-%{release}
+
+%description -n libgo-multilib
+Go language library - 32-bit version.
+
+%description -n libgo-multilib -l pl.UTF-8
+Biblioteka języka Go - wersja 32-bitowa.
+
+%package -n libgo-devel
+Summary: Development files for Go language library
+Summary(pl.UTF-8): Pliki programistyczne biblioteki języka Go
+License: BSD
+Group: Development/Libraries
+Requires: glibc-devel
+Requires: libgo = %{epoch}:%{version}-%{release}
+
+%description -n libgo-devel
+Development files for Go language library.
+
+%description -n libgo-devel -l pl.UTF-8
+Pliki programistyczne biblioteki języka Go.
+
+%package -n libgo-multilib-devel
+Summary: Development files for Go language library - 32-bit version
+Summary(pl.UTF-8): Pliki programistyczne biblioteki języka Go - wersja 32-bitowa
+License: BSD
+Group: Development/Libraries
+Requires: glibc-devel
+Requires: libgo-multilib = %{epoch}:%{version}-%{release}
+
+%description -n libgo-multilib-devel
+Development files for Go language library - 32-bit version.
+
+%description -n libgo-multilib-devel -l pl.UTF-8
+Pliki programistyczne biblioteki języka Go - wersja 32-bitowa.
+
+%package -n libgo-static
+Summary: Static Go language library
+Summary(pl.UTF-8): Statyczna biblioteka języka Go
+License: BSD
+Group: Development/Libraries
+Requires: libgo-devel = %{epoch}:%{version}-%{release}
+
+%description -n libgo-static
+Static Go language library.
+
+%description -n libgo-static -l pl.UTF-8
+Statyczna biblioteka języka Go.
+
+%package -n libgo-multilib-static
+Summary: Static Go language library - 32-bit version
+Summary(pl.UTF-8): Statyczna biblioteka języka Go - wersja 32-bitowa
+License: BSD
+Group: Development/Libraries
+Requires: libgo-multilib-devel = %{epoch}:%{version}-%{release}
+
+%description -n libgo-multilib-static
+Static Go language library - 32-bit version.
+
+%description -n libgo-multilib-static -l pl.UTF-8
+Statyczna biblioteka języka Go - wersja 32-bitowa.
+
%prep
%setup -q
%patch100 -p0
%endif
%patch10 -p1
%patch12 -p1
+%patch13 -p0
mv ChangeLog ChangeLog.general
%if %{with java}
# see contrib/download_ecj
-install %{SOURCE2} ecj.jar
+cp -p %{SOURCE2} ecj.jar
%endif
# override snapshot version.
--enable-threads=posix \
--enable-linker-build-id \
--enable-linux-futex \
- --enable-languages="c%{?with_cxx:,c++}%{?with_fortran:,fortran}%{?with_objc:,objc}%{?with_objcxx:,obj-c++}%{?with_ada:,ada}%{?with_java:,java}" \
+ --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 \
--%{?with_mudflap:en}%{!?with_mudflap:dis}able-libmudflap \
--enable-c99 \
%{!?with_java:--without-x} \
%{?with_fortran:--enable-cmath} \
--with-long-double-128 \
+ --with-ppl \
+ --with-cloog-ppl \
%ifarch ppc ppc64
--enable-secureplt \
%endif
infodir=%{_infodir} \
DESTDIR=$RPM_BUILD_ROOT
-install gcc/specs $RPM_BUILD_ROOT%{gcclibdir}
+cp -p gcc/specs $RPM_BUILD_ROOT%{gcclibdir}
%if %{with multilib}
# create links
install -d java-doc
cp -f libjava/READ* java-doc
ln -sf libgcj-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/libgcj.jar
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/classpath/libgjs*.la
-# tools.zip sources
-%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/classpath/tools/gnu
# still not installed by gcc?
[ ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/libffi.pc ] || exit 1
done
%endif
-cp %{gcclibdir}/install-tools/include/*.h %{gcclibdir}/include
-cp %{gcclibdir}/include-fixed/syslimits.h %{gcclibdir}/include
-%{__rm} -r %{gcclibdir}/install-tools
-%{__rm} -r %{gcclibdir}/include-fixed
+cp -p $RPM_BUILD_ROOT%{gcclibdir}/install-tools/include/*.h $RPM_BUILD_ROOT%{gcclibdir}/include
+cp -p $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/syslimits.h $RPM_BUILD_ROOT%{gcclibdir}/include
+%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
+%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
%if %{with python}
for LIB in lib lib64; do
sed -e 's,@pythondir@,%{_datadir}/gdb,' \
-e 's,@toolexeclibdir@,%{_prefix}/'"$LIB," \
< libstdc++-v3/python/hook.in \
- > $LIBPATH/$(basename $RPM_BUILD_ROOT/%{_prefix}/%{_lib}/libstdc++.so.*.*.*)-gdb.py
+ > $LIBPATH/$(basename $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libstdc++.so.*.*.*)-gdb.py
done
install -d $RPM_BUILD_ROOT%{py_sitescriptdir}
-cp -a libstdc++-v3/python/libstdcxx $RPM_BUILD_ROOT%{py_sitescriptdir}
+mv $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx $RPM_BUILD_ROOT%{py_sitescriptdir}
+%if %{with java}
+mv $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libjava $RPM_BUILD_ROOT%{py_sitescriptdir}
+%endif
+%{__sed} -i -e '1s,#!/usr/bin/env python,#!/usr/bin/python,' $RPM_BUILD_ROOT%{_bindir}/aot-compile
%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
%py_postclean
+%else
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx
+%if %{with java}
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libjava
+%endif
+%endif
+# script(s) always installed; see above for builds with python; if no python, just don't package
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libstdc++.so.*-gdb.py
+%if %{with multilib}
+%{__rm} $RPM_BUILD_ROOT%{_libdir32}/libstdc++.so.*-gdb.py
%endif
%find_lang gcc
%if %{with cxx}
%find_lang libstdc\+\+
-install libstdc++-v3/include/precompiled/* $RPM_BUILD_ROOT%{_includedir}
+cp -p libstdc++-v3/include/precompiled/* $RPM_BUILD_ROOT%{_includedir}
%endif
-# gdb stuff maybe?
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.py
-%if %{with multilib}
-%{__rm} $RPM_BUILD_ROOT%{_libdir32}/*.py
-%endif
+# always -f, as "dir" is created depending which texlive version is installed
+%{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
# svn snap doesn't contain (release does) below files,
# so let's create dummy entries to satisfy %%files.
%postun java -p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}
+%post go -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
+%postun go -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
%post -p /sbin/ldconfig -n libgcc
%postun -p /sbin/ldconfig -n libgcc
%post -p /sbin/ldconfig -n libgcc-multilib
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
%post -p /sbin/ldconfig -n libquadmath-multilib
%postun -p /sbin/ldconfig -n libquadmath-multilib
+%post -p /sbin/ldconfig -n libgo
+%postun -p /sbin/ldconfig -n libgo
+%post -p /sbin/ldconfig -n libgo-multilib
+%postun -p /sbin/ldconfig -n libgo-multilib
%files -f gcc.lang
%defattr(644,root,root,755)
%{gcclibdir}/include/xmmintrin.h
%{gcclibdir}/include/xopintrin.h
%endif
+%ifarch arm
+%{gcclibdir}/include/arm_neon.h
+%{gcclibdir}/include/mmintrin.h
+%endif
+%ifarch ia64
+%{gcclibdir}/include/ia64intrin.h
+%endif
+%ifarch m68k
+%{gcclibdir}/include/math-68881.h
+%endif
+%ifarch mips
+%{gcclibdir}/include/loongson.h
+%endif
%ifarch powerpc ppc ppc64
%{gcclibdir}/include/altivec.h
%{gcclibdir}/include/paired.h
%{py_sitescriptdir}/libstdcxx/*.py[co]
%dir %{py_sitescriptdir}/libstdcxx/v6
%{py_sitescriptdir}/libstdcxx/v6/*.py[co]
-%{_datadir}/gdb/auto-load/usr/lib*/libstdc++.so.6.0.15-gdb.py
+%{_datadir}/gdb/auto-load/usr/lib*/libstdc++.so.6.0.16-gdb.py
%endif
%files -n libstdc++-devel
%{_mandir}/man1/jv-convert.1*
%{_mandir}/man1/rebuild-gcj-db*
+%if %{with python}
+%files java-aotcompile
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/aot-compile
+%dir %{py_sitescriptdir}/libjava
+%{py_sitescriptdir}/libjava/*.py[co]
+%{_mandir}/man1/aot-compile.1*
+%endif
+
%files -n libgcj
%defattr(644,root,root,755)
%doc libjava/{ChangeLog,LIBGCJ_LICENSE,NEWS,README,THANKS}
%{_libdir32}/libobjc.a
%endif
%endif
+
+%if %{with go}
+%files go
+%defattr(644,root,root,755)
+%doc gcc/go/gofrontend/{LICENSE,PATENTS,README}
+%attr(755,root,root) %{_bindir}/gccgo
+%attr(755,root,root) %{gcclibdir}/go1
+%dir %{_libdir}/go
+%{_libdir}/go/%{version}
+%{_mandir}/man1/gccgo.1*
+%{_infodir}/gccgo.info*
+
+%if %{with multilib}
+%files go-multilib
+%defattr(644,root,root,755)
+%dir %{_libdir32}/go
+%{_libdir32}/go/%{version}
+%endif
+
+%files -n libgo
+%defattr(644,root,root,755)
+%doc libgo/{LICENSE,PATENTS,README}
+%attr(755,root,root) %{_libdir}/libgo.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgo.so.0
+
+%if %{with multilib}
+%files -n libgo-multilib
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir32}/libgo.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir32}/libgo.so.0
+%endif
+
+%files -n libgo-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgo.so
+%{_libdir}/libgo.la
+%{_libdir}/libgobegin.a
+
+%if %{with multilib}
+%files -n libgo-multilib-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir32}/libgo.so
+%{_libdir32}/libgo.la
+%{_libdir32}/libgobegin.a
+%endif
+
+%files -n libgo-static
+%defattr(644,root,root,755)
+%{_libdir}/libgo.a
+
+%if %{with multilib}
+%files -n libgo-multilib-static
+%defattr(644,root,root,755)
+%{_libdir32}/libgo.a
+%endif
+%endif