mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00

Remove the numbered source and patches and automatically manage sources and patches. This removes the overhead in maintaining large collections of patches.
108 lines
2.6 KiB
INI
108 lines
2.6 KiB
INI
#
|
|
# Binutils 2.xx Version 1.
|
|
#
|
|
# This configuration file configure's, make's and install's binutils.
|
|
#
|
|
|
|
%include %{_configdir}/checks.cfg
|
|
|
|
#
|
|
# Select Snapshot Macro Maps
|
|
#
|
|
%select binutils-snapshot
|
|
|
|
#
|
|
# The description.
|
|
#
|
|
Name: %{_target}-binutils-%{binutils_version}-%{release}
|
|
Summary: Binutils v%{binutils_version} for target %{_target} on host %{_host}
|
|
Version: %{binutils_version}
|
|
Release: %{release}
|
|
URL: http://sources.redhat.com/binutils
|
|
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|
|
|
#
|
|
# Supports Candian Cross (Cxc).
|
|
#
|
|
%define allow_cxc
|
|
|
|
#
|
|
# Source
|
|
#
|
|
%source set binutils ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2
|
|
|
|
#
|
|
# Prepare the source code.
|
|
#
|
|
%prep
|
|
build_top=$(pwd)
|
|
|
|
source_dir_binutils="binutils-%{binutils_version}"
|
|
%source setup binutils -q -n binutils-%{binutils_version}
|
|
%patch setup binutils -p1
|
|
|
|
cd ${build_top}
|
|
|
|
%build
|
|
build_top=$(pwd)
|
|
|
|
%{build_directory}
|
|
|
|
mkdir -p ${build_dir}
|
|
cd ${build_dir}
|
|
|
|
%{host_build_flags}
|
|
|
|
../${source_dir_binutils}/configure \
|
|
--build=%{_build} --host=%{_host} \
|
|
--target=%{_target} \
|
|
--verbose --disable-nls \
|
|
%{?with_deterministic_archives:--enable-deterministic-archives} \
|
|
--without-included-gettext \
|
|
--disable-win32-registry \
|
|
--disable-werror \
|
|
--prefix=%{_prefix} --bindir=%{_bindir} \
|
|
--exec-prefix=%{_exec_prefix} \
|
|
--includedir=%{_includedir} --libdir=%{_libdir} \
|
|
--mandir=%{_mandir} --infodir=%{_infodir}
|
|
|
|
%{__make} %{?_smp_mflags} all
|
|
|
|
cd ${build_top}
|
|
|
|
%install
|
|
cd ${build_top}
|
|
|
|
%{__rmdir} $SB_BUILD_ROOT
|
|
|
|
cd ${build_dir}
|
|
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
|
|
|
# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
|
|
%{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
|
|
|
|
%{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
|
|
touch $SB_BUILD_ROOT%{_infodir}/dir
|
|
|
|
# binutils does not install share/locale, however it uses it
|
|
mkdir -p $SB_BUILD_ROOT%{_prefix}/share/locale
|
|
|
|
# We don't ship host files
|
|
%{__rmfile} ${SB_BUILD_ROOT}%{_libdir}/libiberty*
|
|
|
|
# manpages without corresponding tools
|
|
if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-dlltool%{_exeext}; then
|
|
%{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-dlltool*
|
|
fi
|
|
if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-nlmconv%{_exeext}; then
|
|
%{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-nlmconv*
|
|
fi
|
|
if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-windres%{_exeext}; then
|
|
%{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-windres*
|
|
fi
|
|
if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-windmc%{_exeext}; then
|
|
%{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-windmc*
|
|
fi
|
|
|
|
cd ${build_top}
|