comparison gnu/binutils/binutils.sh @ 1222:325631424c65

misc: bring back build function
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 11:32:16 +0200
parents a47aaf9743a0
children 9867e578b1a9
comparison
equal deleted inserted replaced
1221:a47aaf9743a0 1222:325631424c65
46 with_nls="--enable-nls" 46 with_nls="--enable-nls"
47 else 47 else
48 with_nls="--disable-nls" 48 with_nls="--disable-nls"
49 fi 49 fi
50 50
51 rm -rf $PKGNAME-$PKGVERSION 51 build()
52 tar xvf $PKGNAME-$PKGVERSION.tar.xz 52 {
53 cd $PKGNAME-$PKGVERSION 53 rm -rf $PKGNAME-$PKGVERSION
54 tar xvf $PKGNAME-$PKGVERSION.tar.xz
55 cd $PKGNAME-$PKGVERSION
54 56
55 CFLAGS="$CFLAGS" \ 57 CFLAGS="$CFLAGS" \
56 CXXFLAGS="$CXXFLAGS" \ 58 CXXFLAGS="$CXXFLAGS" \
57 CC="$CC" \ 59 CC="$CC" \
58 CXX="$CXX" \ 60 CXX="$CXX" \
59 LDFLAGS="$LDFLAGS" \ 61 LDFLAGS="$LDFLAGS" \
60 LIBS="$LIBS" \ 62 LIBS="$LIBS" \
61 ./configure \ 63 ./configure \
62 --build=$CBUILD \ 64 --build=$CBUILD \
63 --host=$CHOST \ 65 --host=$CHOST \
64 --target=$CTARGET \ 66 --target=$CTARGET \
65 --prefix=/usr \ 67 --prefix= \
66 --exec-prefix=/libexec/binutils \ 68 --exec-prefix=/libexec/binutils \
67 --bindir=/bin \ 69 --bindir=/bin \
68 --sbindir=/bin \ 70 --sbindir=/bin \
69 --disable-werror \ 71 --disable-werror \
70 --enable-shared \ 72 --enable-shared \
71 --with-system-zlib \ 73 --with-system-zlib \
72 $with_nls \ 74 $with_nls \
73 $with_gdb 75 $with_gdb
74 make 76 make
75 make install DESTDIR=$DESTDIR 77 make install DESTDIR=$DESTDIR
76 find $DESTDIR -type f -name "*.la" -delete 78 find $DESTDIR -type f -name "*.la" -delete
77 79
78 cd .. 80 cd ..
79 rm -rf $PKGNAME-$PKGVERSION 81 rm -rf $PKGNAME-$PKGVERSION
82 }