summaryrefslogtreecommitdiff
path: root/scripts/build/libc_libfloat.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/libc_libfloat.sh')
-rw-r--r--scripts/build/libc_libfloat.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/build/libc_libfloat.sh b/scripts/build/libc_libfloat.sh
index 3828a3f..d40070f 100644
--- a/scripts/build/libc_libfloat.sh
+++ b/scripts/build/libc_libfloat.sh
@@ -2,6 +2,34 @@
# Copyright 2007 Yann E. MORIN
# Licensed under the GPL v2. See COPYING in the root of this package
+# Define libfloat functions depending on wether it is selected or not
+if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then
+
+# Download libfloat
+do_libfloat_get() {
+ # Please note: because the file we download, and the file we store on the
+ # file system don't have the same name, CT_GetFile will always try to
+ # download the file over and over.
+ # To avoid this, we check that the file we want already exists in the
+ # tarball directory first. This is an ugly hack that overrides the standard
+ # CT_GetFile behavior... Sight...
+ lib_float_url="ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/"
+ ext=`CT_GetFileExtension "${CT_LIBFLOAT_FILE}"`
+ if [ -z "${ext}" ]; then
+ CT_GetFile libfloat_990616.orig "${lib_float_url}"
+ ext=`CT_GetFileExtension "libfloat_990616.orig"`
+ # Hack: remove the .orig extension, and change _ to -
+ mv -v "${CT_TARBALLS_DIR}/libfloat_990616.orig${ext}" \
+ "${CT_TARBALLS_DIR}/libfloat-990616${ext}" 2>&1 |CT_DoLog DEBUG
+ fi
+}
+
+# Extract libfloat
+do_libfloat_extract() {
+ [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
+}
+
+# Build libfloat
do_libfloat() {
# Here we build and install libfloat for the target, so that the C library
# builds OK with those versions of gcc that have severed softfloat support
@@ -29,3 +57,17 @@ do_libfloat() {
CT_EndStep
}
+
+else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y"
+
+do_libfloat_get() {
+ true
+}
+do_libfloat_extract() {
+ true
+}
+do_libfloat() {
+ true
+}
+
+fi