source: rtems-source-builder/source-builder/config/binutils-2-1.cfg @ 8f30997

4.104.114.9
Last change on this file since 8f30997 was 8f30997, checked in by Chris Johns <chrisj@…>, on Apr 26, 2013 at 2:05:13 AM

Add binutils support for snapshot builds.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1#
2# Binutils 2.xx Version 1.
3#
4# This configuration file configure's, make's and install's binutils.
5#
6
7%include %{_configdir}/checks.cfg
8
9#
10# Select Snapshot Macro Maps
11#
12%select binutils-snapshot
13
14#
15# The description.
16#
17Name:      %{_target}-binutils-%{binutils_version}-%{release}
18Summary:   Binutils v%{binutils_version} for target %{_target} on host %{_host}
19Version:   %{binutils_version}
20Release:   %{release}
21URL:       http://sources.redhat.com/binutils
22BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
23
24#
25# Supports Candian Cross (Cxc).
26#
27%define allow_cxc
28
29#
30# Source
31#
32%ifn %{defined Source0}
33 Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2
34 VersionControl0: cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co binutils
35%endif
36
37#
38# Prepare the source code.
39#
40%prep
41  source_dir_0="binutils-%{binutils_version}"
42  %setup -q -c -n %{name}-%{version}
43  cd ${source_dir_0}
44  %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
45  %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
46  %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
47  %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
48  %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
49  %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
50  %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
51  %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
52  %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
53  %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
54  cd ..
55
56%build
57  %{?host_force_32bit:HOST_FORCE_32BIT="-m32"}
58  if test "%{_build}" != "%{_host}" ; then
59    build_dir="build-cxc"
60  else
61    build_dir="build"
62  fi
63  mkdir -p ${build_dir}
64  cd ${build_dir}
65  CFLAGS="$SB_OPT_FLAGS" \
66  ../${source_dir_0}/configure \
67    --build=%{_build} --host=%{_host} \
68    --target=%{_target} \
69    --verbose --disable-nls \
70    %{?with_deterministic_archives:--enable-deterministic-archives} \
71    --without-included-gettext \
72    --disable-win32-registry \
73    --disable-werror \
74    --prefix=%{_prefix} --bindir=%{_bindir} \
75    --exec-prefix=%{_exec_prefix} \
76    --includedir=%{_includedir} --libdir=%{_libdir} \
77    --mandir=%{_mandir} --infodir=%{_infodir}
78
79  %{__make} %{?_smp_mflags} all
80  cd ..
81
82%install
83  %{__rmdir} $SB_BUILD_ROOT
84
85  cd ${build_dir}
86  %{__make} DESTDIR=$SB_BUILD_ROOT install
87
88  # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
89  %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
90
91  %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
92  touch $SB_BUILD_ROOT%{_infodir}/dir
93
94  # binutils does not install share/locale, however it uses it
95  mkdir -p $SB_BUILD_ROOT%{_prefix}/share/locale
96
97  # We don't ship host files
98  %{__rmfile} ${SB_BUILD_ROOT}%{_libdir}/libiberty*
99
100  # manpages without corresponding tools
101  if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-dlltool%{_exeext}; then
102    %{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-dlltool*
103  fi
104  if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-nlmconv%{_exeext}; then
105    %{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-nlmconv*
106  fi
107  if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-windres%{_exeext}; then
108    %{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-windres*
109  fi
110  if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-windmc%{_exeext}; then
111    %{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-windmc*
112  fi
113
114  cd ..
Note: See TracBrowser for help on using the repository browser.