#
# TODO:
# - http://gcc.gnu.org/PR11203 (inline-asm)
-# - http://gcc.gnu.org/PR17640 (empty loop not removed after optimization)
-# - http://gcc.gnu.org/PR19317 (removing a temporary return value when we cannot)
# - http://gcc.gnu.org/PR20128 (ice with mudflap + profile generate)
-# - http://gcc.gnu.org/PR19664, PR20218 (visibility issues)
#
# Conditional build:
%bcond_without ada # build without ADA support
+%bcond_without cxx # build without C++ support
%bcond_without fortran # build without Fortran support
%bcond_without java # build without Java support
-%bcond_without objc # build without ObjC support
+%bcond_without objc # build without Objective-C support
+%bcond_without objcxx # build without Objective-C++ support
%bcond_with multilib # build with multilib support (it needs glibc[32&64]-devel)
%bcond_without profiling # build without profiling
%bcond_without bootstrap # omit 3-stage bootstrap
+%bcond_with tests # torture gcc
-%ifnarch amd64 ppc64 s390x sparc64
+%if %{with multilib}
+# the latest chrpath(64) can't handle 32-bit binaries :/
+%define _noautochrpath .*/lib/.*\\.so.*
+%endif
+
+%if %{without cxx}
+%undefine with_java
+%undefine with_objcxx
+%endif
+
+%if %{without objc}
+%undefine with_objcxx
+%endif
+
+%if %{without bootstrap}
+%undefine with_profiling
+%endif
+
+%ifnarch %{x8664} ppc64 s390x sparc64
%undefine with_multilib
%endif
Summary(pl): Kolekcja kompilatorów GNU: kompilator C i pliki wspó³dzielone
Summary(pt_BR): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados
Name: gcc
-Version: 4.0.1
-%define _snap 20050507
-Release: 0.%{_snap}.4
+Version: 4.1.0
+%define _snap 20050731T0821UTC
+Release: 0.%{_snap}.1
Epoch: 5
License: GPL v2+
Group: Development/Languages
#Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{name}-%{version}.tar.bz2
-Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/4.0-%{_snap}/gcc-4.0-%{_snap}.tar.bz2
-# Source0-md5: 701f385de867d117f3648165174b254a
+#Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-%{_snap}/gcc-4.1-%{_snap}.tar.bz2
+Source0: gcc-4.1-%{_snap}.tar.bz2
+# Source0-md5: d23b54c31ca712bd7acdc1392a77ef1b
Source1: %{name}-optimize-la.pl
Patch0: %{name}-info.patch
Patch1: %{name}-nolocalefiles.patch
Patch3: %{name}-ada-link-new-libgnat.patch
Patch4: %{name}-ada-link.patch
Patch5: %{name}-alpha-ada_fix.patch
+Patch6: %{name}-keep-volatile-sematics.patch
# PRs
-#Patch12: %{name}-pr19664.patch
-#Patch13: %{name}-pr20218.patch
+Patch10: %{name}-pr7776.patch
+Patch11: %{name}-pr20297.patch
+Patch12: %{name}-pr23128_23129.patch
+Patch13: %{name}-pr22037.patch
+Patch14: %{name}-pr22533.patch
URL: http://gcc.gnu.org/
BuildRequires: autoconf
+%{?with_tests:BuildRequires: autogen}
BuildRequires: automake
BuildRequires: binutils >= 2:2.15.94.0.1
BuildRequires: bison
-%{?with_java:BuildRequires: cairo-devel}
+%{?with_java:BuildRequires: cairo-devel >= 0.5.0}
+%{?with_tests:BuildRequires: dejagnu}
BuildRequires: fileutils >= 4.0.41
BuildRequires: flex
%if %{with ada}
%endif
BuildRequires: gettext-devel
BuildRequires: glibc-devel >= %{!?with_multilib:2.2.5-20}%{?with_multilib:6:2.3.4-1.5}
+%if %{with fortran}
BuildRequires: gmp-devel
BuildRequires: libmpfr-devel
+%endif
%{?with_java:BuildRequires: pango-devel}
BuildRequires: perl-devel
+%{?with_java:BuildRequires: pkgconfig}
+BuildRequires: rpmbuild(macros) >= 1.211
BuildRequires: texinfo >= 4.1
BuildRequires: zlib-devel
# AS_NEEDED directive for dynamic linker
%define _slibdir /%{_lib}
%if %{with multilib}
-# 32-bit environment on amd64,ppc64,s390x,sparc64
+# 32-bit environment on x86-64,ppc64,s390x,sparc64
%define _slibdir32 /lib
%define _libdir32 /usr/lib
%endif
-%ifarch sparc64
-%define rpmcflags -O2 -mtune=ultrasparc
-%endif
%description
A compiler aimed at integrating all the optimizations and features
Group: Development/Languages/Java
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: libgcj-devel = %{epoch}:%{version}-%{release}
-Requires: java-shared
Provides: gcj = %{epoch}:%{version}-%{release}
+Provides: gcc-java-tools
+Obsoletes: fastjar
+Obsoletes: gcc-java-tools
%description java
This package adds experimental support for compiling Java(TM) programs
%description -n libffi-static -l pl
Statyczna biblioteka libffi.
-%package java-tools
-Summary: Shared java tools
-Summary(es): Herramientas compartidas de Java
-Summary(pl): Wspó³dzielone narzêdzia javy
-Group: Development/Languages/Java
-Provides: jar = %{epoch}:%{version}-%{release}
-Provides: java-shared
-Obsoletes: fastjar
-Obsoletes: jar
-Obsoletes: java-shared
-
-%description java-tools
-This package contains tools that are common for every Java(tm)
-implementation, such as rmic or jar.
-
-%description java-tools -l es
-Este paquete contiene herramientas que son comunes para cada
-implementación de Java(tm), como rmic o jar.
-
-%description java-tools -l pl
-Pakiet ten zawiera narzêdzia wspólne dla ka¿dej implementacji
-Javy(tm), takie jak rmic czy jar.
-
%package objc
Summary: Objective C support for gcc
Summary(de): Objektive C-Unterstützung für gcc
sistemlerde yaygýn olarak kullanýlýr. Standart Objective C nesne
kitaplýðý bu pakette yer almaz.
+%package objc++
+Summary: Objective C++ support for gcc
+Summary(pl): Obs³uga jêzyka Objective C++ dla gcc
+Group: Development/Languages
+Requires: %{name}-c++ = %{epoch}:%{version}-%{release}
+Requires: %{name}-objc = %{epoch}:%{version}-%{release}
+
+%description objc++
+This package adds Objective C++ support to the GNU Compiler
+Collection.
+
+%description objc++ -l pl
+Ten pakiet dodaje obs³ugê jêzyka Objective C++ do zestawu
+kompilatorów GNU Compiler Collection.
+
%package -n libobjc
Summary: Objective C Libraries
Summary(es): Bibliotecas de Objective C
%prep
#setup -q -n gcc-%{version}
-%setup -q -n gcc-4.0-%{_snap}
-rm -rf zlib
+%setup -q -n gcc-4.1-%{_snap}
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
# PRs
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
# because we distribute modified version of gcc...
perl -pi -e 's/(version.*)";/$1 (PLD Linux)";/' gcc/version.c
cd obj-%{_target_platform}
CFLAGS="%{rpmcflags}" \
-CXXFLAGS="%{rpmcflags}" \
+CXXFLAGS="%{rpmcxxflags}" \
TEXCONFIG=false \
../configure \
--prefix=%{_prefix} \
--enable-shared \
--enable-threads=posix \
--enable-__cxa_atexit \
- --enable-languages="c,c++%{?with_fortran:,f95}%{?with_objc:,objc}%{?with_ada:,ada}%{?with_java:,java}" \
+ --enable-languages="c%{?with_cxx:,c++}%{?with_fortran:,f95}%{?with_objc:,objc}%{?with_objcxx:,obj-c++}%{?with_ada:,ada}%{?with_java:,java}" \
--enable-c99 \
--enable-long-long \
--%{?with_multilib:en}%{!?with_multilib:dis}able-multilib \
--enable-nls \
+ --disable-werror \
--with-gnu-as \
--with-gnu-ld \
--with-demangler-in-ld \
--with-system-zlib \
--with-slibdir=%{_slibdir} \
--without-x \
- --enable-cmath \
+ %{?with_fortran:--enable-cmath} \
%if %{with java}
--enable-libgcj \
--enable-libgcj-multifile \
mandir=%{_mandir} \
infodir=%{_infodir}
+%{?with_tests:%{__make} -k -C obj-%{_target_platform} check 2>&1 | cat}
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/lib,%{_aclocaldir},%{_datadir},%{_infodir}}
install gcc/specs $RPM_BUILD_ROOT%{_libdir}/gcc/%{_target_platform}/%{version}
%ifarch sparc64
-ln -sf $RPM_BUILD_ROOT%{_bindir}/sparc64-pld-linux-gcc \
+ln -sf %{_bindir}/sparc64-pld-linux-gcc \
$RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc
%endif
ln -sf gcc $RPM_BUILD_ROOT%{_bindir}/cc
echo ".so gcc.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc.1
+libssp=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libssp.so.*.*.*)
+mv $RPM_BUILD_ROOT{%{_libdir}/$libssp,%{_slibdir}}
+ln -sf %{_slibdir}/$libssp $RPM_BUILD_ROOT%{_libdir}/libssp.so
+%if %{with multilib}
+libssp=$($RPM_BUILD_ROOT%{_libdir32}; echo libssp.so.*.*.*`)
+mv $RPM_BUILD_ROOT{%{_libdir32}/$libssp,%{_slibdir32}}
+ln -sf %{_slibdir32}/$libssp $RPM_BUILD_ROOT%{_libdir32}/libssp.so
+%endif
+
%if %{with fortran}
ln -sf gfortran $RPM_BUILD_ROOT%{_bindir}/g95
echo ".so gfortran.1" > $RPM_BUILD_ROOT%{_mandir}/man1/g95.1
# avoid -L poisoning in *.la - there should be only -L%{_libdir}/gcc/*/%{version}
# normalize libdir, to avoid propagation of unnecessary RPATHs by libtool
-for f in libmudflap.la libmudflapth.la libstdc++.la libsupc++.la \
+for f in libmudflap.la libmudflapth.la libssp.la \
+ %{?with_cxx:libstdc++.la libsupc++.la} \
%{?with_fortran:libgfortran.la libgfortranbegin.la} \
%{?with_java:libgcj.la libffi.la} \
%{?with_objc:libobjc.la};
ln -sf %{_slibdir}/libgcc_s.so.1 $gccdir/libgcc_s.so
%find_lang gcc
-%find_lang libstdc\+\+
+%{?with_cxx:%find_lang libstdc\+\+}
# cvs snap doesn't contain (release does) below files,
# so let's create dummy entries to satisfy %%files.
[ ! -f NEWS ] && touch NEWS
-[ ! -f libgfortan/AUTHORS ] && touch libgfortan/AUTHORS
-[ ! -f libgfortan/README ] && touch libgfortan/README
+[ ! -f libgfortran/AUTHORS ] && touch libgfortran/AUTHORS
+[ ! -f libgfortran/README ] && touch libgfortran/README
%clean
rm -rf $RPM_BUILD_ROOT
%files -f gcc.lang
%defattr(644,root,root,755)
-%doc ChangeLog.general MAINTAINERS NEWS bugs.html faq.html
+%doc ChangeLog.general MAINTAINERS NEWS
+# bugs.html faq.html
%doc gcc/{ChangeLog,ONEWS,README.Portability}
%dir %{_libdir}/gcc
%dir %{_libdir}/gcc/*
%attr(755,root,root) %{_bindir}/cc
%attr(755,root,root) %{_bindir}/cpp
+%{_includedir}/ssp
+
%{_mandir}/man1/cc.1*
%{_mandir}/man1/cpp.1*
%{_mandir}/man1/gcc.1*
%attr(755,root,root) /lib/cpp
%attr(755,root,root) %{_slibdir}/lib*.so
+%{_libdir}/libssp.la
+%attr(755,root,root) %{_libdir}/libssp.a
+%attr(755,root,root) %{_libdir}/libssp.so
+%{_libdir}/libssp_nonshared.a
+%{_libdir}/libssp_nonshared.la
%if %{with multilib}
%dir %{_libdir}/gcc/*/*/32
%{_libdir}/gcc/*/*/32/libgcov.a
%{_libdir}/gcc/*/*/32/libgcc.a
%{_libdir}/gcc/*/*/32/libgcc_eh.a
%{_libdir}/gcc/*/*/32/libgcc_s.so
+%{_libdir32}/libssp.la
+%attr(755,root,root) %{_libdir32}/libssp.a
+%attr(755,root,root) %{_libdir32}/libssp.so
+%{_libdir32}/libssp_nonshared.a
+%{_libdir32}/libssp_nonshared.la
%endif
%{_libdir}/gcc/*/*/libgcov.a
%{_libdir}/gcc/*/*/libgcc.a
%{_libdir}/gcc/*/*/adalib/libgnat.a
%endif
+%if %{with cxx}
%files c++
%defattr(644,root,root,755)
%doc gcc/cp/{ChangeLog,NEWS}
%{_libdir32}/libstdc++.a
%endif
%{_libdir}/libstdc++.a
+%endif
%if %{with fortran}
%files fortran
%files java
%defattr(644,root,root,755)
%doc gcc/java/ChangeLog java-doc/*
+%attr(755,root,root) %{_bindir}/fastjar
%attr(755,root,root) %{_bindir}/gcj*
+%attr(755,root,root) %{_bindir}/gjnih
%attr(755,root,root) %{_bindir}/grepjar
+%attr(755,root,root) %{_bindir}/grmi*
%attr(755,root,root) %{_bindir}/jcf-dump
%attr(755,root,root) %{_bindir}/jv-*
%attr(755,root,root) %{_bindir}/*-gcj*
%attr(755,root,root) %{_libdir}/gcc/*/*/jc1
%attr(755,root,root) %{_libdir}/gcc/*/*/jvgenmain
+%{_infodir}/fastjar*
%{_infodir}/gcj*
+%{_infodir}/hacking*
+%{_infodir}/vmintegration*
+%{_mandir}/man1/fastjar*
%{_mandir}/man1/gcj*
+%{_mandir}/man1/gjnih*
%{_mandir}/man1/grepjar*
+%{_mandir}/man1/grmi*
%{_mandir}/man1/jcf-*
%{_mandir}/man1/jv-*
-%files java-tools
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/grmi*
-%attr(755,root,root) %{_bindir}/fastjar
-%{_mandir}/man1/grmi*
-%{_mandir}/man1/fastjar*
-%{_infodir}/fastjar*
-
%files -n libgcj
%defattr(644,root,root,755)
%doc libjava/{ChangeLog,LIBGCJ_LICENSE,NEWS,README,THANKS}
%endif
%{_libdir}/libobjc.a
%endif
+
+%if %{with objcxx}
+%files objc++
+%defattr(644,root,root,755)
+%doc gcc/objcp/ChangeLog
+%attr(755,root,root) %{_libdir}/gcc/*/*/cc1objplus
+%endif