#
# Conditional build:
-%bcond_with bootstrap # build without nacl newlib package dependency (without c++ package)
+%bcond_with bootstrap # build without NaCL newlib package dependency (without c++ package)
-%define gitver cff9ac88
-Summary: Various compilers (C, C++) for nacl
+%define gitver 455063d
+Summary: Various compilers (C, C++) for NaCl
Name: crossnacl-gcc
Version: 4.4.3
-Release: 2.git%{gitver}
-# Generated from git
-# git clone http://git.chromium.org/native_client/nacl-gcc.git
-# (Checkout ID taken from chromium-15.0.874.106/native_client/tools/REVISIONS)
-# cd nacl-gcc
-# git checkout cff9ac884908ba53ae16149e7c7d19c336aa4895
-# cd ..
-# For gcc version, echo gcc/BASE-VER
-# mv nacl-gcc nacl-gcc-4.4.3-gitcff9ac88
-# tar cfj nacl-gcc-4.4.3-gitcff9ac88.tar.bz2 nacl-gcc-4.4.3-gitcff9ac88
+Release: 10.git%{gitver}
License: GPL v3+ and GPL v3+ with exceptions and GPL v2+ with exceptions
Group: Development/Languages
-Source0: nacl-gcc-%{version}-git%{gitver}.tar.bz2
-# Source0-md5: 5f96c99136882b2b22a5d173890f8026
+Source0: nacl-gcc-%{version}-git%{gitver}.tar.xz
+# Source0-md5: dd49a8726695a06c7fe9fc531dc6c637
+Source1: get-source.sh
URL: http://sourceware.org/gcc/
BuildRequires: cloog-ppl-devel
BuildRequires: crossnacl-binutils
BuildRequires: elfutils-devel
+BuildRequires: gmp-c++-devel
BuildRequires: gmp-devel
BuildRequires: mpfr-devel
-BuildRequires: ppl-pwl-devel
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+BuildConflicts: cloog-isl-devel
%if %{without bootstrap}
-BuildRequires: nacl-newlib
+BuildRequires: crossnacl-newlib
%endif
ExclusiveArch: %{ix86} %{x8664}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define gccnlib %{_prefix}/lib/gcc/%{target}/%{gcc_ver}
%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
+%define filterout_c -Werror=format-security
%description
The gcc package contains the GNU Compiler Collection version 4.4.3.
%description c++ -l pl.UTF-8
Ten pakiet dodaje obsługę C++ do kompilatora gcc dla NaCL.
+%package objc
+Summary: NaCL binary utility development utilities - objc
+Summary(pl.UTF-8): Zestaw narzędzi NaCL - objc
+Group: Development/Languages
+Requires: %{name} = %{version}-%{release}
+
+%description objc
+This package contains cross targeted objc compiler.
+
+%description objc -l pl.UTF-8
+Ten pakiet zawiera kompilator objc generujący kod pod Win32.
+
%prep
%setup -q -n nacl-gcc-%{version}-git%{?gitver}
install -d obj-%{target}
cd obj-%{target}
-OPT_FLAGS="%{rpmcflags}"
+OPT_FLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64"
OPT_FLAGS=$(echo "$OPT_FLAGS" | sed -e 's/-m64//g;s/-m32//g;s/-m31//g')
%ifarch %{ix86}
OPT_FLAGS=$(echo "$OPT_FLAGS" | sed -e 's/-march=i.86//g')
--disable-libstdcxx-pch \
--disable-shared \
--with-ppl --with-cloog \
+ MAKEINFO=/bin/true \
CC="%{__cc}" \
CFLAGS="$OPT_FLAGS $GCC_DEFINES" \
CXXFLAGS="$(echo $OPT_FLAGS | sed 's/ -Wall / /g')" \
--with-newlib \
%endif
--target=%{target} \
- --with-host-libstdcxx="-lpwl -lstdc++ -lm" \
+ --with-host-libstdcxx="-lstdc++ -lm" \
--disable-ppl-version-check \
--disable-libgcj
%{__rm} -r $RPM_BUILD_ROOT%{_localedir}
# Don't dupe the system libiberty.a
-#%{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+%if %{without bootstrap}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a
+%{__rm} $RPM_BUILD_ROOT%{_prefix}/%{target}/lib*/libiberty.a
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/%{target}-gccbug
%attr(755,root,root) %{_bindir}/%{target}-gcov
+%if "%{_lib}" != "lib"
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{target}
%dir %{gccnlib}
-%{gccnlib}/*.a
-%{gccnlib}/*.o
-%{gccnlib}/include
+%endif
+
+%{gccnlib}/*.[ao]
+%dir %{gccnlib}/include
+%{gccnlib}/include/*.h
%dir %{gccnlib}/32
%{gccnlib}/32/*.[oa]
%dir %{_libexecdir}
%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/%{target}
%dir %{gcclib}
%attr(755,root,root) %{gcclib}/cc1
%attr(755,root,root) %{gcclib}/collect2
+%if "%{_lib}" != "lib"
+# not present on ix86, not needed?
%dir %{gcclib}/install-tools
%attr(755,root,root) %{gcclib}/install-tools/*
+%endif
%{_mandir}/man1/%{target}-cpp.*
%{_mandir}/man1/%{target}-gcc.*
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/%{target}-c++
%attr(755,root,root) %{_bindir}/%{target}-g++
+%attr(755,root,root) %{gcclib}/cc1plus
%{_prefix}/%{target}/include/c++
-%{_prefix}/%{target}/lib*/
+%dir %{_prefix}/%{target}/lib32
+%dir %{_prefix}/%{target}/lib64
+%{_prefix}/%{target}/lib*/libstdc++.*a
+%{_prefix}/%{target}/lib*/libsupc++.*a
%{_mandir}/man1/%{target}-g++.*
+
+%files objc
+%defattr(644,root,root,755)
+%attr(755,root,root) %{gcclib}/cc1obj
+%{_prefix}/%{target}/lib*/libobjc.*a
+%{gccnlib}/include/objc
%endif