#!/bin/bash # --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/binutils/binutils.conf # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf # # This program 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. A copy of the GNU General Public # License can be found at Documentation/COPYING. # # Many people helped and are helping developing ROCK Linux. Please # have a look at https://www.rocklinux.org/ and the Documentation/TEAM # file for details. # # --- ROCK-COPYRIGHT-NOTE-END --- pkg_binutils_cross="" pkg_binutils_target="$arch_target" case "$xpkg" in $pkg-cross-*) pkg_binutils_cross="${xpkg#*-cross-}" pkg_binutils_target="$pkg_binutils_cross-unknown-linux-gnu" var_append confopt " " "--target=$pkg_binutils_target" echo_status "Preparing to build a cross-binutils package for $pkg_binutils_cross." var_append INSTALL_WRAPPER_FILTER "|" 'sed -r "\,/share/(info|locale)/, d"' # This makes libiberty install in /usr/$pkg_binutils_target/lib instead of /usr/lib. var_append extraconfopt " " "--with-cross-host" ;; $pkg) ;; *) echo_error "Not supported $pkg package name: $xpkg" exit 1 ;; esac if [ $stagelevel -eq 0 ] ; then configprefix="" makeopt="" makeinstopt="install" confopt="--prefix=$root/$cross_tools \ --host=${CLFS_HOST} --target=${CLFS_TARGET} \$extraconfopt" var_append extraconfopt " " "--with-sysroot=$CLFS \ --disable-nls" fi if [ $stagelevel -ge 3 ] ; then hook_add postmake 3 "eval $MAKE info install-info" hook_add postmake 3 "eval $MAKE -C gas/doc install-man" fi if [ -z "$pkg_binutils_cross" ] ; then # This causes build errors with binutils-cross packages. var_append extraconfopt " " "--enable-shared" fi if [ "$ROCKCFG_MULTILIB" = 0 ] ; then var_append extraconfopt " " "--disable-multilib" fi # var_append extraconfopt " " "--enable-64-bit-bfd" # Don't treat warnings as errors. var_append extraconfopt " " "--disable-werror" custmain=binutils_main binutils_main() { mkdir ../objdir ; cd ../objdir eval $configprefix ../binutils-*/configure $confopt make configure-host eval make $makeopt if [ $stagelevel -eq 4 ] ; then make check || true fi eval make $makeinstopt hook_eval postmake if [ -z "$pkg_binutils_cross" ] ; then cp -v ../binutils-*/include/libiberty.h $root/usr/include/ else cp -v ../binutils-*/include/libiberty.h \ $root/usr/$pkg_binutils_target/include/ fi }