summaryrefslogtreecommitdiffstats
path: root/source-builder/config/binutils-2-1.cfg
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-11-06 10:09:40 +1100
committerChris Johns <chrisj@rtems.org>2012-11-06 10:09:40 +1100
commitc80560d9a485880ff9b6a107fab7097b89d539ac (patch)
tree1d5d9771b2f59f1a4efb100287e077d558224d8f /source-builder/config/binutils-2-1.cfg
parentMerge branch 'master' of ssh://kiwi/opt/work/sw/rtems/tb/source-builder (diff)
downloadrtems-source-builder-c80560d9a485880ff9b6a107fab7097b89d539ac.tar.bz2
Move into the source-builder tree.
Diffstat (limited to 'source-builder/config/binutils-2-1.cfg')
-rw-r--r--source-builder/config/binutils-2-1.cfg88
1 files changed, 88 insertions, 0 deletions
diff --git a/source-builder/config/binutils-2-1.cfg b/source-builder/config/binutils-2-1.cfg
new file mode 100644
index 0000000..415d74f
--- /dev/null
+++ b/source-builder/config/binutils-2-1.cfg
@@ -0,0 +1,88 @@
+#
+# Binutils 2.xx Version 1.
+#
+# This configuration file configure's, make's and install's binutils.
+#
+
+%include %{_configdir}/checks.cfg
+
+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)
+
+#
+# Source
+#
+Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2
+VersionControl0: cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co binutils
+
+#
+# Prepare the source code.
+#
+%prep
+%setup -q -c -T -n %{name}-%{version}
+%setup -q -D -T -n %{name}-%{version} -a0
+cd binutils-%{binutils_version}
+%{?patch0:%patch0 -p1}
+cd ..
+
+%build
+ export PATH="%{_bindir}:${PATH}"
+ mkdir -p build
+ cd build
+%if "%{_build}" != "%{_host}"
+ CFLAGS_FOR_BUILD="-g -O2 -Wall" \
+%endif
+ CFLAGS="$SB_OPT_FLAGS" \
+ ../binutils-%{binutils_version}/configure \
+ --build=%{_build} --host=%{_host} \
+ --target=%{_target} \
+ --verbose --disable-nls \
+ --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 ..
+
+%install
+ export PATH="%{_bindir}:${PATH}"
+ rm -rf $SB_BUILD_ROOT
+
+ cd build
+ %{__make} DESTDIR=$SB_BUILD_ROOT install
+
+ # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
+ rm -rf $SB_BUILD_ROOT%{_infodir}/configure.info*
+
+ rm -f $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
+ rm -f ${SB_BUILD_ROOT}%{_libdir}/libiberty*
+
+ # manpages without corresponding tools
+ if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-dlltool%{_exeext}; then
+ rm -f ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-dlltool*
+ fi
+ if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-nlmconv%{_exeext}; then
+ rm -f ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-nlmconv*
+ fi
+ if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-windres%{_exeext}; then
+ rm -f ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-windres*
+ fi
+ if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-windmc%{_exeext}; then
+ rm -f ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-windmc*
+ fi
+
+ cd ..