From dc9b54d055159a47b937c7ee82bde44b46d3fa71 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 5 Jan 2014 16:03:40 +0100 Subject: [PATCH] binutils: convert to new package format, move package Signed-off-by: Stephan Raue --- .../meta => devel/binutils/package.mk} | 50 ++++++++++++-- .../patches/binutils-2.23.1-cloog-0.17.patch | 0 .../binutils-2.23.1-multi_os_directory.patch | 0 packages/lang/gcc/package.mk | 6 +- packages/toolchain/devel/binutils/build | 68 ------------------- 5 files changed, 47 insertions(+), 77 deletions(-) rename packages/{toolchain/devel/binutils/meta => devel/binutils/package.mk} (60%) rename packages/{toolchain => }/devel/binutils/patches/binutils-2.23.1-cloog-0.17.patch (100%) rename packages/{toolchain => }/devel/binutils/patches/binutils-2.23.1-multi_os_directory.patch (100%) delete mode 100755 packages/toolchain/devel/binutils/build diff --git a/packages/toolchain/devel/binutils/meta b/packages/devel/binutils/package.mk similarity index 60% rename from packages/toolchain/devel/binutils/meta rename to packages/devel/binutils/package.mk index b77b7e0ab3..f4a1b79621 100644 --- a/packages/toolchain/devel/binutils/meta +++ b/packages/devel/binutils/package.mk @@ -22,16 +22,54 @@ PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.gnu.org/software/binutils/binutils.html" -#PKG_URL="http://www.mirrorservice.org/sites/ftp.kernel.org/pub/linux/devel/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" -#PKG_URL="ftp://ftp.pgpi.com/linux/kernel/pub/linux/devel/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_URL="http://ftp.gnu.org/gnu/binutils/$PKG_NAME-$PKG_VERSION.tar.gz" -#PKG_URL="ftp://ftp.kernel.org/pub/linux/devel/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache bison:host flex linux:host gmp:host mpfr cloog ppl:host" +PKG_DEPENDS_HOST="" +PKG_BUILD_DEPENDS_HOST="ccache bison:host flex linux:host gmp:host mpfr cloog ppl:host" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="binutils: A GNU collection of binary utilities" PKG_LONGDESC="The GNU binutils are utilities of use when dealing with object files. the packages includes ld - the GNU linker, as - the GNU assembler, addr2line - converts addresses into filenames and line numbers, ar - a utility for creating, modifying and extracting from archives, c++filt - filter to demangle encoded C++ symbols, gprof - displays profiling information, nlmconv - converts object code into an NLM, nm - lists symbols from object files, objcopy - Copys and translates object files, objdump - displays information from object files, ranlib - generates an index to the contents of an archive, readelf - displays information from any ELF format object file, size - lists the section sizes of an object or archive file, strings - lists printable strings from files, strip - discards symbols as well as windres - a compiler for Windows resource files." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +PKG_CONFIGURE_OPTS_HOST="--target=$TARGET_NAME \ + --with-sysroot=$SYSROOT_PREFIX \ + --with-lib-path=$SYSROOT_PREFIX/lib:$SYSROOT_PREFIX/usr/lib \ + --with-gmp=$ROOT/$TOOLCHAIN \ + --with-mpfr=$ROOT/$TOOLCHAIN \ + --with-ppl=$ROOT/$TOOLCHAIN \ + --with-cloog=$ROOT/$TOOLCHAIN \ + --disable-werror \ + --disable-multilib \ + --disable-libada \ + --disable-libssp \ + --disable-ppl-version-check \ + --enable-cloog-backend=isl \ + --enable-version-specific-runtime-libs \ + --enable-plugins \ + --enable-gold \ + --enable-ld=default \ + --enable-lto \ + --disable-nls" + +if [ "$TARGET_ARCH" = "x86_64" ]; then + PKG_CONFIGURE_OPTS_HOST="$PKG_CONFIGURE_OPTS_HOST --enable-64-bit-bfd" +fi + +pre_configure_host() { + unset CPPFLAGS + unset CFLAGS + unset CXXFLAGS + unset LDFLAGS +} + +make_host() { + make configure-host + make +} + +makeinstall_host() { + cp -v ../include/libiberty.h $SYSROOT_PREFIX/usr/include + make install +} diff --git a/packages/toolchain/devel/binutils/patches/binutils-2.23.1-cloog-0.17.patch b/packages/devel/binutils/patches/binutils-2.23.1-cloog-0.17.patch similarity index 100% rename from packages/toolchain/devel/binutils/patches/binutils-2.23.1-cloog-0.17.patch rename to packages/devel/binutils/patches/binutils-2.23.1-cloog-0.17.patch diff --git a/packages/toolchain/devel/binutils/patches/binutils-2.23.1-multi_os_directory.patch b/packages/devel/binutils/patches/binutils-2.23.1-multi_os_directory.patch similarity index 100% rename from packages/toolchain/devel/binutils/patches/binutils-2.23.1-multi_os_directory.patch rename to packages/devel/binutils/patches/binutils-2.23.1-multi_os_directory.patch diff --git a/packages/lang/gcc/package.mk b/packages/lang/gcc/package.mk index 65f202cbb5..58bcb3e8eb 100644 --- a/packages/lang/gcc/package.mk +++ b/packages/lang/gcc/package.mk @@ -24,10 +24,10 @@ PKG_LICENSE="GPL" PKG_SITE="http://gcc.gnu.org/" PKG_URL="ftp://ftp.gnu.org/gnu/gcc/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp:host mpfr mpc cloog ppl:host" -PKG_BUILD_DEPENDS_BOOTSTRAP="ccache autoconf-2.64 binutils gmp:host mpfr mpc cloog ppl:host" +PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils:host gmp:host mpfr mpc cloog ppl:host" +PKG_BUILD_DEPENDS_BOOTSTRAP="ccache autoconf-2.64 binutils:host gmp:host mpfr mpc cloog ppl:host" PKG_BUILD_DEPENDS_TARGET="gcc:host" -PKG_BUILD_DEPENDS_HOST="ccache autoconf-2.64 binutils gmp:host mpfr mpc cloog ppl:host eglibc" +PKG_BUILD_DEPENDS_HOST="ccache autoconf-2.64 binutils:host gmp:host mpfr mpc cloog ppl:host eglibc" PKG_PRIORITY="optional" PKG_SECTION="lang" PKG_SHORTDESC="gcc: The GNU Compiler Collection Version 4 (aka GNU C Compiler)" diff --git a/packages/toolchain/devel/binutils/build b/packages/toolchain/devel/binutils/build deleted file mode 100755 index d89f7d8d2e..0000000000 --- a/packages/toolchain/devel/binutils/build +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) -# -# OpenELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# OpenELEC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC. If not, see . -################################################################################ - -. config/options $1 - -if [ "$TARGET_ARCH" = "x86_64" ]; then - WITH_64B_BFD="--enable-64-bit-bfd" -fi - -setup_toolchain host - -CPPFLAGS="" -CFLAGS="" -CXXFLAGS="" -LDFLAGS="" - -# Disable PPL version check as the PPL major version number has been bumped so the check fails. - PPL_CHECK="--disable-ppl-version-check" - -cd $PKG_BUILD -mkdir -p objdir && cd objdir -../configure --host=$HOST_NAME \ - --build=$HOST_NAME \ - --target=$TARGET_NAME \ - --prefix=$ROOT/$TOOLCHAIN \ - --with-sysroot=$SYSROOT_PREFIX \ - --with-lib-path="$SYSROOT_PREFIX/lib:$SYSROOT_PREFIX/usr/lib" \ - --with-gmp=$ROOT/$TOOLCHAIN \ - --with-mpfr=$ROOT/$TOOLCHAIN \ - --with-ppl=$ROOT/$TOOLCHAIN \ - --with-cloog=$ROOT/$TOOLCHAIN \ - --disable-werror \ - --disable-multilib \ - --disable-libada \ - --disable-libssp \ - $PPL_CHECK \ - --enable-cloog-backend=isl \ - --enable-version-specific-runtime-libs \ - $WITH_64B_BFD \ - --enable-plugins \ - --enable-gold \ - --enable-ld=default \ - --enable-lto \ - --disable-nls - -make configure-host -make - -cp -v ../include/libiberty.h $SYSROOT_PREFIX/usr/include - -make install