mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
binutils: added recipe for 2.25
This commit is contained in:
177
sys-devel/binutils/binutils-2.25_2014_12_27.recipe
Normal file
177
sys-devel/binutils/binutils-2.25_2014_12_27.recipe
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
SUMMARY="Assembler, linker and binary tools for target ${targetMachineTriple}"
|
||||||
|
HOMEPAGE="http://www.gnu.org/software/binutils"
|
||||||
|
|
||||||
|
srcGitRev="a05bd9155a41ad87382134678e93d67ceb959cfc"
|
||||||
|
SRC_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
|
||||||
|
CHECKSUM_SHA256="6d3b677cd8ef777bf6fb3186a15b5122e46345595a996370325c758b3d8a4ab6"
|
||||||
|
SRC_FILENAME="binutils-$portVersion.tar.gz"
|
||||||
|
REVISION="1"
|
||||||
|
LICENSE="
|
||||||
|
GNU GPL v3
|
||||||
|
GNU LGPL v3
|
||||||
|
"
|
||||||
|
COPYRIGHT="1988-2014 Free Software Foundation, Inc."
|
||||||
|
|
||||||
|
|
||||||
|
ARCHITECTURES="x86 x86_64 arm"
|
||||||
|
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||||
|
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||||
|
# for a different secondary architecture.
|
||||||
|
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||||
|
fi
|
||||||
|
SECONDARY_ARCHITECTURES="x86"
|
||||||
|
|
||||||
|
PROVIDES="
|
||||||
|
binutils$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:addr2line$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:ar$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:as$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:c++filt$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:elfedit$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:gprof$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:ld$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:ld.bfd$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:nm$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:objcopy$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:objdump$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:ranlib$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:readelf$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:size$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:strings$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
cmd:strip$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
lib:libbfd_2.25$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
lib:libopcodes_2.25$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||||
|
"
|
||||||
|
|
||||||
|
REQUIRES="
|
||||||
|
haiku$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
BUILD_REQUIRES="
|
||||||
|
cmd:find
|
||||||
|
cmd:xargs
|
||||||
|
"
|
||||||
|
BUILD_PREREQUIRES="
|
||||||
|
haiku${secondaryArchSuffix}_devel
|
||||||
|
cmd:autoconf
|
||||||
|
cmd:awk
|
||||||
|
cmd:find
|
||||||
|
cmd:flex
|
||||||
|
cmd:gcc$secondaryArchSuffix
|
||||||
|
cmd:ld$secondaryArchSuffix
|
||||||
|
cmd:make
|
||||||
|
cmd:makeinfo
|
||||||
|
cmd:sed
|
||||||
|
cmd:strip
|
||||||
|
cmd:tar
|
||||||
|
cmd:xargs
|
||||||
|
"
|
||||||
|
|
||||||
|
SOURCE_DIR="buildtools-$srcGitRev/binutils"
|
||||||
|
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
|
||||||
|
|
||||||
|
sourceDir=$(pwd)
|
||||||
|
relativeInstallDir="develop/tools$secondaryArchSubDir"
|
||||||
|
installDir="$prefix/$relativeInstallDir"
|
||||||
|
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||||
|
|
||||||
|
BUILD()
|
||||||
|
{
|
||||||
|
rm -rf $objectsDir
|
||||||
|
|
||||||
|
# Touch all *.info files, as newer texinfos don't like their format
|
||||||
|
(cd $sourceDir; find . -name \*.info | xargs touch)
|
||||||
|
|
||||||
|
mkdir -p $objectsDir
|
||||||
|
cd $objectsDir
|
||||||
|
|
||||||
|
CFLAGS=-O2 CXXFLAGS=-O2 runConfigure "$sourceDir/configure" \
|
||||||
|
--exec-prefix=$installDir \
|
||||||
|
--includedir=$includeDir/binutils \
|
||||||
|
--docdir=$docDir \
|
||||||
|
--disable-nls --enable-shared=yes \
|
||||||
|
--with-sysroot=/
|
||||||
|
# Note: The sysroot option is normally superfluous. We have to specify
|
||||||
|
# it, however, since these binutils may be used by the bootstrap-gcc,
|
||||||
|
# which passes --sysroot=<path> to ld.
|
||||||
|
|
||||||
|
make $jobArgs LEXLIB=
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTALL()
|
||||||
|
{
|
||||||
|
cd $objectsDir
|
||||||
|
|
||||||
|
make install
|
||||||
|
make install-html
|
||||||
|
|
||||||
|
# Remove the development libraries and headers. Nobody uses those anyway.
|
||||||
|
rm $libDir/*.a $libDir/*.la $libDir/libbfd.so $libDir/libopcodes.so
|
||||||
|
rm -r $developDir/headers
|
||||||
|
|
||||||
|
### HTML documentation ####################################
|
||||||
|
|
||||||
|
echo "Organizing HTML documentation..."
|
||||||
|
cd $docDir
|
||||||
|
|
||||||
|
# beautify HTML docs and remove stuff we don't need
|
||||||
|
mv as.html as
|
||||||
|
ln -sf as/index.html as.html
|
||||||
|
mv bfd.html bfd
|
||||||
|
ln -sf bfd/index.html bfd.html
|
||||||
|
mv binutils.html binutils
|
||||||
|
ln -sf binutils/index.html binutils.html
|
||||||
|
mv gprof.html gprof
|
||||||
|
ln -sf gprof/index.html gprof.html
|
||||||
|
mv ld.html ld
|
||||||
|
ln -sf ld/index.html ld.html
|
||||||
|
rm libiberty.html standards.html
|
||||||
|
|
||||||
|
# no info documentation
|
||||||
|
rm -r $infoDir
|
||||||
|
|
||||||
|
### Strip #################################################
|
||||||
|
|
||||||
|
echo "Strip debug info"
|
||||||
|
|
||||||
|
strip --strip-debug $binDir/*
|
||||||
|
|
||||||
|
### Symlinks ##############################################
|
||||||
|
|
||||||
|
echo "Creating required symlinks"
|
||||||
|
|
||||||
|
# There are copies of a subset of the commands below installDir. We
|
||||||
|
# overwrite those with symlinks to the ones in binDir.
|
||||||
|
for file in $installDir/$effectiveTargetMachineTriple/bin/*; do
|
||||||
|
symlinkRelative -sfn $binDir/$(basename $file) $file
|
||||||
|
done
|
||||||
|
|
||||||
|
### Cleanup #################################################
|
||||||
|
|
||||||
|
echo "Cleanup"
|
||||||
|
|
||||||
|
# delete man pages for commands that we aren't including
|
||||||
|
cd $manDir
|
||||||
|
for cmd in dlltool nlmconv windmc windres; do
|
||||||
|
rm -f man1/$cmd.1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
DESCRIPTION="
|
||||||
|
The GNU Binutils are a collection of binary tools. The main ones are:
|
||||||
|
- ld - the GNU linker.
|
||||||
|
- as - the GNU assembler.
|
||||||
|
But they also include:
|
||||||
|
- 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.
|
||||||
|
- 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.
|
||||||
|
The tools of this package can be used for cross-builds to \
|
||||||
|
$effectiveTargetMachineTriple.
|
||||||
|
"
|
||||||
Reference in New Issue
Block a user