mirror of
https://github.com/pygos/build.git
synced 2024-11-23 03:29:46 +01:00
53 lines
1.5 KiB
Text
Executable file
53 lines
1.5 KiB
Text
Executable file
VERSION="2.32"
|
|
SRCDIR="binutils-$VERSION"
|
|
TARBALL="binutils-$VERSION.tar.xz"
|
|
URL="http://ftp.gnu.org/gnu/binutils"
|
|
SHA256SUM="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04"
|
|
DEPENDS="tc-pkgtool"
|
|
|
|
prepare() {
|
|
apply_patches
|
|
}
|
|
|
|
build() {
|
|
local extra="$BINUTILS_EXTRACFG"
|
|
|
|
$1/configure --prefix="$TCDIR" --target="$TARGET" --disable-nls \
|
|
--with-sysroot="$TCDIR/$TARGET" --disable-multilib \
|
|
--enable-shared --enable-plugins --enable-relro \
|
|
--with-pic --enable-deterministic-archives \
|
|
--with-lib-path="$TCDIR/$TARGET/lib" $extra
|
|
|
|
make configure-host
|
|
make -j $NUMJOBS
|
|
}
|
|
|
|
deploy() {
|
|
make install
|
|
|
|
cat > "$PKGDEPLOYDIR/$PKGNAME.files" <<_EOF
|
|
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" \
|
|
>> "$PKGDEPLOYDIR/$PKGNAME.files"
|
|
|
|
touch "$PKGDEPLOYDIR/$PKGNAME.desc"
|
|
}
|
|
|
|
check_update() {
|
|
check_update_simple "$URL" "binutils-" "tar.xz"
|
|
}
|