source: rtems-source-builder/source-builder/config/binutils-2-1.cfg @ 4f26bdb

4.104.114.9
Last change on this file since 4f26bdb was 4f26bdb, checked in by Chris Johns <chrisj@…>, on Apr 1, 2013 at 4:19:56 AM

Add Canadian Cross support.

Add support to build MinGW tools using Cygwin. This is a Canadian cross
build.

Do not expand the directives when parsing a configuration file. Hold
in the package object the text as read from the configuration file. Still
parse the logic but leave the macros. This allows a configuration to be
varied when the build happens. The Canadian cross uses this to build a
build compiler used to build a Cxc runtime.

Add Cxc support to the build module. In the defaults add rm and rmfile
macros, add Cxc paths and pre-build script code.

In the setbuilder check for a Cxc build and if so and the package
allow Cxc build the build host version then the host target
version.

Add cygiwn support to the defaults processing and to the Windows module.

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