source: rtems/contrib/crossrpms/freebsd7.0/i586/i586-pc-freebsd7.0-binutils.spec @ e2a6ea3

4.104.115
Last change on this file since e2a6ea3 was e2a6ea3, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/21/09 at 02:01:05

Regenerate.

  • Property mode set to 100644
File size: 4.7 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.20
34%define binutils_version 2.20
35%define binutils_rpmvers %{expand:%(echo "2.20" | tr - _ )}
36
37Name:           i586-pc-freebsd7.0-binutils
38Summary:        Binutils for target i586-pc-freebsd7.0
39Group:          Development/Tools
40Version:        %{binutils_rpmvers}
41Release:        0.20091020.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-freebsd7.0" == "i686-pc-cygwin"
53BuildRequires:  texinfo >= 4.2
54%endif
55%endif
56BuildRequires:  flex
57BuildRequires:  bison
58
59Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
60
61%description
62Cross binutils for target i586-pc-freebsd7.0
63%prep
64%setup -q -c -T -n %{name}-%{version}
65
66%setup -q -D -T -n %{name}-%{version} -a0
67cd binutils-%{binutils_pkgvers}
68%{?PATCH0:%patch0 -p1}
69cd ..
70
71%build
72%if "i586-pc-freebsd7.0" == "i686-pc-cygwin"
73# The cygwin sources are leaking memory
74  RPM_OPT_FLAGS="$(echo "$RPM_OPT_FLAGS"|sed -e 's; -Wp,-D_FORTIFY_SOURCE=2;;')"
75%endif
76  mkdir -p build
77  cd build
78%if "%{_build}" != "%{_host}"
79  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
80%endif
81  CFLAGS="$RPM_OPT_FLAGS" \
82  ../binutils-%{binutils_pkgvers}/configure \
83    --build=%_build --host=%_host \
84    --target=i586-pc-freebsd7.0 \
85    --verbose --disable-nls \
86    --without-included-gettext \
87    --disable-win32-registry \
88    --disable-werror \
89    --with-sysroot=%{_prefix}/i586-pc-freebsd7.0/sys-root \
90    --prefix=%{_prefix} --bindir=%{_bindir} \
91    --exec-prefix=%{_exec_prefix} \
92    --includedir=%{_includedir} --libdir=%{_libdir} \
93    --mandir=%{_mandir} --infodir=%{_infodir}
94
95  make %{?_smp_mflags} all
96  cd ..
97
98%install
99  rm -rf $RPM_BUILD_ROOT
100
101  cd build
102  make DESTDIR=$RPM_BUILD_ROOT install
103
104
105# Conflict with a native binutils' infos
106  rm -rf $RPM_BUILD_ROOT%{_infodir}
107
108# We don't ship host files
109  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
110
111# manpages without corresponding tools
112  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.0-dlltool%{_exeext}; then
113    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.0-dlltool*
114  fi
115  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.0-nlmconv%{_exeext}; then
116    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.0-nlmconv*
117  fi
118  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.0-windres%{_exeext}; then
119    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.0-windres*
120  fi
121  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.0-windmc%{_exeext}; then
122    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.0-windmc*
123  fi
124
125  cd ..
126
127# Extract %%__os_install_post into os_install_post~
128cat << \EOF > os_install_post~
129%__os_install_post
130EOF
131
132# Generate customized brp-*scripts
133cat os_install_post~ | while read a x y; do
134case $a in
135# Prevent brp-strip* from trying to handle foreign binaries
136*/brp-strip*)
137  b=$(basename $a)
138  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
139  chmod a+x $b
140  ;;
141esac
142done
143
144sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
145< os_install_post~ > os_install_post
146%define __os_install_post . ./os_install_post
147
148%clean
149  rm -rf $RPM_BUILD_ROOT
150
151# ==============================================================
152# i586-pc-freebsd7.0-binutils
153# ==============================================================
154# %package -n i586-pc-freebsd7.0-binutils
155# Summary:      rtems binutils for i586-pc-freebsd7.0
156# Group: Development/Tools
157# %if %build_infos
158# Requires: binutils-common
159# %endif
160
161%description -n i586-pc-freebsd7.0-binutils
162GNU binutils targetting i586-pc-freebsd7.0.
163
164%files -n i586-pc-freebsd7.0-binutils
165%defattr(-,root,root)
166
167%{_mandir}/man1/i586-pc-freebsd7.0-*.1*
168
169%{_bindir}/i586-pc-freebsd7.0-*
170
171%dir %{_exec_prefix}/i586-pc-freebsd7.0
172%dir %{_exec_prefix}/i586-pc-freebsd7.0/bin
173%{_exec_prefix}/i586-pc-freebsd7.0/bin/*
174
175%dir %{_exec_prefix}/i586-pc-freebsd7.0/lib
176%{_exec_prefix}/i586-pc-freebsd7.0/lib/ldscripts
177
Note: See TracBrowser for help on using the repository browser.