2020-03-13 11:58:39 +01:00
|
|
|
VERSION="2.34"
|
2017-12-09 21:51:48 +01:00
|
|
|
SRCDIR="binutils-$VERSION"
|
2018-02-10 10:48:03 +01:00
|
|
|
TARBALL="binutils-$VERSION.tar.xz"
|
2017-12-09 21:51:48 +01:00
|
|
|
URL="http://ftp.gnu.org/gnu/binutils"
|
2020-03-13 11:58:39 +01:00
|
|
|
SHA256SUM="f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952"
|
2019-02-27 14:22:03 +01:00
|
|
|
DEPENDS="tc-pkgtool"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
prepare() {
|
2018-10-21 21:54:12 +02:00
|
|
|
apply_patches
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2019-01-13 02:38:04 +01:00
|
|
|
local extra="$BINUTILS_EXTRACFG"
|
2018-10-19 13:02:06 +02:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
$1/configure --prefix="$TCDIR" --target="$TARGET" --disable-nls \
|
2018-05-19 00:31:01 +02:00
|
|
|
--with-sysroot="$TCDIR/$TARGET" --disable-multilib \
|
2018-10-21 20:01:47 +02:00
|
|
|
--enable-shared --enable-plugins --enable-relro \
|
|
|
|
--with-pic --enable-deterministic-archives \
|
2018-10-19 13:02:06 +02:00
|
|
|
--with-lib-path="$TCDIR/$TARGET/lib" $extra
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
make configure-host
|
|
|
|
make -j $NUMJOBS
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
make install
|
2019-02-08 00:24:54 +01:00
|
|
|
|
2019-03-06 10:03:12 +01:00
|
|
|
cat > "$PKGDEPLOYDIR/$PKGNAME.files" <<_EOF
|
2019-03-03 11:25:03 +01:00
|
|
|
dir bin 0755 0 0
|
|
|
|
dir lib 0755 0 0
|
|
|
|
dir lib/ldscripts 0755 0 0
|
|
|
|
file bin/ar 0755 0 0 $TCDIR/$TARGET/bin/ar
|
|
|
|
file bin/as 0755 0 0 $TCDIR/$TARGET/bin/as
|
|
|
|
file bin/ld 0755 0 0 $TCDIR/$TARGET/bin/ld
|
|
|
|
file bin/ld.bfd 0755 0 0 $TCDIR/$TARGET/bin/ld.bfd
|
|
|
|
file bin/nm 0755 0 0 $TCDIR/$TARGET/bin/nm
|
|
|
|
file bin/objcopy 0755 0 0 $TCDIR/$TARGET/bin/objcopy
|
|
|
|
file bin/objdump 0755 0 0 $TCDIR/$TARGET/bin/objdump
|
|
|
|
file bin/ranlib 0755 0 0 $TCDIR/$TARGET/bin/ranlib
|
|
|
|
file bin/readelf 0755 0 0 $TCDIR/$TARGET/bin/readelf
|
|
|
|
file bin/strip 0755 0 0 $TCDIR/$TARGET/bin/strip
|
|
|
|
_EOF
|
|
|
|
|
|
|
|
find -H "$TCDIR/$TARGET/lib/ldscripts" -type f \
|
|
|
|
-printf "file lib/ldscripts/%f 0%m 0 0 %p\\n" \
|
2019-03-06 10:03:12 +01:00
|
|
|
>> "$PKGDEPLOYDIR/$PKGNAME.files"
|
2019-03-03 11:25:03 +01:00
|
|
|
|
2019-03-09 14:22:55 +01:00
|
|
|
touch "$PKGDEPLOYDIR/$PKGNAME.desc"
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
2019-07-07 16:17:16 +02:00
|
|
|
check_update_simple "$URL" "binutils" "tar.xz"
|
2018-10-08 22:05:04 +02:00
|
|
|
}
|