diff options
Diffstat (limited to 'contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-binutils.spec')
-rw-r--r-- | contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-binutils.spec | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-binutils.spec b/contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-binutils.spec index a7cff8ff34..026f5f782d 100644 --- a/contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-binutils.spec +++ b/contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-binutils.spec @@ -13,6 +13,18 @@ %define _exeext %{nil} %endif +%ifos cygwin cygwin32 +%define optflags -O3 -pipe -march=i486 -funroll-loops +%define _libdir %{_exec_prefix}/lib +%define debug_package %{nil} +%endif + +%if "%{_build}" != "%{_host}" +%define _host_rpmprefix rtems-4.9-%{_host}- +%else +%define _host_rpmprefix %{nil} +%endif + %define binutils_pkgvers 2.18 %define binutils_version 2.18 %define binutils_rpmvers %{expand:%(echo "2.18" | tr - _ )} @@ -26,6 +38,8 @@ License: GPL/LGPL URL: http://sources.redhat.com/binutils BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: %{_host_rpmprefix}gcc + %if "%{binutils_version}" >= "2.18" # Bug in bfd: Doesn't build without texinfo installed BuildRequires: texinfo >= 4.2 @@ -42,7 +56,7 @@ Requires: rtems-4.9-binutils-common Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2 %{?_without_sources:NoSource: 0} %if "%{binutils_version}" == "2.18" -Patch0: binutils-2.18-rtems4.9-20080211.diff +Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.9/binutils-2.18-rtems4.9-20080211.diff %endif %description @@ -56,12 +70,16 @@ cd binutils-%{binutils_pkgvers} cd .. %build + export PATH="%{_bindir}:${PATH}" %if "i386-rtems4.9" == "i686-pc-cygwin" # The cygwin sources are leaking memory RPM_OPT_FLAGS="$(echo "$RPM_OPT_FLAGS"|sed -e 's; -Wp,-D_FORTIFY_SOURCE=2;;')" %endif mkdir -p build cd build +%if "%{_build}" != "%{_host}" + CFLAGS_FOR_BUILD="-g -O2 -Wall" \ +%endif CFLAGS="$RPM_OPT_FLAGS" \ ../binutils-%{binutils_pkgvers}/configure \ --build=%_build --host=%_host \ @@ -80,6 +98,7 @@ cd .. cd .. %install + export PATH="%{_bindir}:${PATH}" rm -rf $RPM_BUILD_ROOT cd build @@ -116,6 +135,9 @@ cd .. if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-rtems4.9-windres%{_exeext}; then rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-rtems4.9-windres* fi + if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-rtems4.9-windmc%{_exeext}; then + rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-rtems4.9-windmc* + fi cd .. @@ -161,7 +183,6 @@ sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \ # %endif %description -n rtems-4.9-i386-rtems4.9-binutils - GNU binutils targetting i386-rtems4.9. %files -n rtems-4.9-i386-rtems4.9-binutils |