mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
binutils: add recipe for version 2.36 and remove some old recipes
This version of binutils supports PE output, which is used for the 32bit EFI bootloader. Fixes https://dev.haiku-os.org/ticket/17568. Previous upgrades to binutils had been left disabled because of a bug (linked in the recipes), but the bug has since been closed (not sure if it was actually fixed). The only way to see if this will break something is to try to update binutils again, and see if anything breaks.
This commit is contained in:
@@ -1,167 +0,0 @@
|
||||
SUMMARY="Assembler, linker and binary tools for target ${targetMachineTriple}"
|
||||
HOMEPAGE="http://www.gnu.org/software/binutils"
|
||||
|
||||
SOURCE_URI="
|
||||
git+git://github.com/haiku/buildtools.git#db2a6d28f6c6a92cfb1c619b0828dfbf6b87ca30"
|
||||
REVISION="2"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
"
|
||||
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
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.23.2$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||
lib:libopcodes_2.23.2$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
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="binutils-$portVersion/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
|
||||
}
|
||||
|
||||
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.
|
||||
"
|
||||
@@ -1,172 +0,0 @@
|
||||
SUMMARY="Assembler, linker and binary tools for target ${targetMachineTriple}"
|
||||
HOMEPAGE="http://www.gnu.org/software/binutils"
|
||||
|
||||
srcGitRev="c20a732df8f8b6d0f32c872817f3a0498a5c4761"
|
||||
SOURCE_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="6d3b677cd8ef777bf6fb3186a15b5122e46345595a996370325c758b3d8a4ab6"
|
||||
SOURCE_FILENAME="binutils-$portVersion.tar.gz"
|
||||
REVISION="7"
|
||||
LICENSE="
|
||||
GNU GPL v3
|
||||
GNU LGPL v3
|
||||
"
|
||||
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
|
||||
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
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.24$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||
lib:libopcodes_2.24$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.
|
||||
"
|
||||
@@ -1,170 +0,0 @@
|
||||
SUMMARY="Assembler, linker and binary tools for target ${targetMachineTriple}"
|
||||
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 of 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."
|
||||
HOMEPAGE="http://www.gnu.org/software/binutils"
|
||||
COPYRIGHT="1988-2015 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v3
|
||||
GNU LGPL v3"
|
||||
REVISION="1"
|
||||
srcGitRev="e2963a55e6d09d838bd84135091fbc73ffa2c2bf"
|
||||
SOURCE_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="1e1214ea3cf87403cbd1176b41f823a6d0505074f513fb8eeb7e46c1aaa1c196"
|
||||
SOURCE_DIR="buildtools-$srcGitRev/binutils"
|
||||
SOURCE_FILENAME="binutils-$portVersion.tar.gz"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
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.1$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||
lib:libopcodes_2.25.1$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:find
|
||||
cmd:xargs
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
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
|
||||
"
|
||||
|
||||
|
||||
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
|
||||
|
||||
# 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
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
SUMMARY="Assembler, linker and binary tools for target ${targetMachineTriple}"
|
||||
HOMEPAGE="http://www.gnu.org/software/binutils"
|
||||
|
||||
srcGitRev="a05bd9155a41ad87382134678e93d67ceb959cfc"
|
||||
SOURCE_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="011e60e9ba3ce92af766adc222d55a6f7291991a85074e2b5b280b62317b201d"
|
||||
SOURCE_FILENAME="binutils-$portVersion.tar.gz"
|
||||
REVISION="1"
|
||||
LICENSE="
|
||||
GNU GPL v3
|
||||
GNU LGPL v3
|
||||
"
|
||||
COPYRIGHT="1988-2014 Free Software Foundation, Inc."
|
||||
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
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
|
||||
|
||||
# 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.
|
||||
"
|
||||
@@ -9,6 +9,7 @@ But they also include:
|
||||
- addr2line - converts addresses into filenames and line numbers.
|
||||
- ar - a utility for creating, modifying and extracting of archives.
|
||||
- c++filt - filter to demangle encoded C++ symbols.
|
||||
- gold - a linker for ELF files.
|
||||
- nm - lists symbols from object files.
|
||||
- objcopy - copys and translates object files.
|
||||
- objdump - displays information from object files.
|
||||
@@ -20,40 +21,41 @@ But they also include:
|
||||
|
||||
The tools of this package can be used for cross-builds to \
|
||||
$effectiveTargetMachineTriple."
|
||||
HOMEPAGE="http://www.gnu.org/software/binutils"
|
||||
COPYRIGHT="1988-2016 Free Software Foundation, Inc."
|
||||
HOMEPAGE="https://www.gnu.org/software/binutils/"
|
||||
COPYRIGHT="1988-2022 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v3
|
||||
GNU LGPL v3"
|
||||
REVISION="1"
|
||||
srcGitRev="661fb7cf18b38506538acdb9288c71dbf1e50ea4"
|
||||
binutilsVersion="2.36.1"
|
||||
srcGitRev="795d2053a07fdd2ce3c4ef6f649b0a27e2b085d1"
|
||||
SOURCE_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="ad585db93e6c6d782368625dba2c8f8dc9e95629a27f9656d246f0bcc64e1a03"
|
||||
SOURCE_DIR="buildtools-$srcGitRev/binutils"
|
||||
CHECKSUM_SHA256="73244785a2496119548d1b47c4f899a641a910941df678d6bc6bae41c2ab6be1"
|
||||
SOURCE_FILENAME="binutils-$portVersion.tar.gz"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
ARCHITECTURES="?all"
|
||||
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.26.20160125$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||
lib:libopcodes_2.26.20160125$secondaryArchSuffix = $portVersion compat >= 2.23
|
||||
binutils$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:addr2line$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:ar$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:as$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:c++filt$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:elfedit$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:gprof$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:ld$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:ld.bfd$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:nm$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:objcopy$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:objdump$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:ranlib$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:readelf$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:size$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:strings$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
cmd:strip$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
lib:libbfd_$binutilsVersion$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
lib:libopcodes_$binutilsVersion$secondaryArchSuffix = $portVersion compat >= 2.36
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -67,6 +69,7 @@ BUILD_REQUIRES="
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:autoconf
|
||||
cmd:awk
|
||||
cmd:bison
|
||||
cmd:find
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
@@ -94,17 +97,25 @@ BUILD()
|
||||
# Touch all *.info files, as newer texinfos don't like their format
|
||||
(cd $sourceDir; find . -name \*.info | xargs touch)
|
||||
|
||||
(cd $sourceDir; find . -name \*.y | sed 's/.y$/.c/g' | xargs touch)
|
||||
(cd $sourceDir; find . -name \*.y | sed 's/.y$/.h/g' | xargs touch)
|
||||
# Touch all *.y files, ensure they get generated; without this, the
|
||||
# PE targets would fail to link
|
||||
(cd $sourceDir; find . -name \*.y | xargs touch)
|
||||
|
||||
mkdir -p $objectsDir
|
||||
cd $objectsDir
|
||||
|
||||
binUtilsTargets=$effectiveTargetMachineTriple
|
||||
|
||||
if [ $effectiveTargetArchitecture == x86_64 ]; then
|
||||
binUtilsTargets="$binUtilsTargets,i386-efi-pe,x86_64-efi-pe"
|
||||
fi
|
||||
|
||||
CFLAGS=-O2 CXXFLAGS=-O2 runConfigure "$sourceDir/configure" \
|
||||
--exec-prefix=$installDir \
|
||||
--includedir=$includeDir/binutils \
|
||||
--docdir=$docDir --enable-deterministic-archives \
|
||||
--disable-nls --enable-shared=yes \
|
||||
--docdir=$docDir --enable-host-shared --enable-largefile=yes \
|
||||
--disable-libtool-lock --disable-nls --enable-plugins --enable-64-bit-bfd \
|
||||
--enable-ld=default --enable-targets=$binUtilsTargets \
|
||||
--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,
|
||||
@@ -121,7 +132,7 @@ 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 $libDir/*.a $libDir/*.la
|
||||
rm -r $developDir/headers
|
||||
|
||||
### HTML documentation ####################################
|
||||
@@ -165,9 +176,22 @@ INSTALL()
|
||||
|
||||
echo "Cleanup"
|
||||
|
||||
# delete commands we aren't including
|
||||
cd $binDir
|
||||
for cmd in dlltool dllwrap windmc windres; do
|
||||
rm -f $cmd
|
||||
rm -f $installDir/$effectiveTargetMachineTriple/bin/$cmd
|
||||
done
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd $objectsDir
|
||||
make check
|
||||
}
|
||||
Reference in New Issue
Block a user