DID NOT TEST YET
This commit is contained in:
parent
b13423b843
commit
fb9a47244e
3 changed files with 184 additions and 1 deletions
37
build-gcc.sh
Normal file
37
build-gcc.sh
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Step 1. Download GCC and binutils source code
|
||||
ADACASIO_BINUTILS_URL="https://ftp.gnu.org/gnu/binutils/binutils-2.46.0.tar.gz"
|
||||
ADACASIO_GCC_URL="https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz"
|
||||
ADACASIO_PREFIX="$(pwd)/sysroot"
|
||||
|
||||
# prepare configure and build enviornment
|
||||
wget -O binutils.tar.gz $ADACASIO_BINUTILS_URL
|
||||
wget -O gcc.tar.gz $ADACASIO_GCC_URL
|
||||
tar -xf binutils.tar.gz
|
||||
tar -xf gcc.tar.gz
|
||||
|
||||
# Step 2. configure GCC and binutils
|
||||
mkdir build-binutils build-gcc $ADACASIO_PREFIX
|
||||
cd build-binutils
|
||||
../binutils-*/configure \
|
||||
--prefix="$PREFIX" \
|
||||
--target="sh3eb-elf" \
|
||||
--with-multilib-list="m3,m4-nofpu" \
|
||||
--program-prefix="sh3eb-elf-" \
|
||||
--host="native" \
|
||||
--disable-nls \
|
||||
--disable-multilib \
|
||||
--disable-shared \
|
||||
--with-sysroot
|
||||
|
||||
make -j$(nproc)
|
||||
|
||||
cd ../build-gcc
|
||||
../gcc/configure \
|
||||
--enable-languages="ada,c" \
|
||||
--without-headers \
|
||||
--program-prefix="sh-elf-" \
|
||||
--enable-clocale="generic" \
|
||||
--enable-libstdcxx-allocator \
|
||||
--disable-threads \
|
||||
--disable-libstdcxx-verbose \
|
||||
--enable-cxx-flags="-fno-exceptions
|
||||
Loading…
Add table
Add a link
Reference in a new issue