mirror of
https://frontier.innolan.net/github/amigaos-cross-toolchain6.git
synced 2024-10-19 10:29:55 +00:00
Add libm for non-FPU Amigas.
This commit is contained in:
@@ -8,6 +8,7 @@ targeting m68k-amigaos with:
|
|||||||
* g++ 2.95.3 + libstdc++
|
* g++ 2.95.3 + libstdc++
|
||||||
* binutils 2.9.1 (assembler, linker, etc.)
|
* binutils 2.9.1 (assembler, linker, etc.)
|
||||||
* libnix 2.1 (standard ANSI/C library replacement for AmigaOS)
|
* libnix 2.1 (standard ANSI/C library replacement for AmigaOS)
|
||||||
|
* libm 5.4 (provides math library implementation for non-FPU Amigas)
|
||||||
* AmigaOS headers & libraries (for AmigaOS 3.9)
|
* AmigaOS headers & libraries (for AmigaOS 3.9)
|
||||||
* ixemul.library 48.2
|
* ixemul.library 48.2
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ Prerequisites (look at bootstrap.conf file):
|
|||||||
- gawk 1.3.8
|
- gawk 1.3.8
|
||||||
* Amiga specific sources & binaries:
|
* Amiga specific sources & binaries:
|
||||||
- libnix 2.1
|
- libnix 2.1
|
||||||
|
- libm 5.4
|
||||||
- AmigaOS NDK 3.9
|
- AmigaOS NDK 3.9
|
||||||
- sfdc 1.4
|
- sfdc 1.4
|
||||||
- libamiga-bin
|
- libamiga-bin
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ download \
|
|||||||
download \
|
download \
|
||||||
"http://ftp.back2roots.org/geekgadgets/amiga/m68k/snapshots/990529/bin/libamiga-bin.tgz" \
|
"http://ftp.back2roots.org/geekgadgets/amiga/m68k/snapshots/990529/bin/libamiga-bin.tgz" \
|
||||||
"libamiga-bin.tar.gz"
|
"libamiga-bin.tar.gz"
|
||||||
|
download \
|
||||||
|
"http://ftp.back2roots.org/geekgadgets/amiga/m68k/snapshots/990529/src/libm-5.4-src.tgz" \
|
||||||
|
"libm-5.4.tar.gz"
|
||||||
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"
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ readonly BINUTILS_SRC="${BINUTILS}.tar.gz"
|
|||||||
readonly IXEMUL="ixemul-48.2"
|
readonly IXEMUL="ixemul-48.2"
|
||||||
readonly IXEMUL_SRC="${IXEMUL}.lha"
|
readonly IXEMUL_SRC="${IXEMUL}.lha"
|
||||||
|
|
||||||
|
readonly LIBM="libm-5.4"
|
||||||
|
readonly LIBM_SRC="${LIBM}.tar.gz"
|
||||||
|
|
||||||
readonly LIBNIX="libnix-2.1"
|
readonly LIBNIX="libnix-2.1"
|
||||||
readonly LIBNIX_SRC="${LIBNIX}.tar.gz"
|
readonly LIBNIX_SRC="${LIBNIX}.tar.gz"
|
||||||
|
|
||||||
|
|||||||
+42
-21
@@ -133,6 +133,10 @@ function unpack_sources {
|
|||||||
mv "libnix" "${LIBNIX}"
|
mv "libnix" "${LIBNIX}"
|
||||||
chmod a+x "${LIBNIX}/mkinstalldirs"
|
chmod a+x "${LIBNIX}/mkinstalldirs"
|
||||||
|
|
||||||
|
unpack_clean "${LIBM}" "${LIBM_SRC}"
|
||||||
|
mv "contrib/libm" "${LIBM}"
|
||||||
|
rmdir "contrib"
|
||||||
|
|
||||||
mkdir_empty "${LIBAMIGA}"
|
mkdir_empty "${LIBAMIGA}"
|
||||||
pushd "${LIBAMIGA}"
|
pushd "${LIBAMIGA}"
|
||||||
tar -xzf "${ARCHIVES}/${LIBAMIGA_SRC}"
|
tar -xzf "${ARCHIVES}/${LIBAMIGA_SRC}"
|
||||||
@@ -214,15 +218,14 @@ function build_tools {
|
|||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/build-tools"
|
touch "${STAMP}/build-tools"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_binutils {
|
function build_binutils {
|
||||||
[ -f "${STAMP}/build-binutils" ] && return 0
|
[ -f "${STAMP}/build-binutils" ] && return 0
|
||||||
|
|
||||||
pushd "${BUILD_DIR}"
|
pushd "${BUILD_DIR}"
|
||||||
rm -rf "${BINUTILS}"
|
mkdir_empty "${BINUTILS}"
|
||||||
mkdir -p "${BINUTILS}"
|
|
||||||
cd "${BINUTILS}"
|
cd "${BINUTILS}"
|
||||||
"${SOURCES}/${BINUTILS}/configure" \
|
"${SOURCES}/${BINUTILS}/configure" \
|
||||||
--prefix="${PREFIX}" \
|
--prefix="${PREFIX}" \
|
||||||
@@ -232,15 +235,14 @@ function build_binutils {
|
|||||||
make install install-info
|
make install install-info
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/build-binutils"
|
touch "${STAMP}/build-binutils"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_gcc {
|
function build_gcc {
|
||||||
[ -f "${STAMP}/build-gcc" ] && return 0
|
[ -f "${STAMP}/build-gcc" ] && return 0
|
||||||
|
|
||||||
pushd "${BUILD_DIR}"
|
pushd "${BUILD_DIR}"
|
||||||
rm -rf "${GCC}"
|
mkdir_empty "${GCC}"
|
||||||
mkdir -p "${GCC}"
|
|
||||||
cd "${GCC}"
|
cd "${GCC}"
|
||||||
"${SOURCES}/${GCC}/configure" \
|
"${SOURCES}/${GCC}/configure" \
|
||||||
--prefix="${PREFIX}" \
|
--prefix="${PREFIX}" \
|
||||||
@@ -252,16 +254,17 @@ function build_gcc {
|
|||||||
make install ${FLAGS_FOR_TARGET[*]}
|
make install ${FLAGS_FOR_TARGET[*]}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/build-gcc"
|
touch "${STAMP}/build-gcc"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_gpp {
|
function build_gpp {
|
||||||
[ -f "${STAMP}/build-gpp" ] && return 0
|
[ -f "${STAMP}/build-gpp" ] && return 0
|
||||||
|
|
||||||
|
local GPP="${GCC/gcc/g++}"
|
||||||
|
|
||||||
pushd "${BUILD_DIR}"
|
pushd "${BUILD_DIR}"
|
||||||
rm -rf "${GCC}"
|
mkdir_empty "${GPP}"
|
||||||
mkdir -p "${GCC}"
|
cd "${GPP}"
|
||||||
cd "${GCC}"
|
|
||||||
"${SOURCES}/${GCC}/configure" \
|
"${SOURCES}/${GCC}/configure" \
|
||||||
--prefix="${PREFIX}" \
|
--prefix="${PREFIX}" \
|
||||||
--host="i686-linux-gnu" \
|
--host="i686-linux-gnu" \
|
||||||
@@ -272,7 +275,7 @@ function build_gpp {
|
|||||||
make install ${FLAGS_FOR_TARGET[*]}
|
make install ${FLAGS_FOR_TARGET[*]}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/build-gpp"
|
touch "${STAMP}/build-gpp"
|
||||||
}
|
}
|
||||||
|
|
||||||
function process_headers {
|
function process_headers {
|
||||||
@@ -284,8 +287,7 @@ function process_headers {
|
|||||||
cd "${SFDC}"
|
cd "${SFDC}"
|
||||||
./configure \
|
./configure \
|
||||||
--prefix="${PREFIX}"
|
--prefix="${PREFIX}"
|
||||||
make
|
make && make install
|
||||||
make install
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd "${PREFIX}/include"
|
pushd "${PREFIX}/include"
|
||||||
@@ -300,7 +302,7 @@ function process_headers {
|
|||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/process-headers"
|
touch "${STAMP}/process-headers"
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_libamiga {
|
function install_libamiga {
|
||||||
@@ -310,15 +312,14 @@ function install_libamiga {
|
|||||||
cp -av "${SOURCES}/${LIBAMIGA}/lib" .
|
cp -av "${SOURCES}/${LIBAMIGA}/lib" .
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/install-libamiga"
|
touch "${STAMP}/install-libamiga"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_libnix {
|
function build_libnix {
|
||||||
[ -f "${STAMP}/build-libnix" ] && return 0
|
[ -f "${STAMP}/build-libnix" ] && return 0
|
||||||
|
|
||||||
pushd "${BUILD_DIR}"
|
pushd "${BUILD_DIR}"
|
||||||
rm -rf "${LIBNIX}"
|
mkdir_empty "${LIBNIX}"
|
||||||
mkdir -p "${LIBNIX}"
|
|
||||||
cd "${LIBNIX}"
|
cd "${LIBNIX}"
|
||||||
"${SOURCES}/${LIBNIX}/configure" \
|
"${SOURCES}/${LIBNIX}/configure" \
|
||||||
--prefix="${PREFIX}" \
|
--prefix="${PREFIX}" \
|
||||||
@@ -336,15 +337,34 @@ function build_libnix {
|
|||||||
make install MAKEINFO=:
|
make install MAKEINFO=:
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/build-libnix"
|
touch "${STAMP}/build-libnix"
|
||||||
|
}
|
||||||
|
|
||||||
|
function build_libm {
|
||||||
|
[ -f "${STAMP}/build-libm" ] && return 0
|
||||||
|
|
||||||
|
pushd "${BUILD_DIR}"
|
||||||
|
mkdir_empty "${LIBM}"
|
||||||
|
cd "${LIBM}"
|
||||||
|
CC=m68k-amigaos-gcc \
|
||||||
|
AR=m68k-amigaos-ar \
|
||||||
|
CFLAGS="-noixemul" \
|
||||||
|
RANLIB=m68k-amigaos-ranlib \
|
||||||
|
"${SOURCES}/${LIBM}/configure" \
|
||||||
|
--prefix="${PREFIX}" \
|
||||||
|
--host="i686-linux-gnu" \
|
||||||
|
--build="m68k-amigaos"
|
||||||
|
make && make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
touch "${STAMP}/build-libm"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_ixemul {
|
function build_ixemul {
|
||||||
[ -f "${STAMP}/build-ixemul" ] && return 0
|
[ -f "${STAMP}/build-ixemul" ] && return 0
|
||||||
|
|
||||||
pushd "${BUILD_DIR}"
|
pushd "${BUILD_DIR}"
|
||||||
rm -rf "${IXEMUL}"
|
mkdir_empty "${IXEMUL}"
|
||||||
mkdir -p "${IXEMUL}"
|
|
||||||
cd "${IXEMUL}"
|
cd "${IXEMUL}"
|
||||||
CC=m68k-amigaos-gcc \
|
CC=m68k-amigaos-gcc \
|
||||||
CFLAGS="-noixemul -I${PREFIX}/include" \
|
CFLAGS="-noixemul -I${PREFIX}/include" \
|
||||||
@@ -358,7 +378,7 @@ function build_ixemul {
|
|||||||
make MAKEINFO=: install
|
make MAKEINFO=: install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
touch "${STAMP}/build-ixemul"
|
touch "${STAMP}/build-ixemul"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build {
|
function build {
|
||||||
@@ -393,6 +413,7 @@ function build {
|
|||||||
process_headers
|
process_headers
|
||||||
install_libamiga
|
install_libamiga
|
||||||
build_libnix
|
build_libnix
|
||||||
|
build_libm
|
||||||
build_gpp
|
build_gpp
|
||||||
build_ixemul
|
build_ixemul
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user