blob: 680eb2205b40cfab9fb2f56f00824bcd5985b120 (
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
|
#!/bin/env bash
set -e
PATH=/opt/bootstrap/bin:/opt/toolchain/bin:$PATH
mkdir -p /toolchain/newlib/.build && cd /toolchain/newlib
tar xf /downloads/newlib-$NEWLIB_VERSION.tar.gz
cd .build
LDFLAGS=-mno-red-zone ../newlib-$NEWLIB_VERSION/configure \
--disable-newlib-fseek-optimization \
--disable-newlib-io-float \
--disable-newlib-supplied-syscalls \
--disable-nls \
--disable-werror \
--prefix=/opt/toolchain \
--target=$TARGET \
CFLAGS_FOR_TARGET="-mcmodel=kernel -fno-pie"
make -j$(($(nproc) * 2))
make install
|