diff options
-rw-r--r-- | patches/libfloat/990616.orig/100-libfloat_990616-3-lib-versioning.patch (renamed from patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch) | 0 | ||||
-rw-r--r-- | patches/libfloat/990616.orig/200-cross_compile.patch (renamed from patches/libfloat/990616/200-cross_compile.patch) | 0 | ||||
-rw-r--r-- | scripts/build/libfloat.sh | 33 | ||||
-rwxr-xr-x | scripts/crosstool.sh | 2 | ||||
-rw-r--r-- | scripts/functions | 3 |
5 files changed, 16 insertions, 22 deletions
diff --git a/patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch b/patches/libfloat/990616.orig/100-libfloat_990616-3-lib-versioning.patch index 30e7f2a3..30e7f2a3 100644 --- a/patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch +++ b/patches/libfloat/990616.orig/100-libfloat_990616-3-lib-versioning.patch diff --git a/patches/libfloat/990616/200-cross_compile.patch b/patches/libfloat/990616.orig/200-cross_compile.patch index 640008cb..640008cb 100644 --- a/patches/libfloat/990616/200-cross_compile.patch +++ b/patches/libfloat/990616.orig/200-cross_compile.patch diff --git a/scripts/build/libfloat.sh b/scripts/build/libfloat.sh index 70b95c2d..e80e3932 100644 --- a/scripts/build/libfloat.sh +++ b/scripts/build/libfloat.sh @@ -7,26 +7,20 @@ 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 + # Ah! libfloat separates the version string from the base name with + # an underscore. We need to workaround this in a sane manner: soft link. + local libfloat_file=`echo "${CT_LIBFLOAT_FILE}" |sed -r -e 's/^libfloat-/libfloat_/;'` + CT_GetFile "${libfloat_file}" \ + ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat + CT_Pushd "${CT_TARBALLS_DIR}" + ext=`CT_GetFileExtension "${libfloat_file}"` + ln -s "${libfloat_file}${ext}" "${CT_LIBFLOAT_FILE}${ext}" + CT_Popd } # Extract libfloat do_libfloat_extract() { - [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}" + CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}" } # Build libfloat @@ -34,13 +28,12 @@ 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 # code - [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] || return 0 - CT_DoStep INFO "Installing software floating point emulation library libfloat" + CT_DoStep INFO "Installing software floating point emulation library libfloat" + mkdir build-libfloat + cd build-libfloat CT_Pushd "${CT_BUILD_DIR}" CT_DoLog EXTRA "Copying sources to build dir" - mkdir build-libfloat - cd build-libfloat ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL CT_DoLog EXTRA "Cleaning library" diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh index 4fd99273..90d0ebad 100755 --- a/scripts/crosstool.sh +++ b/scripts/crosstool.sh @@ -97,7 +97,7 @@ fi CT_CC_CORE_FILE="${CT_CC_CORE}-${CT_CC_CORE_VERSION}" CT_CC_FILE="${CT_CC}-${CT_CC_VERSION}" CT_LIBC_FILE="${CT_LIBC}-${CT_LIBC_VERSION}" -[ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_LIBFLOAT_FILE="libfloat-990616" +CT_LIBFLOAT_FILE="libfloat-${CT_LIBFLOAT_VERSION}" # Where will we work? CT_TARBALLS_DIR="${CT_TOP_DIR}/targets/tarballs" diff --git a/scripts/functions b/scripts/functions index b905d320..41942a45 100644 --- a/scripts/functions +++ b/scripts/functions @@ -294,7 +294,6 @@ CT_GetFile() { return 0 fi - CT_DoLog EXTRA "Retrieving \"${file}\"" CT_Pushd "${CT_TARBALLS_DIR}" # File not yet downloaded, try to get it got_it=0 @@ -303,11 +302,13 @@ CT_GetFile() { for ext in .tar.bz2 .tar.gz .tgz .tar; do if [ -r "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" -a \ "${CT_FORCE_DOWNLOAD}" != "y" ]; then + CT_DoLog EXTRA "Copying \"${file}\" from local copy" cp -v "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog DEBUG return 0 fi done # Try to download it + CT_DoLog EXTRA "Retrieving \"${file}\"" for ext in .tar.bz2 .tar.gz .tgz .tar; do # Try all urls in turn for url in "$@"; do |