mirror of
https://frontier.innolan.net/github/amigaos-cross-toolchain6.git
synced 2024-10-19 10:29:55 +00:00
Build different compiler version with same script.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,7 +1,10 @@
|
|||||||
*.lha
|
*.lha
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
*.tar.bz2
|
||||||
|
adtools/
|
||||||
sources/
|
sources/
|
||||||
stamps/
|
stamps/
|
||||||
build/
|
build/
|
||||||
target/
|
target/
|
||||||
host/
|
host/
|
||||||
|
tmp/
|
||||||
|
|||||||
@ -27,3 +27,9 @@ download \
|
|||||||
download \
|
download \
|
||||||
"http://sourceforge.net/projects/amiga/files/ixemul.library/48.2/ixemul-src.lha/download" \
|
"http://sourceforge.net/projects/amiga/files/ixemul.library/48.2/ixemul-src.lha/download" \
|
||||||
"ixemul-48.2.lha"
|
"ixemul-48.2.lha"
|
||||||
|
|
||||||
|
download "ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-4.3.2.tar.bz2"
|
||||||
|
download "ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz"
|
||||||
|
download "ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2"
|
||||||
|
download "ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.10.tar.bz2"
|
||||||
|
download "ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.17.0.tar.gz"
|
||||||
|
|||||||
@ -7,6 +7,23 @@ readonly GCC_CPP_SRC="gcc-g++-${GCC_VER}.tar.gz"
|
|||||||
readonly GCC_CORE_PATCH="gcc-core-${GCC_VER}-amiga.diff.gz"
|
readonly GCC_CORE_PATCH="gcc-core-${GCC_VER}-amiga.diff.gz"
|
||||||
readonly GCC_CPP_PATCH="gcc-g++-${GCC_VER}-amiga.diff.gz"
|
readonly GCC_CPP_PATCH="gcc-g++-${GCC_VER}-amiga.diff.gz"
|
||||||
|
|
||||||
|
# BEGIN GCC dependencies
|
||||||
|
readonly GMP="gmp-4.3.2"
|
||||||
|
readonly GMP_SRC="${GMP}.tar.bz2"
|
||||||
|
|
||||||
|
readonly MPC="mpc-0.8.1"
|
||||||
|
readonly MPC_SRC="${MPC}.tar.gz"
|
||||||
|
|
||||||
|
readonly MPFR="mpfr-2.4.2"
|
||||||
|
readonly MPFR_SRC="${MPFR}.tar.bz2"
|
||||||
|
|
||||||
|
readonly ISL="isl-0.10"
|
||||||
|
readonly ISL_SRC="${ISL}.tar.bz2"
|
||||||
|
|
||||||
|
readonly CLOOG="cloog-0.17.0"
|
||||||
|
readonly CLOOG_SRC="${CLOOG}.tar.gz"
|
||||||
|
# END GCC dependencies
|
||||||
|
|
||||||
readonly BINUTILS="binutils-2.9.1"
|
readonly BINUTILS="binutils-2.9.1"
|
||||||
readonly BINUTILS_SRC="${BINUTILS}.tar.gz"
|
readonly BINUTILS_SRC="${BINUTILS}.tar.gz"
|
||||||
|
|
||||||
@ -16,6 +33,7 @@ readonly IXEMUL_SRC="${IXEMUL}.lha"
|
|||||||
readonly LIBNIX="libnix-2.1"
|
readonly LIBNIX="libnix-2.1"
|
||||||
readonly LIBNIX_SRC="${LIBNIX}.tar.gz"
|
readonly LIBNIX_SRC="${LIBNIX}.tar.gz"
|
||||||
|
|
||||||
|
# Needed by GCC 2.95.3
|
||||||
readonly BISON="bison-1.35"
|
readonly BISON="bison-1.35"
|
||||||
readonly BISON_SRC="${BISON}.tar.gz"
|
readonly BISON_SRC="${BISON}.tar.gz"
|
||||||
|
|
||||||
|
|||||||
102
bootstrap.sh
102
bootstrap.sh
@ -31,6 +31,28 @@ function copy_non_diff {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mkdir_empty {
|
||||||
|
rm -rf "$1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
function compare_version {
|
||||||
|
python - "$1" "$2" "$3" <<EOF
|
||||||
|
from distutils.version import StrictVersion
|
||||||
|
import sys
|
||||||
|
|
||||||
|
cmp = lambda x, y: StrictVersion(x).__cmp__(y)
|
||||||
|
|
||||||
|
op = {"lt": [-1], "gt": [1],
|
||||||
|
"le": [-1, 0], "ge": [1, 0],
|
||||||
|
"eq": [0], "ne": [-1, 1]}
|
||||||
|
|
||||||
|
res = cmp(sys.argv[1], sys.argv[3]) in op[sys.argv[2]]
|
||||||
|
|
||||||
|
sys.exit(int(not res))
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
function unpack_sources {
|
function unpack_sources {
|
||||||
[ -f "${STAMP}/unpack-sources" ] && return 0
|
[ -f "${STAMP}/unpack-sources" ] && return 0
|
||||||
|
|
||||||
@ -56,6 +78,23 @@ function unpack_sources {
|
|||||||
copy_non_diff "${GCC}"
|
copy_non_diff "${GCC}"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
if compare_version "${GCC_VER}" "ge" "4.0.0"; then
|
||||||
|
rm -rf "${GMP}"
|
||||||
|
tar -xjf "${ARCHIVES}/${GMP_SRC}"
|
||||||
|
|
||||||
|
rm -rf "${MPC}"
|
||||||
|
tar -xzf "${ARCHIVES}/${MPC_SRC}"
|
||||||
|
|
||||||
|
rm -rf "${MPFR}"
|
||||||
|
tar -xjf "${ARCHIVES}/${MPFR_SRC}"
|
||||||
|
|
||||||
|
rm -rf "${ISL}"
|
||||||
|
tar -xjf "${ARCHIVES}/${ISL_SRC}"
|
||||||
|
|
||||||
|
rm -rf "${CLOOG}"
|
||||||
|
tar -xzf "${ARCHIVES}/${CLOOG_SRC}"
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "${SFDC}"
|
rm -rf "${SFDC}"
|
||||||
lha -xgq "${ARCHIVES}/${SFDC_SRC}"
|
lha -xgq "${ARCHIVES}/${SFDC_SRC}"
|
||||||
tar -xzf "${SFDC}.tar.gz"
|
tar -xzf "${SFDC}.tar.gz"
|
||||||
@ -96,17 +135,62 @@ function unpack_sources {
|
|||||||
function build_tools {
|
function build_tools {
|
||||||
[ -f "${STAMP}/build-tools" ] && return 0
|
[ -f "${STAMP}/build-tools" ] && return 0
|
||||||
|
|
||||||
rm -rf "${HOST_DIR}"
|
mkdir_empty "${HOST_DIR}"
|
||||||
mkdir -p "${HOST_DIR}"
|
|
||||||
|
|
||||||
pushd "${BUILD_DIR}"
|
pushd "${BUILD_DIR}"
|
||||||
rm -rf "${BISON}"
|
|
||||||
mkdir -p "${BISON}"
|
if compare_version "${GCC_VER}" "eq" "2.95.3"; then
|
||||||
cd "${BISON}"
|
mkdir_empty "${BISON}"
|
||||||
"${SOURCES}/${BISON}/configure" \
|
pushd "${BISON}"
|
||||||
--prefix="${HOST_DIR}"
|
"${SOURCES}/${BISON}/configure" \
|
||||||
make
|
--prefix="${HOST_DIR}"
|
||||||
make install
|
make && make install
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
|
if compare_version "${GCC_VER}" "ge" "4.0.0"; then
|
||||||
|
mkdir_empty "${GMP}"
|
||||||
|
pushd "${GMP}"
|
||||||
|
"${SOURCES}/${GMP}/configure" \
|
||||||
|
--prefix="${HOST_DIR}"
|
||||||
|
make && make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir_empty "${MPFR}"
|
||||||
|
pushd "${MPFR}"
|
||||||
|
"${SOURCES}/${MPFR}/configure" \
|
||||||
|
--prefix="${HOST_DIR}" \
|
||||||
|
--with-gmp="${HOST_DIR}"
|
||||||
|
make && make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir_empty "${MPC}"
|
||||||
|
pushd "${MPC}"
|
||||||
|
"${SOURCES}/${MPC}/configure" \
|
||||||
|
--prefix="${HOST_DIR}" \
|
||||||
|
--with-gmp="${HOST_DIR}" \
|
||||||
|
--with-mpfr="${HOST_DIR}"
|
||||||
|
make && make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir_empty "${ISL}"
|
||||||
|
pushd "${ISL}"
|
||||||
|
"${SOURCES}/${ISL}/configure" \
|
||||||
|
--prefix="${HOST_DIR}"
|
||||||
|
make && make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir_empty "${CLOOG}"
|
||||||
|
pushd "${CLOOG}"
|
||||||
|
"${SOURCES}/${CLOOG}/configure" \
|
||||||
|
--prefix="${HOST_DIR}" \
|
||||||
|
--with-isl=system \
|
||||||
|
--with-gmp-prefix="${HOST_DIR}" \
|
||||||
|
--with-isl-prefix="${HOST_DIR}"
|
||||||
|
make && make install
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/build-tools"
|
touch "${STAMP}/build-tools"
|
||||||
|
|||||||
Reference in New Issue
Block a user