1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
25 include $(PKGROOT)/Include
31 PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org>
32 PKG_GROUPS = Development/Tools
33 PKG_URL = http://www.gnu.org/software/binutils/
35 PKG_SUMMARY = The GNU Binutils are a collection of binary tools.
37 define PKG_DESCRIPTION
38 The GNU Binary Utilities, or binutils, is a collection of programming \
39 tools for the manipulation of object code in various object file formats.
42 PKG_BUILD_DEPS+= bison dejagnu flex gcc-c++ texinfo zlib-devel
44 PKG_TARBALL += $(THISAPP).tar.gz
46 define STAGE_PREPARE_CMDS
47 -mkdir -pv $(DIR_SRC)/binutils-build
49 # Suppress the installation of an outdated standards.info file as a newer
50 # one is installed later on in the Autoconf instructions:
51 cd $(DIR_APP) && rm -fv etc/standards.info
52 cd $(DIR_APP) && sed -e '/^INFO/s/standards.info //' -i etc/Makefile.in
54 cd $(DIR_APP) && sed -i -e 's/%''{release}/$(PKG_RELEASE)/g' bfd/Makefile{.am,.in}
57 BINUTILS_TARGET_PLATFORM = $(subst -gnu,,$(DISTRO_MACHINE))
60 cd $(DIR_SRC)/binutils-build && \
61 ../$(THISAPP)/configure \
62 --host=$(BINUTILS_TARGET_PLATFORM) \
63 --build=$(BINUTILS_TARGET_PLATFORM) \
64 --target=$(BINUTILS_TARGET_PLATFORM) \
66 --mandir=/usr/share/man \
72 cd $(DIR_SRC)/binutils-build && make tooldir=/usr $(PARALLELISMFLAGS)
76 # Apply a sed substitution to prevent a testsuite error:
77 #cd $(DIR_APP) && sed -i 's/getline/get_line/' libiberty/testsuite/test-demangle.c
78 #cd $(DIR_SRC)/binutils-build && make check
82 cd $(DIR_SRC)/binutils-build && make tooldir=/usr install DESTDIR=$(BUILDROOT)
84 cp -fv $(DIR_APP)/include/libiberty.h $(BUILDROOT)/usr/include