2007-02-24 11:00:05 +00:00
|
|
|
# This file adds functions to build libfloat
|
|
|
|
# Copyright 2007 Yann E. MORIN
|
|
|
|
# Licensed under the GPL v2. See COPYING in the root of this package
|
|
|
|
|
2007-05-07 09:04:02 +00:00
|
|
|
# Define libfloat functions depending on wether it is selected or not
|
|
|
|
if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then
|
|
|
|
|
|
|
|
# Download libfloat
|
|
|
|
do_libfloat_get() {
|
2007-05-19 13:10:11 +00:00
|
|
|
# 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}"`
|
2007-05-19 22:52:47 +00:00
|
|
|
ln -svf "${libfloat_file}${ext}" "${CT_LIBFLOAT_FILE}${ext}" |CT_DoLog DEBUG
|
2007-05-19 13:10:11 +00:00
|
|
|
CT_Popd
|
2007-05-07 09:04:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Extract libfloat
|
|
|
|
do_libfloat_extract() {
|
2007-05-19 13:10:11 +00:00
|
|
|
CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
|
2007-05-07 09:04:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Build libfloat
|
2007-02-24 11:00:05 +00:00
|
|
|
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
|
2007-05-19 13:10:11 +00:00
|
|
|
CT_DoStep INFO "Installing software floating point emulation library libfloat"
|
2007-05-27 21:30:34 +00:00
|
|
|
CT_Pushd "${CT_BUILD_DIR}"
|
|
|
|
mkdir -p build-libfloat
|
2007-05-19 13:10:11 +00:00
|
|
|
cd build-libfloat
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Copying sources to build dir"
|
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);
Shut uClibc finish step: there really is nothing to do;
Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);
Did not catch the make errors: fixed the pattern matching in scripts/functions;
Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;
Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
2007-05-08 17:48:32 +00:00
|
|
|
( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Cleaning library"
|
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);
Shut uClibc finish step: there really is nothing to do;
Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);
Did not catch the make errors: fixed the pattern matching in scripts/functions;
Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;
Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
2007-05-08 17:48:32 +00:00
|
|
|
make clean 2>&1 |CT_DoLog ALL
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building library"
|
2007-05-27 21:30:34 +00:00
|
|
|
make CROSS_COMPILE="${CT_TARGET}-" 2>&1 |CT_DoLog ALL
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing library"
|
2007-05-27 21:30:34 +00:00
|
|
|
make DESTDIR="${CT_SYSROOT_DIR}" install 2>&1 |CT_DoLog ALL
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
CT_Popd
|
|
|
|
|
|
|
|
CT_EndStep
|
|
|
|
}
|
2007-05-07 09:04:02 +00:00
|
|
|
|
|
|
|
else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y"
|
|
|
|
|
|
|
|
do_libfloat_get() {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
do_libfloat_extract() {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
do_libfloat() {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
|
|
|
|
fi
|