diff options
author | Marvin Borner | 2019-09-22 01:48:01 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-22 01:48:01 +0200 |
commit | 5bc3e8c3553b749d848169de7177b238f4396f9b (patch) | |
tree | 4f57ad76a2e75191f928c3004780ba705124de4b /cross.sh | |
parent | d9324456b4dd4b3a520534fa7a2996358d3484f0 (diff) |
Moved shell files into Makefile
Diffstat (limited to 'cross.sh')
-rwxr-xr-x | cross.sh | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/cross.sh b/cross.sh deleted file mode 100755 index eb6f21d..0000000 --- a/cross.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env sh -# Sets up a cross compiler -# TODO: Rewrite everything for 64-Bit - -if [ ! -d "./cross/" ]; then - # Create directory - mkdir -p cross - cd cross || exit - DIR=$(pwd) - - # Get sources - mkdir "${DIR}/src" && cd "${DIR}/src" || exit - echo "Downloading..." - curl -sSL "https://ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz" | tar xJ - curl -sSL "https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz" | tar xJ - - # Prepare compiling - mkdir -p "${DIR}/opt/bin" - export PREFIX="${DIR}/opt" - export TARGET=i686-elf - export PATH="$PREFIX/bin:$PATH" - - # Compile binutilsq - mkdir "${DIR}/src/build-binutils" && cd "${DIR}/src/build-binutils" || exit - ../binutils-2.32/configure --target="$TARGET" --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror - make - make install - - # Compile GCC - mkdir "${DIR}/src/build-gcc" && cd "${DIR}/src/build-gcc" || exit - ../gcc-9.2.0/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 - - # Source exported variables - cd "${DIR}/.." || exit - . cross.sh -else - # Should be sourced to take effect - cd cross || exit - DIR=$(pwd) - export PREFIX="${DIR}/opt" - export TARGET=i686-elf - export PATH="$PREFIX/bin:$PATH" - cd .. -fi |