From 7131764f9c93494f6b960b1d33d48508cc2f0512 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 30 Jul 2007 20:02:13 +0000 Subject: Remove any reference to libfloat. That has gone once and for all. Rationale: Most of the time, soft-float problems are caused by this sucker of gcc: it has support for soft float for all of the targets I've tried so far, but does not activate this code until you dwelve into half a dozen of files to make it accept to build and link the support code... So, yes: gcc has soft-float support. And again, yes: gcc is a sucker. diff --git a/COPYING b/COPYING index 25e81c8..e0483b1 100644 --- a/COPYING +++ b/COPYING @@ -12,8 +12,6 @@ the following terms. patches/uClibc/*/*.patch : available under the LGPL v2.1 patches/glibc/*/*.patch : ditto patches/dmalloc/*/*.patch : ditto - patches/libfloat/*/*.patch: Seems to be some BSD-like license; see the - full source. patches/*/*/*.patch not covered by any license above: GPL v2 (some are GPL v2 or later, see the full source). diff --git a/config/target.in b/config/target.in index 9c72e4b..38d3360 100644 --- a/config/target.in +++ b/config/target.in @@ -20,7 +20,6 @@ config ARCH_ARM bool prompt "arm" select ARCH_SUPPORTS_BOTH_ENDIAN - select ARCH_SUPPORTS_LIBFLOAT config ARCH_MIPS bool @@ -30,7 +29,6 @@ config ARCH_MIPS config ARCH_x86 bool prompt "x86" - select ARCH_SUPPORTS_LIBFLOAT config ARCH_x86_64 bool @@ -183,30 +181,6 @@ config ARCH_FLOAT_SW endchoice -config ARCH_SUPPORTS_LIBFLOAT - bool - default n - -config ARCH_FLOAT_SW_LIBFLOAT - bool - prompt "Use libfloat" - default n - depends on ARCH_FLOAT_SW && ARCH_SUPPORTS_LIBFLOAT - help - For those targets upporting it, you can use libfloat for the software - floating point emulation. - - Note that some versions of gcc have support code that supersedes libfloat, - while others don't. Known version of gcc that don't have support code are - versions prior to 3.0, and version above 4.0. - - You should check gcc before deciding to use libfloat. - -config LIBFLOAT_VERSION - string - default "990616.orig" - depends on ARCH_FLOAT_SW_LIBFLOAT - config TARGET_CFLAGS string prompt "Target CFLAGS" diff --git a/patches/gcc/4.0.4/801-arm-softfloat.patch b/patches/gcc/4.0.4/801-arm-softfloat.patch index 9ae921e..1965a8a 100644 --- a/patches/gcc/4.0.4/801-arm-softfloat.patch +++ b/patches/gcc/4.0.4/801-arm-softfloat.patch @@ -1,4 +1,5 @@ -Enable building a pure soft-float compiler without the need for libfloat. +Enable building a pure soft-float compiler without the need for a software +floating point library. diff -dur gcc-4.0.4.orig/gcc/config.gcc gcc-4.0.4/gcc/config.gcc --- gcc-4.0.4.orig/gcc/config.gcc 2007-02-02 19:12:28.000000000 +0100 diff --git a/patches/libfloat/990616.orig/100-libfloat_990616-3-lib-versioning.patch b/patches/libfloat/990616.orig/100-libfloat_990616-3-lib-versioning.patch deleted file mode 100644 index 30e7f2a..0000000 --- a/patches/libfloat/990616.orig/100-libfloat_990616-3-lib-versioning.patch +++ /dev/null @@ -1,48 +0,0 @@ -This patch comes from the Debian archive: - ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/libfloat_990616-3.diff.gz - -It was stripped of all Debian-related hunks. -Kept is the library versioning. - ---- libfloat-990616.orig/Makefile -+++ libfloat-990616/Makefile -@@ -4,15 +4,15 @@ - #CC=gcc -g -O2 -freg-struct-return -D__LIBFLOAT__ - AR=ar - --all: libfloat.a libfloat.so -+all: libfloat.a libfloat.so.1 - - libfloat.a: softfloat.o fplib_glue.o - rm -f libfloat.a - $(AR) cq libfloat.a softfloat.o fplib_glue.o - --libfloat.so: softfloat.os fplib_glue.os -- rm -f libfloat.so -- gcc -shared softfloat.os fplib_glue.os -o libfloat.so -+libfloat.so.1: softfloat.os fplib_glue.os -+ rm -f libfloat.so.1 -+ gcc -shared -Wl,-soname,libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1 - - softfloat.o: softfloat/bits64/softfloat.c - $(CC) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c -@@ -26,14 +26,14 @@ - fplib_glue.os: fplib_glue.S - $(CC) -fpic -c -o fplib_glue.os fplib_glue.S - --install: libfloat.a libfloat.so -- cp -a libfloat.a /usr/lib -- cp -a libfloat.so /usr/lib -- ldconfig -+install: libfloat.a libfloat.so.1 -+ cp -a libfloat.a $(DESTDIR)/usr/lib -+ cp -a libfloat.so.1 $(DESTDIR)/usr/lib -+ cd $(DESTDIR)/usr/lib; ln -s libfloat.so.1 libfloat.so - - clean: - rm -f *.o - rm -f *.os - rm -f libfloat.a -- rm -f libfloat.so -+ rm -f libfloat.so.1 - rm -f *~ diff --git a/patches/libfloat/990616.orig/200-cross_compile.patch b/patches/libfloat/990616.orig/200-cross_compile.patch deleted file mode 100644 index 640008c..0000000 --- a/patches/libfloat/990616.orig/200-cross_compile.patch +++ /dev/null @@ -1,63 +0,0 @@ -When linking, call directly ld in place of the gcc wrapper, because the wrapper -will try to link with -lfloat, which we don't have right now... - -Simplify CFLAGS to stay ABI compliant (ot so I guess)... - -diff -dur libfloat.orig/Makefile libfloat/Makefile ---- libfloat.orig/Makefile 2007-02-16 19:38:55.000000000 +0100 -+++ libfloat/Makefile 2007-02-16 19:46:23.000000000 +0100 -@@ -1,8 +1,11 @@ - # Makefile for the Linux soft-float library - --CC=gcc -O2 -freg-struct-return -fomit-frame-pointer -D__LIBFLOAT__ --#CC=gcc -g -O2 -freg-struct-return -D__LIBFLOAT__ --AR=ar -+AR=$(CROSS_COMPILE)ar -+#CFLAGS=-O2 -freg-struct-return -fomit-frame-pointer -D__LIBFLOAT__ -+CFLAGS=-O2 -D__LIBFLOAT__ -+CC=$(CROSS_COMPILE)gcc -+LDFLAGS=-shared -nostdlib -+LD=$(CROSS_COMPILE)ld - - all: libfloat.a libfloat.so.1 - -@@ -12,28 +13,31 @@ - - libfloat.so.1: softfloat.os fplib_glue.os - rm -f libfloat.so.1 -- gcc -shared -Wl,-soname,libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1 -+ $(LD) $(LDFLAGS) -soname=libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1 - - softfloat.o: softfloat/bits64/softfloat.c -- $(CC) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c -+ $(CC) $(CFLAGS) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c - - fplib_glue.o: fplib_glue.S -- $(CC) -c -o fplib_glue.o fplib_glue.S -+ $(CC) $(CFLAGS) -c -o fplib_glue.o fplib_glue.S - - softfloat.os: softfloat/bits64/softfloat.c -- $(CC) -fpic -c -o softfloat.os -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c -+ $(CC) $(CFLAGS) -fpic -c -o softfloat.os -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c - - fplib_glue.os: fplib_glue.S -- $(CC) -fpic -c -o fplib_glue.os fplib_glue.S -+ $(CC) $(CFLAGS) -fpic -c -o fplib_glue.os fplib_glue.S - - install: libfloat.a libfloat.so.1 -- cp -a libfloat.a $(DESTDIR)/usr/lib -- cp -a libfloat.so.1 $(DESTDIR)/usr/lib -- cd $(DESTDIR)/usr/lib; ln -s libfloat.so.1 libfloat.so -+ install -d -m 755 "$(DESTDIR)/usr/lib" -+ install -m 755 libfloat.a "$(DESTDIR)/usr/lib" -+ install -m 755 libfloat.so.1 "$(DESTDIR)/usr/lib" -+ cd $(DESTDIR)/usr/lib -+ ln -s libfloat.so.1 libfloat.so - - clean: - rm -f *.o - rm -f *.os - rm -f libfloat.a - rm -f libfloat.so.1 -+ rm -f libfloat.so - rm -f *~ diff --git a/samples/arm-unknown-linux-uclibc/crosstool.config b/samples/arm-unknown-linux-uclibc/crosstool.config index c5bf7f9..d1ec5c3 100644 --- a/samples/arm-unknown-linux-uclibc/crosstool.config +++ b/samples/arm-unknown-linux-uclibc/crosstool.config @@ -92,8 +92,6 @@ CT_ARCH_TUNE="xscale" CT_ARCH_FPU="" # CT_ARCH_FLOAT_HW is not set CT_ARCH_FLOAT_SW=y -CT_ARCH_SUPPORTS_LIBFLOAT=y -# CT_ARCH_FLOAT_SW_LIBFLOAT is not set CT_TARGET_CFLAGS="" # diff --git a/samples/armeb-unknown-linux-gnu/crosstool.config b/samples/armeb-unknown-linux-gnu/crosstool.config index e6a65c3..e2dc60a 100644 --- a/samples/armeb-unknown-linux-gnu/crosstool.config +++ b/samples/armeb-unknown-linux-gnu/crosstool.config @@ -92,8 +92,6 @@ CT_ARCH_TUNE="xscale" CT_ARCH_FPU="" # CT_ARCH_FLOAT_HW is not set CT_ARCH_FLOAT_SW=y -CT_ARCH_SUPPORTS_LIBFLOAT=y -# CT_ARCH_FLOAT_SW_LIBFLOAT is not set CT_TARGET_CFLAGS="" # diff --git a/samples/armeb-unknown-linux-uclibc/crosstool.config b/samples/armeb-unknown-linux-uclibc/crosstool.config index d7a95e3..03ceb16 100644 --- a/samples/armeb-unknown-linux-uclibc/crosstool.config +++ b/samples/armeb-unknown-linux-uclibc/crosstool.config @@ -92,8 +92,6 @@ CT_ARCH_TUNE="xscale" CT_ARCH_FPU="" # CT_ARCH_FLOAT_HW is not set CT_ARCH_FLOAT_SW=y -CT_ARCH_SUPPORTS_LIBFLOAT=y -# CT_ARCH_FLOAT_SW_LIBFLOAT is not set CT_TARGET_CFLAGS="" # diff --git a/samples/i586-geode-linux-uclibc/crosstool.config b/samples/i586-geode-linux-uclibc/crosstool.config index 6c1942e..31fd534 100644 --- a/samples/i586-geode-linux-uclibc/crosstool.config +++ b/samples/i586-geode-linux-uclibc/crosstool.config @@ -90,7 +90,6 @@ CT_ARCH_TUNE="" CT_ARCH_FPU="" CT_ARCH_FLOAT_HW=y # CT_ARCH_FLOAT_SW is not set -CT_ARCH_SUPPORTS_LIBFLOAT=y CT_TARGET_CFLAGS="" # diff --git a/samples/i686-nptl-linux-gnu/crosstool.config b/samples/i686-nptl-linux-gnu/crosstool.config index 755b1d6..5a01bae 100644 --- a/samples/i686-nptl-linux-gnu/crosstool.config +++ b/samples/i686-nptl-linux-gnu/crosstool.config @@ -90,7 +90,6 @@ CT_ARCH_TUNE="i686" CT_ARCH_FPU="" CT_ARCH_FLOAT_HW=y # CT_ARCH_FLOAT_SW is not set -CT_ARCH_SUPPORTS_LIBFLOAT=y CT_TARGET_CFLAGS="" # diff --git a/samples/mips-unknown-linux-uclibc/crosstool.config b/samples/mips-unknown-linux-uclibc/crosstool.config index 1adbfc4..e0b006d 100644 --- a/samples/mips-unknown-linux-uclibc/crosstool.config +++ b/samples/mips-unknown-linux-uclibc/crosstool.config @@ -92,7 +92,6 @@ CT_ARCH_TUNE="" CT_ARCH_FPU="" # CT_ARCH_FLOAT_HW is not set CT_ARCH_FLOAT_SW=y -# CT_ARCH_SUPPORTS_LIBFLOAT is not set CT_TARGET_CFLAGS="" # diff --git a/samples/x86_64-unknown-linux-uclibc/crosstool.config b/samples/x86_64-unknown-linux-uclibc/crosstool.config index b66a6b4..7064ff0 100644 --- a/samples/x86_64-unknown-linux-uclibc/crosstool.config +++ b/samples/x86_64-unknown-linux-uclibc/crosstool.config @@ -90,7 +90,6 @@ CT_ARCH_TUNE="" CT_ARCH_FPU="" CT_ARCH_FLOAT_HW=y # CT_ARCH_FLOAT_SW is not set -# CT_ARCH_SUPPORTS_LIBFLOAT is not set CT_TARGET_CFLAGS="" # diff --git a/scripts/build/binutils.sh b/scripts/build/binutils.sh index cb10374..22be840 100644 --- a/scripts/build/binutils.sh +++ b/scripts/build/binutils.sh @@ -45,7 +45,7 @@ do_binutils() { # Make those new tools available to the core C compilers to come: # Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as - # well. Create that (libfloat is one such sucker). + # well. Create that. mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin" mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin" mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin" diff --git a/scripts/build/libfloat.sh b/scripts/build/libfloat.sh deleted file mode 100644 index 7fc9e6d..0000000 --- a/scripts/build/libfloat.sh +++ /dev/null @@ -1,72 +0,0 @@ -# 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 - -# Define libfloat functions depending on wether it is selected or not -if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then - -do_print_filename() { - echo "libfloat-${CT_LIBFLOAT_VERSION}" -} - -# Download libfloat -do_libfloat_get() { - # 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 -vf "${libfloat_file}${ext}" "${CT_LIBFLOAT_FILE}${ext}" |CT_DoLog DEBUG - CT_Popd -} - -# Extract libfloat -do_libfloat_extract() { - 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 - # code - CT_DoStep INFO "Installing software floating point emulation library libfloat" - CT_Pushd "${CT_BUILD_DIR}" - mkdir -p build-libfloat - cd build-libfloat - - CT_DoLog EXTRA "Copying sources to build dir" - ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL - - CT_DoLog EXTRA "Cleaning library" - make clean 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Building library" - make CROSS_COMPILE="${CT_TARGET}-" 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing library" - make DESTDIR="${CT_SYSROOT_DIR}" install 2>&1 |CT_DoLog ALL - - CT_Popd - - CT_EndStep -} - -else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y" - -do_print_filename() { - true -} -do_libfloat_get() { - true -} -do_libfloat_extract() { - true -} -do_libfloat() { - true -} - -fi diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh index 350af8e..654efd2 100755 --- a/scripts/crosstool.sh +++ b/scripts/crosstool.sh @@ -90,7 +90,6 @@ 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_LIBFLOAT_FILE="libfloat-${CT_LIBFLOAT_VERSION}" # Where will we work? CT_TARBALLS_DIR="${CT_TOP_DIR}/targets/tarballs" @@ -345,7 +344,6 @@ fi # export any variable, nor re-parse the configuration and functions files. . "${CT_LIB_DIR}/scripts/build/kernel_${CT_KERNEL}.sh" . "${CT_LIB_DIR}/scripts/build/binutils.sh" -. "${CT_LIB_DIR}/scripts/build/libfloat.sh" . "${CT_LIB_DIR}/scripts/build/libc_${CT_LIBC}.sh" . "${CT_LIB_DIR}/scripts/build/cc_core_${CT_CC_CORE}.sh" . "${CT_LIB_DIR}/scripts/build/cc_${CT_CC}.sh" @@ -357,7 +355,6 @@ if [ -z "${CT_RESTART}" ]; then do_kernel_get do_binutils_get do_cc_core_get - do_libfloat_get do_libc_get do_cc_get do_tools_get @@ -373,7 +370,6 @@ if [ -z "${CT_RESTART}" ]; then do_kernel_extract do_binutils_extract do_cc_core_extract - do_libfloat_extract do_libc_extract do_cc_extract do_tools_extract @@ -396,7 +392,6 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then libc_headers \ libc_start_files \ cc_core_pass_2 \ - libfloat \ libc \ cc \ libc_finish \ diff --git a/scripts/functions b/scripts/functions index e74d874..7c44132 100644 --- a/scripts/functions +++ b/scripts/functions @@ -416,7 +416,7 @@ CT_ExtractAndPatch() { esac # Snapshots might not have the version number in the extracted directory - # name. This is also the case for some (old) packages, such as libfloat. + # name. This is also the case for some (odd) packages, such as D.U.M.A. # Overcome this issue by symlink'ing the directory. if [ ! -d "${file}" -a "${libc_addon}" != "y" ]; then case "${ext}" in diff --git a/steps.mk b/steps.mk index 6cb28db..33d2dad 100644 --- a/steps.mk +++ b/steps.mk @@ -9,7 +9,6 @@ CT_STEPS := libc_check_config \ libc_headers \ libc_start_files \ cc_core_pass_2 \ - libfloat \ libc \ cc \ libc_finish \ -- cgit v0.10.2-6-g49f6