wok-4.x view binutils/receipt @ rev 12466

New toolchain GCC 4.9.2, Glibc 2.19, Binutils 2.23.1
author Stanislas Leduc <shann@slitaz.org>
date Wed Nov 09 15:12:00 2022 +0000 (2022-11-09)
parents dbcdd09a3e18
children
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.23.1"
5 CATEGORY="development"
6 SHORT_DESC="GNU assembler, linker and binary utilities."
7 MAINTAINER="pankso@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
9 WEB_SITE="http://www.gnu.org/software/binutils/"
10 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
11 PROVIDE="libbfd"
12 TAGS="assembler linker"
14 DEPENDS="glibc zlib"
15 BUILD_DEPENDS="glibc-dev zlib-dev"
17 # Rules to compile & install the temporary toolchain.
18 precook_tmp_toolchain()
19 {
20 mkdir -p binutils-build && cd binutils-build
21 { $src/configure \
22 --target=$HOST_SYSTEM --disable-nls \
23 --disable-werror &&
24 make
25 } || return 1
27 #If building on x86_64, create a symlink to ensure the sanity of the toolchain.
28 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64
30 make install
31 }
33 cook_tmp_toolchain()
34 {
35 mkdir -p binutils-build && cd binutils-build
36 { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \
37 AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \
38 $src/configure $CONFIGURE_ARGS \
39 --disable-nls --with-lib-path=/tools/lib &&
40 make &&
41 make install &&
42 make -C ld clean &&
43 make -C ld LIB_PATH=/usr/lib:/lib
44 } || return 1
45 cp ld/ld-new /tools/bin
46 }
48 # Rules to configure and make the package.
49 compile_rules()
50 {
51 cd $src
52 mkdir -p ../binutils-build && cd ../binutils-build
53 $src/configure \
54 --program-prefix=$TOOLPREFIX \
55 --enable-shared \
56 --disable-werror \
57 $CONFIGURE_ARGS &&
58 make tooldir=/usr &&
59 make tooldir=/usr install &&
60 # This is the default binutils, so create symlinks to the target platform
61 # binutil binaries. Delete duplicate binaries to save space.
62 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
63 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
64 if [ -e $path ] ; then
65 rm -f $path
66 fi
67 ln -s $binutil $path
68 done
69 }
71 # Rules to gen a SliTaz package suitable for Tazpkg.
72 genpkg_rules()
73 {
74 mkdir -p $fs/usr/lib
75 cp -a $_pkg/usr/bin $fs/usr
76 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
77 cp -a $_pkg/usr/lib/*.a $fs/usr/lib
78 cp -a $_pkg/usr/include $fs/usr
80 # libiberty.h
81 cp -a $src/include/libiberty.h $fs/usr/include
83 # Remove 'strings' (Busybox).
84 #rm $fs/usr/lib/libiberty.a
85 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
87 # Remove build directory (cookutils and tazwok path).
88 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
89 rm -rf $WOK/$PACKAGE/$PACKAGE-build
90 }