%define target avr # Please note: a local build of cross-avr-gcc will fail with # /usr/avr/bin/as: unrecognized option '--64' # if the PATH environment variable contains a "." item # Disable -Werror because there's a format string warning in gcc/cp/parser.c # around line 2300 that a comment says is intentional :( %define Werror_cflags %nil Name: cross-%{target}-gcc Version: 4.8.5 Release: %mkrel 4 Summary: Cross Compiling GNU GCC targeted at %{target} Group: Development/C License: GPLv2+ URL: http://gcc.gnu.org/ Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2 Source1: README.mageia Patch0: avr-gcc-4.5.3-mint8.patch Patch1: gcc-4.8.5-gcc7.patch BuildRequires: cross-%{target}-binutils >= 1:2.23.2 BuildRequires: gawk BuildRequires: gmp-devel BuildRequires: gperf BuildRequires: libmpc-devel BuildRequires: pkgconfig(mpfr) BuildRequires: pkgconfig(zlib) Requires: cross-%{target}-binutils >= 1:2.23.2 Provides: bundled(libiberty) %description This is a Cross Compiling version of GNU GCC, which can be used to compile for the %{target} platform, instead of for the native %{_arch} platform. %package c++ Summary: Cross Compiling GNU GCC targeted at %{target} Group: Development/C Requires: %{name} = %{version}-%{release} %description c++ This package contains the Cross Compiling version of g++, which can be used to compile c++ code for the %{target} platform, instead of for the native %{_arch} platform. %prep %setup -q -c pushd gcc-%{version} %patch0 -p0 %patch1 -p1 -b .gcc7 contrib/gcc_update --touch rm -f gcc/cp/cfns.h popd cp -a %{SOURCE1} . %build mkdir -p gcc-%{target} pushd gcc-%{target} CC="%{__cc} ${RPM_OPT_FLAGS}" \ ../gcc-%{version}/configure --prefix=%{_prefix} --mandir=%{_mandir} \ --infodir=%{_infodir} --target=%{target} --enable-languages=c,c++ \ --disable-nls --disable-libssp --with-system-zlib \ --enable-version-specific-runtime-libs \ --with-pkgversion="Mageia %{version}-%{release}" \ --with-bugurl="https://bugs.mageia.org/" # In general, building GCC is not always smp-safe, but give it initial boost anyway make %{?_smp_mflags} || make popd %install pushd gcc-%{target} make install DESTDIR=$RPM_BUILD_ROOT popd # we don't want these as we are a cross version rm -r $RPM_BUILD_ROOT%{_infodir} rm -r $RPM_BUILD_ROOT%{_mandir}/man7 rm $RPM_BUILD_ROOT%{_libdir}/libiberty.a # and these aren't usefull for embedded targets rm -r $RPM_BUILD_ROOT/usr/lib/gcc/%{target}/%{version}/install-tools ||: rm -r $RPM_BUILD_ROOT%{_libexecdir}/gcc/%{target}/%{version}/install-tools ||: %files %doc gcc-%{version}/COPYING gcc-%{version}/COPYING.LIB %doc gcc-%{version}/README README.mageia %{_bindir}/%{target}-* %dir /usr/lib/gcc %dir /usr/lib/gcc/%{target} /usr/lib/gcc/%{target}/%{version} %dir %{_libexecdir}/gcc %dir %{_libexecdir}/gcc/%{target} %{_libexecdir}/gcc/%{target}/%{version} %{_mandir}/man1/%{target}-*.1.* %exclude %{_bindir}/%{target}-?++ %exclude %{_libexecdir}/gcc/%{target}/%{version}/cc1plus %exclude %{_mandir}/man1/%{target}-g++.1.* %files c++ %{_bindir}/%{target}-?++ %{_libexecdir}/gcc/%{target}/%{version}/cc1plus %{_mandir}/man1/%{target}-g++.1.* %changelog * Wed Feb 12 2020 umeabot <umeabot> 4.8.5-4.mga8 + Revision: 1511495 - Mageia 8 Mass Rebuild * Sun Sep 23 2018 umeabot <umeabot> 4.8.5-3.mga7 + Revision: 1296908 - Mageia 7 Mass Rebuild * Mon Feb 19 2018 kekepower <kekepower> 4.8.5-2.mga7 + Revision: 1202936 - Rebuild for new mpfr * Sun Oct 15 2017 cjw <cjw> 4.8.5-1.mga7 + Revision: 1172215 - add buildrequires: gperf - 4.8.5 - fix build with gcc 7 * Sat Feb 06 2016 umeabot <umeabot> 4.8.1-6.mga6 + Revision: 941655 - Mageia 6 Mass Rebuild * Wed Oct 15 2014 umeabot <umeabot> 4.8.1-5.mga5 + Revision: 738841 - Second Mageia 5 Mass Rebuild * Thu Sep 18 2014 umeabot <umeabot> 4.8.1-4.mga5 + Revision: 693699 - Rebuild to fix library dependencies * Tue Sep 16 2014 umeabot <umeabot> 4.8.1-3.mga5 + Revision: 678592 - Mageia 5 Mass Rebuild * Mon Oct 21 2013 umeabot <umeabot> 4.8.1-2.mga4 + Revision: 540952 - Mageia 4 Mass Rebuild * Thu Oct 10 2013 juergen_harms <juergen_harms> 4.8.1-1.mga4 + Revision: 494597 - upgrade to new upstream version = avrgcc-4.8.1 - now "Requires" cross-avr-binutils-2.23.2 * Thu Apr 11 2013 tmb <tmb> 4.7.2-3.mga3 + Revision: 409741 - fix group + juergen_harms <juergen_harms> - Bump release number - modify requires: cross-avr-binutils-2.20 -> 2.23 (both build and exec) - tidy numbering of Source declarations - tidy Group declarations (both c and c++ are now Development/Languages) - drop creation of brp script and invocation of os_install_post (= work around against creation of non-packaged but installed debug file) - %%files section: tidy glitches - README.mageia rather than README.fedora, do not hardwire man-page compression mode + umeabot <umeabot> - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild + dmorgan <dmorgan> - New version 4.7.2 + fwang <fwang> - rebuild for new libmpc * Tue Jan 10 2012 dmorgan <dmorgan> 4.6.2-1.mga2 + Revision: 194579 - New version 4.6.2 + kicer86 <kicer86> - Group changed to Development/C * Tue Jul 19 2011 kicer86 <kicer86> 4.5.3-1.mga2 + Revision: 126743 - old comments removed - CFLAGS set to -O2 -g -pipe - prefix set to %%{_libdir} to inform gcc where too look for include dirs - lots of cleanups - Removed unnecessary %%{_libexecdir}/gcc directory - Added _exec_prefix definition. With it avr related stuff goes to /usr/lib/avr - imported package cross-avr-gcc * Sat Jun 25 2011 MichaÅ Walenciak <kicer86 at gmail.com> - first Mageia spec * Sun Jul 11 2010 Thibault North <tnorth@fedoraproject.org> - 4.5.0-2 - Add patch of Eric Weddington to support new devices and compile last avr-libc * Fri Apr 16 2010 Thibault North <tnorth@fedoraproject.org> - 4.5.0-1 - New upstream release - New build dependency: libmpc-devel - Fix package version specification * Fri Nov 20 2009 Thibault North <tnorth AT fedoraproject DOT org> - 4.4.2-1 - New upstream release * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Feb 14 2009 Thibault North <tnorth AT fedoraproject DOT org> - 4.3.3-1 - New upstream release: upgraded to 4.3.3 - Add dependencies to gmp-devel and mpfr-devel as build requires - Remove patches (included upstream) * Fri Oct 3 2008 Thibault North <tnorth AT fedoraproject DOT org> - 4.1.2-7 - Rebuild for gcc 4.3 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.1.2-6 - Autorebuild for GCC 4.3 * Fri Aug 3 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 4.1.2-5 - Update License tag for new Licensing Guidelines compliance * Sun May 20 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 4.1.2-4 - Honor and use $RPM_OPT_FLAGS - define VERSUFFIX to Fedora version-release, so that people can tell this is a patched / customized build - Use gcc-core and gcc-g++ tarballs instead of the monolithic tarball - Run contrib/gcc_update --touch after applying our patches - In general, building GCC is not smp-safe, remove smpflags to play it safe - Remove not usefull install-tools binaries - Change %%{_libdir} into /usr/lib as gcc always installs its files under /usr/lib * Mon May 14 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 4.1.2-3 - Use normal make / make install instead off make all-gcc / make install-gcc - Add --disable-libssp to the configure flags, freebsd ports, the avrlibc docs, and debian package all do this, and ./configure does not do this automaticly - Add --enable-version-specific-runtime-libs, as we don't want gcc/g++ to be looking in the default include/lib paths - Add --with-system-zlib and zlib-devel BR - Add 2 usefull patches from freebsd ports collection - Split g++ off into a seperate package - Add special script/workaround to avoid debuginfo generation for non native libs * Wed Apr 25 2007 Lennart Kneppers <lennartkneppers@gmail.com> 4.1.2-2 - Minor changes * Thu Apr 20 2007 Koos Termeulen <koostermeulen@gmail.com> 4.1.2-1 - Initial release