Binutils 2.14 for Solaris

I've removed c++filt, libiberty.a and standards.info from the stagedir
before packing. This was done since those files overlap with the gcc
already installed.
I have no idea what the right thing to do is, for now I think I'll let gcc
own those files.
The libiberty issue is probably related to the fact that the installed
gcc was built without binutils.
This commit is contained in:
Tom G. Christensen 2003-08-18 08:36:33 +00:00 committed by tgc
parent 0d68c91641
commit b3477b6d7a

111
binutils/build.sh Executable file
View File

@ -0,0 +1,111 @@
#!/bin/bash
#
# This is a generic build.sh script
# It can be used nearly unmodified with many packages
#
# The concept of "method" registering and the logic that implements it was shamelessly
# stolen from jhlj's Compile.sh script :)
#
# Check the following 4 variables before running the script
topdir=binutils
version=2.14
pkgver=1
source[0]=$topdir-$version.tar.bz2
# If there are no patches, simply comment this
#patch[0]=
# Source function library
. ${BUILDPKG_BASE}/scripts/buildpkg.functions
# Fill in pkginfo values if necessary
# using pkgname,name,pkgcat,pkgvendor & pkgdesc
name="Binutils - Collection of binary utilities"
pkgcat="application"
pkgvendor="http://www.gnu.org"
pkgdesc="Includes tools capable of linking and managing archives"
# Define script functions and register them
METHODS=""
reg() {
METHODS="$METHODS $1"
}
reg prep
prep()
{
generic_prep
}
reg build
build()
{
setdir stage
./configure --prefix=$prefix --disable --enable-shared
}
reg install
install()
{
generic_install DESTDIR
# Remove files that are overwritten by compiler packages
rm -f $stagedir$prefix/info/dir
rm -f $stagedir$prefix/info/standards.info
rm -f $stagedir$prefix/bin/c++filt
rm -f $stagedir$prefix/man/man1/c++filt.1
rm -f $stagedir$prefix/lib/libiberty*
}
reg pack
pack()
{
generic_pack
}
reg distclean
distclean()
{
clean distclean
}
###################################################
# No need to look below here
###################################################
reg all
all()
{
for METHOD in $METHODS
do
case $METHOD in
all*|*clean) ;;
*) $METHOD
;;
esac
done
}
reg
usage() {
echo Usage $0 "{"$(echo $METHODS | tr " " "|")"}"
exit 1
}
OK=0
for METHOD in $*
do
METHOD=" $METHOD *"
if [ "${METHODS%$METHOD}" == "$METHODS" ] ; then
usage
fi
OK=1
done
if [ $OK = 0 ] ; then
usage;
fi
for METHOD in $*
do
( $METHOD )
done