mirror of
https://github.com/cahirwpz/amigaos-cross-toolchain
synced 2026-09-11 19:59:18 +00:00
Support more than one toolchain.
This commit is contained in:
+21
-3
@@ -1,7 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
readonly GCC="gcc-3.4.6"
|
||||
readonly GCC_VER="3.4.6"
|
||||
case "${VERSION}" in
|
||||
2)
|
||||
readonly GCC_VER="2.95.3"
|
||||
readonly BINUTILS_VER="2.9.1"
|
||||
;;
|
||||
3)
|
||||
readonly GCC_VER="3.4.6"
|
||||
readonly BINUTILS_VER="2.14"
|
||||
;;
|
||||
4)
|
||||
readonly GCC_VER="4.5.0"
|
||||
readonly BINUTILS_VER="2.14"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported toolchain version: ${VERSION}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
readonly GCC="gcc-${GCC_VER}"
|
||||
readonly GCC_CORE_SRC="gcc-core-${GCC_VER}.tar.gz"
|
||||
readonly GCC_CPP_SRC="gcc-g++-${GCC_VER}.tar.gz"
|
||||
|
||||
@@ -16,7 +34,7 @@ readonly MPFR="mpfr-3.1.2"
|
||||
readonly MPFR_SRC="${MPFR}.tar.bz2"
|
||||
# END GCC 4.x dependencies
|
||||
|
||||
readonly BINUTILS="binutils-2.14"
|
||||
readonly BINUTILS="binutils-${BINUTILS_VER}"
|
||||
readonly BINUTILS_SRC="${BINUTILS}.tar.gz"
|
||||
|
||||
readonly IXEMUL="ixemul-48.2"
|
||||
|
||||
+6
-2
@@ -9,8 +9,6 @@ readonly HOST_DIR="${TOP_DIR}/host"
|
||||
readonly STAMP="${TOP_DIR}/stamps"
|
||||
readonly MAKE="make -j$(getconf NPROCESSORS_CONF)"
|
||||
|
||||
source "${TOP_DIR}/bootstrap.conf"
|
||||
|
||||
function prepare_target {
|
||||
mkdir -p "${STAMP}" "${BUILD_DIR}" "${PREFIX}"
|
||||
|
||||
@@ -490,6 +488,8 @@ function build_ixemul {
|
||||
}
|
||||
|
||||
function build {
|
||||
source "${TOP_DIR}/bootstrap.conf"
|
||||
|
||||
# On 64-bit architecture GNU Assembler crashes writing out an object, due to
|
||||
# (probably) miscalculated structure sizes. There could be some other bugs
|
||||
# lurking there in 64-bit mode, but I have little incentive chasing them.
|
||||
@@ -538,6 +538,7 @@ function build {
|
||||
|
||||
function main {
|
||||
PREFIX="${TOP_DIR}/target"
|
||||
VERSION="2"
|
||||
|
||||
local action="build"
|
||||
|
||||
@@ -549,6 +550,9 @@ function main {
|
||||
--clean)
|
||||
action="clean"
|
||||
;;
|
||||
--version=*)
|
||||
VERSION=${1#*=}
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user