diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-05-07 09:04:02 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-05-07 09:04:02 +0000 |
commit | 58b4c6d0a44d57b15d7857ecb27711a2224949e9 (patch) | |
tree | a44e1c3fbeac57ff5601b1cbd1400172b3c64bbe /scripts/build/libc_libfloat.sh | |
parent | 45e6df196be73e799e220810f9c48f8884d1049c (diff) | |
download | crosstool-ng-58b4c6d0a44d57b15d7857ecb27711a2224949e9.tar.gz crosstool-ng-58b4c6d0a44d57b15d7857ecb27711a2224949e9.tar.bz2 crosstool-ng-58b4c6d0a44d57b15d7857ecb27711a2224949e9.zip |
Merge the save-sample branch to trunk:
- reorder most of the environment setup,
- geting, extracting and patching are now components' sub-actions,
- save the current config as a sample to be used as a pre-configured target.
Diffstat (limited to 'scripts/build/libc_libfloat.sh')
-rw-r--r-- | scripts/build/libc_libfloat.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/build/libc_libfloat.sh b/scripts/build/libc_libfloat.sh index 3828a3f0..d40070f0 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 |