summaryrefslogtreecommitdiffstats
path: root/make/libfloat.mk
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-11-01 05:34:41 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-11-01 05:34:41 +0000
commitd632d42b34888f169a9394f2c5ce64ccca75a5cb (patch)
tree34a6836f3c2c2623dbee1731f96498d17476f5dd /make/libfloat.mk
parentb5f7712c837fd770bed24b1a904715b5fd057b78 (diff)
downloadbuildroot-novena-d632d42b34888f169a9394f2c5ce64ccca75a5cb.tar.gz
buildroot-novena-d632d42b34888f169a9394f2c5ce64ccca75a5cb.zip
Enable building soft float buildroot for gcc 3.3. Currently works for
i386 (limited to 64 bit long double... same as double), arm (libfloat), mips, and mipsel. Enable cross compiling a native gcc 3.3 toolchain to run on the target. Misc rootfs cleanups... strip some things that weren't, eliminate duplicate libs, move openssl shared libs out of /lib, reduce size of libssl.so by dynamicly linking with libcrypto.so, fix dropbear compile on mips.
Diffstat (limited to 'make/libfloat.mk')
-rw-r--r--make/libfloat.mk56
1 files changed, 56 insertions, 0 deletions
diff --git a/make/libfloat.mk b/make/libfloat.mk
new file mode 100644
index 000000000..97e1be1b5
--- /dev/null
+++ b/make/libfloat.mk
@@ -0,0 +1,56 @@
+#############################################################
+#
+# libfloat
+#
+#############################################################
+LIBFLOAT_SOURCE:=libfloat_990616.orig.tar.gz
+LIBFLOAT_PATCH:=libfloat_990616-3.diff.gz
+LIBFLOAT_SITE:=http://ftp.debian.org/debian/pool/main/libf/libfloat
+LIBFLOAT_CAT:=zcat
+LIBFLOAT_DIR:=$(BUILD_DIR)/libfloat
+
+LIBFLOAT_TARGET=
+ifneq ("$(strip $(TARGET_SOFT_FLOAT))","")
+ifeq ("$(strip $(ARCH))","arm")
+LIBFLOAT_TARGET+=$(STAGING_DIR)/lib/libfloat.so
+endif
+endif
+
+$(DL_DIR)/$(LIBFLOAT_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_SOURCE)
+
+$(DL_DIR)/$(LIBFLOAT_PATCH):
+ $(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_PATCH)
+
+libfloat-source: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
+
+$(LIBFLOAT_DIR)/.unpacked: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
+ $(LIBFLOAT_CAT) $(DL_DIR)/$(LIBFLOAT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ # Remove the binary files distributed with the the package.
+ make -C $(LIBFLOAT_DIR) clean
+ $(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(DL_DIR) $(LIBFLOAT_PATCH)
+ $(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(SOURCE_DIR) libfloat.patch
+ touch $(LIBFLOAT_DIR)/.unpacked
+
+$(LIBFLOAT_DIR)/libfloat.so.1: $(LIBFLOAT_DIR)/.unpacked \
+ $(STAGING_DIR)/bin/$(ARCH)-linux-gcc
+ $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld -C $(LIBFLOAT_DIR)
+
+$(STAGING_DIR)/lib/libfloat.so: $(LIBFLOAT_DIR)/libfloat.so.1
+ cp -a $(LIBFLOAT_DIR)/libfloat.a $(STAGING_DIR)/lib/libfloat.a
+ cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(STAGING_DIR)/lib/libfloat.so.1
+ (cd $(STAGING_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so)
+ cp -a $(LIBFLOAT_DIR)/libfloat.a $(TARGET_DIR)/usr/lib/libfloat.a
+ cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(TARGET_DIR)/lib/libfloat.so.1
+ $(STRIP) $(TARGET_DIR)/lib/libfloat.so.1 > /dev/null 2>&1
+ (cd $(TARGET_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so)
+ (cd $(TARGET_DIR)/usr/lib ; ln -sf /lib/libfloat.so libfloat.so)
+
+libfloat: $(STAGING_DIR)/lib/libfloat.so
+
+libfloat-clean:
+ -$(MAKE) -C $(LIBFLOAT_DIR) clean
+
+libfloat-dirclean:
+ rm -rf $(LIBFLOAT_DIR)
+