build fixes for Debian Stretch

Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
This commit is contained in:
Wolfgang Wiedmeyer 2016-12-07 23:42:06 +01:00
parent 7fd13a02da
commit af0392fbb5
No known key found for this signature in database
GPG Key ID: 5816A24C10757FC4

View File

@ -41,7 +41,8 @@ cd $BASEDIR/toolchain/gcc/arm/arm-linux-androideabi/build/binutils
--enable-gold=default \ --enable-gold=default \
--enable-plugins --enable-plugins
make -j $(nproc) && make install make -j $(nproc)
make install
# build gcc for arm # build gcc for arm
cd .. && mkdir -p gcc && cd gcc cd .. && mkdir -p gcc && cd gcc
@ -81,7 +82,8 @@ cd .. && mkdir -p gcc && cd gcc
--enable-gold=default \ --enable-gold=default \
--program-transform-name='s&^&arm-linux-androideabi-&' --program-transform-name='s&^&arm-linux-androideabi-&'
make -j $(nproc) && make install make -j $(nproc)
make install
# build binutils for host # build binutils for host
@ -95,15 +97,19 @@ cd host/build/binutils
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \ --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \
--with-gold-ldflags='-static-libgcc -static-libstdc++' \ --with-gold-ldflags='-static-libgcc -static-libstdc++' \
--enable-gold=default \ --enable-gold=default \
--enable-plugins --enable-plugins \
--disable-ld
make -j $(nproc) && make install make -j $(nproc)
make install
# build gcc for host # build gcc for host
cd .. && mkdir -p gcc && cd gcc cd .. && mkdir -p gcc && cd gcc
./../../../../src/gcc/gcc-4.9/configure \ ./../../../../src/gcc/gcc-4.9/configure \
--prefix=$BASEDIR/toolchain/gcc/host/install \ --prefix=$BASEDIR/toolchain/gcc/host/install \
--target=x86_64-linux \ --target=x86_64-linux \
--host=x86_64-linux-gnu \
--build=x86_64-linux-gnu \
--enable-multiarch \ --enable-multiarch \
--with-arch-32=i686 \ --with-arch-32=i686 \
--with-abi=m64 \ --with-abi=m64 \
@ -111,8 +117,6 @@ cd .. && mkdir -p gcc && cd gcc
--with-multilib-list=m32,m64 \ --with-multilib-list=m32,m64 \
--disable-nls \ --disable-nls \
--enable-target-optspace \ --enable-target-optspace \
--host=x86_64-linux-gnu \
--build=x86_64-linux-gnu \
--disable-plugin \ --disable-plugin \
--disable-docs \ --disable-docs \
--disable-bootstrap \ --disable-bootstrap \
@ -123,12 +127,18 @@ cd .. && mkdir -p gcc && cd gcc
--enable-gold=default \ --enable-gold=default \
--enable-languages=c,c++ --enable-languages=c,c++
make -j $(nproc) && make install make -j $(nproc)
make install
# we need to link against the correct stdatomic.h # we need to link against the correct stdatomic.h
cd ../../install/lib/gcc/x86_64-linux/4.9.x/include cd ../../install/lib/gcc/x86_64-linux/4.9.x/include
rm stdatomic.h rm stdatomic.h
ln -s ../../../../../../../../../bionic/libc/include/stdatomic.h stdatomic.h ln -s ../../../../../../../../../bionic/libc/include/stdatomic.h stdatomic.h
# use gold ld from /usr because Google's binutils can't handle a recent libc
cd ../../../../../x86_64-linux/bin/
rm ld
ln -s /usr/bin/x86_64-linux-gnu-ld.gold ld
cd $BASEDIR cd $BASEDIR