Skip to content

Instantly share code, notes, and snippets.

@ThePerfectComputer
Last active September 29, 2024 07:17
Show Gist options
  • Save ThePerfectComputer/45fa1da83e317439cdae130200ec952b to your computer and use it in GitHub Desktop.
Save ThePerfectComputer/45fa1da83e317439cdae130200ec952b to your computer and use it in GitHub Desktop.
Configures extracted from sfpi-tt-gg Ubuntu Successfully built log
# 1
cd build-gdb-newlib && CC_FOR_TARGET=riscv32-unknown-elf-gcc /srcs/sfpi-tt-gcc/build/../riscv-gdb/configure \
--target=riscv32-unknown-elf \
\
--prefix= \
\
--disable-werror \
--with-expat=yes \
--enable-gdb \
--disable-gas \
--disable-binutils \
--disable-ld \
--disable-gold \
--disable-gprof
# 2
cd build-binutils-newlib && CC_FOR_TARGET=riscv32-unknown-elf-gcc /srcs/sfpi-tt-gcc/build/../riscv-binutils/configure \
--target=riscv32-unknown-elf \
\
--prefix= \
\
--disable-werror \
--with-expat=yes \
--disable-gdb \
--disable-sim \
--disable-libdecnumber \
--disable-readline
# 3
cd build-gcc-newlib-stage1 && /srcs/sfpi-tt-gcc/build/../riscv-gcc/configure \
--target=riscv32-unknown-elf \
\
--prefix= \
--disable-shared \
--disable-threads \
--disable-tls \
--enable-languages=c,c++ \
--with-system-zlib \
--with-newlib \
--with-sysroot=/riscv32-unknown-elf \
--disable-libmudflap \
--disable-libssp \
--disable-libquadmath \
--disable-libgomp \
--disable-nls \
--disable-tm-clone-registry \
--src=../../riscv-gcc \
\
--disable-multilib \
--with-abi=ilp32 \
--with-arch=rv32i \
--with-tune=rocket \
CFLAGS_FOR_TARGET="-Os -mcmodel=medlow" \
CXXFLAGS_FOR_TARGET="-Os -mcmodel=medlow"
# 4
cd build-newlib && /srcs/sfpi-tt-gcc/build/../riscv-newlib/configure \
--target=riscv32-unknown-elf \
\
--prefix= \
--enable-newlib-io-long-double \
--enable-newlib-io-long-long \
--enable-newlib-io-c99-formats \
--enable-newlib-register-fini \
CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -mcmodel=medlow" \
CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -mcmodel=medlow"
# 5
cd build-newlib-nano && /srcs/sfpi-tt-gcc/build/../riscv-newlib/configure \
--target=riscv32-unknown-elf \
\
--prefix=/srcs/sfpi-tt-gcc/build/install-newlib-nano \
--enable-newlib-reent-small \
--disable-newlib-fvwrite-in-streamio \
--disable-newlib-fseek-optimization \
--disable-newlib-wide-orient \
--enable-newlib-nano-malloc \
--disable-newlib-unbuf-stream-opt \
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
--disable-newlib-supplied-syscalls \
--disable-nls \
CFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections -mcmodel=medlow" \
CXXFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections -mcmodel=medlow"
# 6
cd build-gdb-newlib && CC_FOR_TARGET=riscv32-unknown-elf-gcc /srcs/sfpi-tt-gcc/build/../riscv-gdb/configure \
--target=riscv32-unknown-elf \
\
--prefix=/usr/local/cross/riscv32-unknown-elf \
\
--disable-werror \
--with-expat=yes \
--enable-gdb \
--disable-gas \
--disable-binutils \
--disable-ld \
--disable-gold \
--disable-gprof
# 7
cd build-binutils-newlib && CC_FOR_TARGET=riscv32-unknown-elf-gcc /srcs/sfpi-tt-gcc/build/../riscv-binutils/configure \
--target=riscv32-unknown-elf \
\
--prefix=/usr/local/cross/riscv32-unknown-elf \
\
--disable-werror \
--with-expat=yes \
--disable-gdb \
--disable-sim \
--disable-libdecnumber \
--disable-readline
# 8
cd build-gcc-newlib-stage1 && /srcs/sfpi-tt-gcc/build/../riscv-gcc/configure \
--target=riscv32-unknown-elf \
\
--prefix=/usr/local/cross/riscv32-unknown-elf \
--disable-shared \
--disable-threads \
--disable-tls \
--enable-languages=c,c++ \
--with-system-zlib \
--with-newlib \
--with-sysroot=/usr/local/cross/riscv32-unknown-elf/riscv32-unknown-elf \
--disable-libmudflap \
--disable-libssp \
--disable-libquadmath \
--disable-libgomp \
--disable-nls \
--disable-tm-clone-registry \
--src=../../riscv-gcc \
\
--disable-multilib \
--with-abi=ilp32 \
--with-arch=rv32i \
--with-tune=rocket \
CFLAGS_FOR_TARGET="-Os -mcmodel=medlow" \
CXXFLAGS_FOR_TARGET="-Os -mcmodel=medlow"
# 9
cd build-newlib && /srcs/sfpi-tt-gcc/build/../riscv-newlib/configure \
--target=riscv32-unknown-elf \
\
--prefix=/usr/local/cross/riscv32-unknown-elf \
--enable-newlib-io-long-double \
--enable-newlib-io-long-long \
--enable-newlib-io-c99-formats \
--enable-newlib-register-fini \
CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -mcmodel=medlow" \
CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -mcmodel=medlow"
# 10
cd build-newlib-nano && /srcs/sfpi-tt-gcc/build/../riscv-newlib/configure \
--target=riscv32-unknown-elf \
\
--prefix=/srcs/sfpi-tt-gcc/build/install-newlib-nano \
--enable-newlib-reent-small \
--disable-newlib-fvwrite-in-streamio \
--disable-newlib-fseek-optimization \
--disable-newlib-wide-orient \
--enable-newlib-nano-malloc \
--disable-newlib-unbuf-stream-opt \
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
--disable-newlib-supplied-syscalls \
--disable-nls \
CFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections -mcmodel=medlow" \
CXXFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections -mcmodel=medlow"
# 11
cd build-gcc-newlib-stage2 && /srcs/sfpi-tt-gcc/build/../riscv-gcc/configure \
--target=riscv32-unknown-elf \
\
--prefix=/usr/local/cross/riscv32-unknown-elf \
--disable-shared \
--disable-threads \
--enable-languages=c,c++ \
--with-system-zlib \
--enable-tls \
--with-newlib \
--with-sysroot=/usr/local/cross/riscv32-unknown-elf/riscv32-unknown-elf \
--with-native-system-header-dir=/include \
--disable-libmudflap \
--disable-libssp \
--disable-libquadmath \
--disable-libgomp \
--disable-nls \
--disable-tm-clone-registry \
--src=../../riscv-gcc \
\
--disable-multilib \
--with-abi=ilp32 \
--with-arch=rv32i \
--with-tune=rocket \
CFLAGS_FOR_TARGET="-Os -mcmodel=medlow" \
CXXFLAGS_FOR_TARGET="-Os -mcmodel=medlow"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment