# HG changeset patch # User David Demelier # Date 1564512600 -7200 # Node ID 936f40a89c99a3d72c04f84cf963becdb27dde51 # Parent b0fd9c97761e576af28d4c6cb95d824c17bb08e2 dev/binutils: build with clang and add prefix diff -r b0fd9c97761e -r 936f40a89c99 dev/binutils/binutils.sh --- a/dev/binutils/binutils.sh Tue Jul 30 20:40:00 2019 +0200 +++ b/dev/binutils/binutils.sh Tue Jul 30 20:50:00 2019 +0200 @@ -26,9 +26,9 @@ : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} -: ${CC:=gcc} +: ${CC:=clang} : ${CFLAGS:=-O2} -: ${CXX:=g++} +: ${CXX:=clang++} : ${CXXFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=} @@ -64,24 +64,30 @@ --build=$CBUILD \ --host=$CHOST \ --target=$CTARGET \ + --sbindir=/bin \ --prefix= \ + --disable-static \ --disable-werror \ - --enable-gold \ - --enable-ld=default \ - --enable-lto \ - --enable-plugins \ - --enable-relro \ --enable-shared \ - --enable-threads \ - --with-pic \ + --program-prefix=binutils- \ --with-system-zlib \ $with_nls \ $with_gdb - make tooldir=/ - make tooldir=/ install DESTDIR=$DESTDIR + make + make install DESTDIR=$DESTDIR rm -f $DESTDIR/lib/libbfd.la rm -f $DESTDIR/lib/libopcodes.la + # --program-prefix-binutils is not enough, remove conflicts with llvm. + rm -f $DESTDIR/bin/ar + rm -f $DESTDIR/bin/as + rm -f $DESTDIR/bin/objcopy + rm -f $DESTDIR/bin/objdump + rm -f $DESTDIR/bin/nm + rm -f $DESTDIR/bin/ranlib + rm -f $DESTDIR/bin/readelf + rm -f $DESTDIR/bin/strip + cd .. rm -rf $PKGNAME-$PKGVERSION }