# You probably want to customize those
##############################################################################
TARGET=arm-none-eabi # Or: TARGET=arm-elf
-PREFIX=${HOME}/arm-none-eabi # Install location of your final toolchain
+PREFIX=${HOME}/sat # Install location of your final toolchain
PARALLEL= # Or: PARALLEL="-j 5" for 4 CPUs
DARWIN_OPT_PATH=/opt/local # Path in which MacPorts or Fink is installed
# Set to 'sudo' if you need superuser privileges while installing
SOURCES=${SUMMON_DIR}/sources
STAMPS=${SUMMON_DIR}/stamps
+
+##############################################################################
+# Tool section
+##############################################################################
+TAR=tar
+
+##############################################################################
+# OS and Tooldetection section
+# Detects which tools and flags to use
+##############################################################################
+
+case "$(uname)" in
+ Linux)
+ echo "Found Linux OS."
+ ;;
+ Darwin)
+ echo "Found Darwin OS."
+ GCCFLAGS="${GCCFLAGS} \
+ --with-gmp=${DARWIN_OPT_PATH} \
+ --with-mpfr=${DARWIN_OPT_PATH} \
+ --with-mpc=${DARWIN_OPT_PATH} \
+ -with-libiconv-prefix=${DARWIN_OPT_PATH}"
+ ;;
+ *)
+ echo "Found unknown OS. Aborting!"
+ exit 1
+ ;;
+esac
+
##############################################################################
# Building section
# You probably don't have to touch anything after this
function unpack {
log Unpacking $*
# Use 'auto' mode decompression. Replace with a switch if tar doesn't support -a
- tar xaf${TARFLAGS} ${SOURCES}/$1.tar.*
+ ARCHIVE=$(ls ${SOURCES}/$1.tar.*)
+ case ${ARCHIVE} in
+ *.bz2)
+ echo "archive type bz2"
+ TYPE=j
+ ;;
+ *.gz)
+ echo "archive type gz"
+ TYPE=z
+ ;;
+ *)
+ echo "Unknown archive type of $1"
+ echo ${ARCHIVE}
+ exit 1
+ ;;
+ esac
+ ${TAR} xf${TYPE}${TARFLAGS} ${SOURCES}/$1.tar.*
}
# Install a build
${SUDO} make ${MAKEFLAGS} $2 $3 $4 $5 $6 $7 $8
}
-case "$(uname)" in
- Linux)
- echo "Found Linux OS."
- ;;
- Darwin)
- echo "Found Darwin OS."
- GCCFLAGS="${GCCFLAGS} \
- --with-gmp=${DARWIN_OPT_PATH} \
- --with-mpfr=${DARWIN_OPT_PATH} \
- --with-mpc=${DARWIN_OPT_PATH} \
- -with-libiconv-prefix=${DARWIN_OPT_PATH}"
- ;;
- *)
- echo "Found unknown OS. Aborting!"
- exit 1
- ;;
-esac
mkdir -p ${STAMPS} ${SOURCES}
--with-gnu-ld \
--disable-nls \
--disable-werror \
+ --with-system-zlib \
${GCCFLAGS}
log "Building ${GCC}-boot"
make ${MAKEFLAGS} all-gcc
--with-gnu-ld \
--disable-nls \
--disable-werror \
+ --with-system-zlib \
${GCCFLAGS}
log "Building ${GCC}"
make ${MAKEFLAGS}