blob: e3053f8e29031b2448a10c67a540c8a13720333f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/env bash
set -e
mkdir -p /toolchain/gcc/.target-build && cd /toolchain/gcc/.target-build
CFLAGS=${CFLAGS/-Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
PATH=/opt/bootstrap/bin:/opt/toolchain/bin:$PATH
../gcc-$GCC_VERSION/configure \
--disable-hosted-libstdcxx \
--disable-nls \
--disable-tm-clone-registry \
--disable-wchar_t \
--enable-cxx-flags=-fno-exceptions \
--enable-default-pie \
--enable-initfini-array \
--enable-languages=c++ \
--enable-plugin \
--prefix=/opt/toolchain \
--target=$TARGET \
--with-mcmodel=kernel \
--with-newlib
make -j$(nproc) all-gcc
make install-strip-gcc
for COMPONENT in target-libgcc target-libstdc++-v3; do
make -j$(nproc) all-$COMPONENT
make install-$COMPONENT
done
|