Compare commits
8
Commits
d9a4532e5b
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53a3015e16
|
||
|
|
66fce4b104
|
||
|
|
b1f842a670
|
||
|
|
a790b8a13f
|
||
|
|
6694587506
|
||
|
|
b6e815c62a
|
||
|
|
3dfb8cb120
|
||
|
|
66e600b37a
|
@@ -0,0 +1,3 @@
|
||||
# Ignore BPM archives and signatures
|
||||
*.bpm
|
||||
*.bpm.sig
|
||||
+7
-1
@@ -3,6 +3,12 @@
|
||||
URL="https://www.gnu.org/software/binutils/"
|
||||
|
||||
# Get version number
|
||||
VERSION=$(curl -s -L "$URL" | grep 'The latest release of GNU binutils is ' | grep -o -E '[0-9]{1,}.[0-9]{1,}(\.[0-9]{1,}|)')
|
||||
VERSION=$(curl -s -L "$URL" | grep 'The latest release of GNU binutils is ' | grep -o -E '[0-9]{1,}\.[0-9]{1,}(\.[0-9]{1,})?')
|
||||
|
||||
# Append '.0' if patch number is missing
|
||||
DOT_COUNT=`tr -dc '.' <<< "$VERSION" | awk '{ print length; }'`
|
||||
if [ $DOT_COUNT -eq 1 ]; then
|
||||
VERSION="${VERSION}.0"
|
||||
fi
|
||||
|
||||
echo "$VERSION"
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
name: binutils
|
||||
description: The GNU Binutils are a collection of binary tools
|
||||
version: 2.47.0
|
||||
revision: 1
|
||||
url: https://www.gnu.org/software/binutils/
|
||||
license: GPL3-or-later
|
||||
maintainers:
|
||||
- [email protected]
|
||||
architecture: any
|
||||
type: source
|
||||
depends:
|
||||
- flex
|
||||
- gcc-libs
|
||||
- glibc
|
||||
- jansson
|
||||
- libelf
|
||||
- zlib
|
||||
- zstd
|
||||
optional_depends:
|
||||
- debuginfod:For debuginfod server/client functionality
|
||||
- perl:For gprofng-display-html
|
||||
check_depends:
|
||||
- bc
|
||||
- debuginfod
|
||||
- dejagnu
|
||||
downloads:
|
||||
- url: https://sourceware.org/pub/binutils/releases/binutils-${BPM_PKG_VERSION//.0/}.tar.xz
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: 154ab23b60070e8f27013c22977f1129425d67d1e8acd6e13010e617811e4cff
|
||||
@@ -1,9 +0,0 @@
|
||||
name: binutils
|
||||
description: The GNU Binutils are a collection of binary tools
|
||||
version: 2.45
|
||||
url: https://www.gnu.org/software/binutils/
|
||||
license: GPL
|
||||
architecture: any
|
||||
depends: ["glibc","libelf","zlib","zstd"]
|
||||
make_depends: ["bc","dejagnu"]
|
||||
type: source
|
||||
@@ -0,0 +1,71 @@
|
||||
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
../configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--with-lib-path=/usr/lib:/usr/local/lib \
|
||||
--enable-cet \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-deterministic-archives \
|
||||
--enable-gold \
|
||||
--enable-install-libiberty \
|
||||
--enable-jansson \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-pgo-build=lto \
|
||||
--enable-plugins \
|
||||
--enable-relro \
|
||||
--enable-shared \
|
||||
--enable-targets=x86_64-pep,bpf-unknown-none \
|
||||
--enable-threads \
|
||||
--disable-gdb \
|
||||
--disable-gdbserver \
|
||||
--disable-libdecnumber \
|
||||
--disable-readline \
|
||||
--disable-sim \
|
||||
--disable-werror \
|
||||
--with-debuginfod \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make tooldir=/usr
|
||||
}
|
||||
|
||||
# The check function is executed in the source directory
|
||||
# This function is used to run tests to verify the package has been compiled correctly
|
||||
check() {
|
||||
cd build
|
||||
|
||||
make -O CFLAGS_FOR_TARGET="-O2 -g" \
|
||||
CXXFLAGS="-O2 -no-pie -fno-PIC" \
|
||||
CFLAGS="-O2 -no-pie" \
|
||||
LDFLAGS="" \
|
||||
check || true
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
cd build
|
||||
|
||||
make DESTDIR="$BPM_OUTPUT" tooldir=/usr install
|
||||
|
||||
# Install PIC version of libiberty
|
||||
install -m644 libiberty/pic/libiberty.a "$BPM_OUTPUT"/usr/lib
|
||||
|
||||
# Remove unwanted files
|
||||
rm -f "$BPM_OUTPUT"/usr/share/man/man1/{dlltool,windres,windmc}*
|
||||
|
||||
# Remove static libraries
|
||||
rm -f "$BPM_OUTPUT"/usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/binutils/COPYING
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||
|
||||
DOWNLOAD="https://sourceware.org/pub/binutils/releases/binutils-${BPM_PKG_VERSION}.tar.xz"
|
||||
FILENAME="${DOWNLOAD##*/}"
|
||||
|
||||
# The prepare function is executed in the root of the temp directory
|
||||
# This function is used for downloading files and putting them into the correct location
|
||||
prepare() {
|
||||
wget "$DOWNLOAD"
|
||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
mkdir -v build
|
||||
cd build
|
||||
../configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--enable-gold \
|
||||
--enable-ld=default \
|
||||
--enable-plugins \
|
||||
--enable-shared \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--with-system-zlib \
|
||||
--enable-default-hash-style=gnu
|
||||
make tooldir=/usr
|
||||
}
|
||||
|
||||
# The check function is executed in the source directory
|
||||
# This function is used to run tests to verify the package has been compiled correctly
|
||||
check() {
|
||||
# Testsuite currently broken
|
||||
return 0
|
||||
|
||||
#cd build
|
||||
#make check
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
cd build
|
||||
make DESTDIR="$BPM_OUTPUT" tooldir=/usr install
|
||||
rm -fv "$BPM_OUTPUT"/usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a
|
||||
mkdir -p "$BPM_OUTPUT"/usr/share/licenses/binutils/
|
||||
cp ../COPYING "$BPM_OUTPUT"/usr/share/licenses/binutils/COPYING
|
||||
}
|
||||
Reference in New Issue
Block a user