source: rtems/contrib/crossrpms/freebsd6.4/i586/i586-pc-freebsd6.4-binutils.spec @ e107a1b

4.104.11
Last change on this file since e107a1b was e107a1b, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 27, 2009 at 1:20:33 PM

Update.

  • Property mode set to 100644
File size: 4.8 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6
7%ifos cygwin cygwin32 mingw mingw32
8%define _exeext .exe
9%define debug_package           %{nil}
10%define _libdir                 %{_exec_prefix}/lib
11%else
12%define _exeext %{nil}
13%endif
14
15%ifos cygwin cygwin32
16%define optflags -O3 -pipe -march=i486 -funroll-loops
17%endif
18
19%ifos mingw mingw32
20%if %{defined _mingw32_cflags}
21%define optflags %{_mingw32_cflags}
22%else
23%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
24%endif
25%endif
26
27%if "%{_build}" != "%{_host}"
28%define _host_rpmprefix %{_host}-
29%else
30%define _host_rpmprefix %{nil}
31%endif
32
33%define binutils_pkgvers 2.19
34%define binutils_version 2.19
35%define binutils_rpmvers %{expand:%(echo "2.19" | tr - _ )}
36
37Name:           i586-pc-freebsd6.4-binutils
38Summary:        Binutils for target i586-pc-freebsd6.4
39Group:          Development/Tools
40Version:        %{binutils_rpmvers}
41Release:        0.20090827.1%{?dist}
42License:        GPL/LGPL
43URL:            http://sources.redhat.com/binutils
44BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
45
46BuildRequires:  %{_host_rpmprefix}gcc
47
48%if "%{binutils_version}" >= "2.18"
49# Bug in bfd: Doesn't build without texinfo installed
50BuildRequires:  texinfo >= 4.2
51%else
52%if "i586-pc-freebsd6.4" == "i686-pc-cygwin"
53BuildRequires:  texinfo >= 4.2
54%endif
55%endif
56BuildRequires:  flex
57BuildRequires:  bison
58
59Source0: http://ftp.gnu.org/gnu/binutils/binutils-2.19.tar.bz2
60Patch0:  ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.19-rtems4.10-20081023.diff
61
62%description
63Cross binutils for target i586-pc-freebsd6.4
64%prep
65%setup -q -c -T -n %{name}-%{version}
66
67%setup -q -D -T -n %{name}-%{version} -a0
68cd binutils-%{binutils_pkgvers}
69%{?PATCH0:%patch0 -p1}
70cd ..
71
72%build
73%if "i586-pc-freebsd6.4" == "i686-pc-cygwin"
74# The cygwin sources are leaking memory
75  RPM_OPT_FLAGS="$(echo "$RPM_OPT_FLAGS"|sed -e 's; -Wp,-D_FORTIFY_SOURCE=2;;')"
76%endif
77  mkdir -p build
78  cd build
79%if "%{_build}" != "%{_host}"
80  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
81%endif
82  CFLAGS="$RPM_OPT_FLAGS" \
83  ../binutils-%{binutils_pkgvers}/configure \
84    --build=%_build --host=%_host \
85    --target=i586-pc-freebsd6.4 \
86    --verbose --disable-nls \
87    --without-included-gettext \
88    --disable-win32-registry \
89    --disable-werror \
90    --with-sysroot=%{_prefix}/i586-pc-freebsd6.4/sys-root \
91    --prefix=%{_prefix} --bindir=%{_bindir} \
92    --exec-prefix=%{_exec_prefix} \
93    --includedir=%{_includedir} --libdir=%{_libdir} \
94    --mandir=%{_mandir} --infodir=%{_infodir}
95
96  make %{?_smp_mflags} all
97  cd ..
98
99%install
100  rm -rf $RPM_BUILD_ROOT
101
102  cd build
103  make DESTDIR=$RPM_BUILD_ROOT install
104
105
106# Conflict with a native binutils' infos
107  rm -rf $RPM_BUILD_ROOT%{_infodir}
108
109# We don't ship host files
110  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
111
112# manpages without corresponding tools
113  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd6.4-dlltool%{_exeext}; then
114    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd6.4-dlltool*
115  fi
116  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd6.4-nlmconv%{_exeext}; then
117    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd6.4-nlmconv*
118  fi
119  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd6.4-windres%{_exeext}; then
120    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd6.4-windres*
121  fi
122  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd6.4-windmc%{_exeext}; then
123    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd6.4-windmc*
124  fi
125
126  cd ..
127
128# Extract %%__os_install_post into os_install_post~
129cat << \EOF > os_install_post~
130%__os_install_post
131EOF
132
133# Generate customized brp-*scripts
134cat os_install_post~ | while read a x y; do
135case $a in
136# Prevent brp-strip* from trying to handle foreign binaries
137*/brp-strip*)
138  b=$(basename $a)
139  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
140  chmod a+x $b
141  ;;
142esac
143done
144
145sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
146< os_install_post~ > os_install_post
147%define __os_install_post . ./os_install_post
148
149%clean
150  rm -rf $RPM_BUILD_ROOT
151
152# ==============================================================
153# i586-pc-freebsd6.4-binutils
154# ==============================================================
155# %package -n i586-pc-freebsd6.4-binutils
156# Summary:      rtems binutils for i586-pc-freebsd6.4
157# Group: Development/Tools
158# %if %build_infos
159# Requires: binutils-common
160# %endif
161
162%description -n i586-pc-freebsd6.4-binutils
163GNU binutils targetting i586-pc-freebsd6.4.
164
165%files -n i586-pc-freebsd6.4-binutils
166%defattr(-,root,root)
167%{_mandir}/man1/i586-pc-freebsd6.4-*.1*
168
169%{_bindir}/i586-pc-freebsd6.4-*
170
171%dir %{_exec_prefix}/i586-pc-freebsd6.4
172%dir %{_exec_prefix}/i586-pc-freebsd6.4/bin
173%{_exec_prefix}/i586-pc-freebsd6.4/bin/*
174
175%dir %{_exec_prefix}/i586-pc-freebsd6.4/lib
176%{_exec_prefix}/i586-pc-freebsd6.4/lib/ldscripts
177
Note: See TracBrowser for help on using the repository browser.