comparison dev/binutils/binutils.sh @ 658:936f40a89c99

dev/binutils: build with clang and add prefix
author David Demelier <markand@malikania.fr>
date Tue, 30 Jul 2019 20:50:00 +0200
parents 25cecc6dca48
children 59a2fa6992bc
comparison
equal deleted inserted replaced
657:b0fd9c97761e 658:936f40a89c99
24 PKGDEPENDS="compression/zlib" 24 PKGDEPENDS="compression/zlib"
25 PKGOPTIONS="GDB NLS" 25 PKGOPTIONS="GDB NLS"
26 26
27 : ${CHOST:=$(uname -m)-linux-musl} 27 : ${CHOST:=$(uname -m)-linux-musl}
28 : ${CBUILD:=$(uname -m)-linux-musl} 28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CC:=gcc} 29 : ${CC:=clang}
30 : ${CFLAGS:=-O2} 30 : ${CFLAGS:=-O2}
31 : ${CXX:=g++} 31 : ${CXX:=clang++}
32 : ${CXXFLAGS:=-O2} 32 : ${CXXFLAGS:=-O2}
33 : ${LDFLAGS:=} 33 : ${LDFLAGS:=}
34 : ${LIBS:=} 34 : ${LIBS:=}
35 : ${GDB:=yes} 35 : ${GDB:=yes}
36 : ${NLS:=yes} 36 : ${NLS:=yes}
62 LIBS="$LIBS" \ 62 LIBS="$LIBS" \
63 ./configure \ 63 ./configure \
64 --build=$CBUILD \ 64 --build=$CBUILD \
65 --host=$CHOST \ 65 --host=$CHOST \
66 --target=$CTARGET \ 66 --target=$CTARGET \
67 --sbindir=/bin \
67 --prefix= \ 68 --prefix= \
69 --disable-static \
68 --disable-werror \ 70 --disable-werror \
69 --enable-gold \
70 --enable-ld=default \
71 --enable-lto \
72 --enable-plugins \
73 --enable-relro \
74 --enable-shared \ 71 --enable-shared \
75 --enable-threads \ 72 --program-prefix=binutils- \
76 --with-pic \
77 --with-system-zlib \ 73 --with-system-zlib \
78 $with_nls \ 74 $with_nls \
79 $with_gdb 75 $with_gdb
80 make tooldir=/ 76 make
81 make tooldir=/ install DESTDIR=$DESTDIR 77 make install DESTDIR=$DESTDIR
82 rm -f $DESTDIR/lib/libbfd.la 78 rm -f $DESTDIR/lib/libbfd.la
83 rm -f $DESTDIR/lib/libopcodes.la 79 rm -f $DESTDIR/lib/libopcodes.la
80
81 # --program-prefix-binutils is not enough, remove conflicts with llvm.
82 rm -f $DESTDIR/bin/ar
83 rm -f $DESTDIR/bin/as
84 rm -f $DESTDIR/bin/objcopy
85 rm -f $DESTDIR/bin/objdump
86 rm -f $DESTDIR/bin/nm
87 rm -f $DESTDIR/bin/ranlib
88 rm -f $DESTDIR/bin/readelf
89 rm -f $DESTDIR/bin/strip
84 90
85 cd .. 91 cd ..
86 rm -rf $PKGNAME-$PKGVERSION 92 rm -rf $PKGNAME-$PKGVERSION
87 } 93 }