Update to rscons 2.3.0
Move cross compiler to i686-elf-gcc directory. Automatically build cross compiler using rscons subsidiary script.
This commit is contained in:
1 parent
6b1de7c9d4
commit
c6ae200a54
9 files changed
+31
-22
No files matched your search
@@ -0,0 +1,17 @@
|
||||
configure do
|
||||
check_c_compiler "gcc"
|
||||
check_program "make"
|
||||
check_program "bison"
|
||||
check_program "flex"
|
||||
check_program "texi2any", on_fail: "Install the texinfo package"
|
||||
check_program "wget"
|
||||
check_lib "gmp", on_fail: "Install the libgmp-dev package"
|
||||
check_lib "mpc", on_fail: "Install the libmpc-dev package"
|
||||
check_lib "mpfr", on_fail: "Install the libmpfr-dev package"
|
||||
end
|
||||
|
||||
build do
|
||||
unless File.exist?("i686-elf-gcc")
|
||||
system("./build.sh")
|
||||
end
|
||||
end
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
BINUTILS_VERSION="2.35"
|
||||
BINUTILS_CHECKSUM="1b11659fb49e20e18db460d44485f09442c8c56d5df165de9461eb09c8302f85"
|
||||
GCC_VERSION="10.2.0"
|
||||
GCC_CHECKSUM="b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c"
|
||||
|
||||
if [ ! -e binutils-${BINUTILS_VERSION}.tar.xz ]; then
|
||||
wget -O binutils-${BINUTILS_VERSION}.tar.xz https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.xz
|
||||
fi
|
||||
|
||||
if [[ ! `sha256sum binutils-${BINUTILS_VERSION}.tar.xz` =~ $BINUTILS_CHECKSUM ]]; then
|
||||
echo "Invalid binutils-${BINUTILS_VERSION}.tar.xz checksum"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -d binutils-${BINUTILS_VERSION} ]; then
|
||||
tar xJf binutils-${BINUTILS_VERSION}.tar.xz
|
||||
fi
|
||||
|
||||
if [ ! -e gcc-${GCC_VERSION}.tar.xz ]; then
|
||||
wget -O gcc-${GCC_VERSION}.tar.xz https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz
|
||||
fi
|
||||
|
||||
if [[ ! `sha256sum gcc-${GCC_VERSION}.tar.xz` =~ $GCC_CHECKSUM ]]; then
|
||||
echo "Invalid gcc-${GCC_VERSION}.tar.xz checksum"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -d gcc-${GCC_VERSION} ]; then
|
||||
tar xJf gcc-${GCC_VERSION}.tar.xz
|
||||
fi
|
||||
|
||||
export PREFIX="$PWD/i686-elf-gcc"
|
||||
export TARGET="i686-elf"
|
||||
export PATH="$PREFIX/bin:$PATH"
|
||||
|
||||
function build_binutils()
|
||||
{
|
||||
rm -rf build-binutils
|
||||
mkdir -p build-binutils
|
||||
(
|
||||
cd build-binutils
|
||||
../binutils-${BINUTILS_VERSION}/configure --target="$TARGET" --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror && \
|
||||
make && \
|
||||
make install
|
||||
)
|
||||
}
|
||||
|
||||
function build_gcc()
|
||||
{
|
||||
rm -rf build-gcc
|
||||
mkdir -p build-gcc
|
||||
(
|
||||
cd build-gcc
|
||||
../gcc-${GCC_VERSION}/configure --target="$TARGET" --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers && \
|
||||
make all-gcc && \
|
||||
make all-target-libgcc && \
|
||||
make install-gcc && \
|
||||
make install-target-libgcc
|
||||
)
|
||||
}
|
||||
|
||||
build_binutils && build_gcc
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
rm -rf build build-* binutils* gcc-*
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec ../rscons configure
|
||||
Reference in new issue
Block a user