mirror of
https://github.com/pygos/build.git
synced 2024-11-25 04:20:41 +01:00
53 lines
1.5 KiB
Text
Executable file
53 lines
1.5 KiB
Text
Executable file
VERSION="2.34"
|
|
SRCDIR="binutils-$VERSION"
|
|
TARBALL="binutils-$VERSION.tar.xz"
|
|
URL="http://ftp.gnu.org/gnu/binutils"
|
|
SHA256SUM="f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952"
|
|
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"
|
|
}
|