Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > a8207ecd2c2bfa48d781fe971c9a6a55 > files > 3

cross-avr-gcc-4.6.2-1.mga2.src.rpm

%define target avr

# 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.6.2
Release:        %mkrel 1
Summary:        Cross Compiling GNU GCC targeted at %{target}
Group:          Development/Other
License:        GPLv2+
URL:            http://gcc.gnu.org/
Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-core-%{version}.tar.bz2
Source1:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-g++-%{version}.tar.bz2
Source2:        README.mageia

Patch0:         avr-gcc-4.5.3-mint8.patch

BuildRequires:  cross-%{target}-binutils >= 1:2.20, zlib-devel gawk gmp-devel mpfr-devel libmpc-devel
Requires:       cross-%{target}-binutils >= 1:2.20

%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.

%files
%defattr(-,root,root,-)
%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.*

#--------------------------------------------------------------------

%package c++
Summary:        Cross Compiling GNU GCC targeted at %{target}
Group:          Development/Other
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.

%files c++
%defattr(-,root,root,-)
%{_bindir}/%{target}-?++
%{_libexecdir}/gcc/%{target}/%{version}/cc1plus
%{_mandir}/man1/%{target}-g++.1.*

#--------------------------------------------------------------------

%prep
%setup -q -c -a 1
pushd gcc-%{version}

%patch0 -p0

contrib/gcc_update --touch
popd
cp -a %{SOURCE2} .

# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF

# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
  b=$(basename $a)
  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
  chmod a+x $b
  ;;
esac
done

sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
< os_install_post~ > os_install_post 


%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 --libexecdir=%{_libexecdir} \
  --with-pkgversion="Mageia %{version}-%{release}" \
  --with-bugurl="https://bugs.mageia.org/"
# In general, building GCC is not smp-safe
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

%define __os_install_post . ./os_install_post



%changelog

* 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