summaryrefslogtreecommitdiff
path: root/package/libfloat
diff options
context:
space:
mode:
Diffstat (limited to 'package/libfloat')
-rw-r--r--package/libfloat/libfloat.mk4
-rw-r--r--package/libfloat/libfloat.patch45
2 files changed, 47 insertions, 2 deletions
diff --git a/package/libfloat/libfloat.mk b/package/libfloat/libfloat.mk
index a7404fcdc..8e8fb8522 100644
--- a/package/libfloat/libfloat.mk
+++ b/package/libfloat/libfloat.mk
@@ -30,8 +30,8 @@ $(LIBFLOAT_DIR)/.unpacked: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PAT
$(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
+ toolchain/patch-kernel.sh $(LIBFLOAT_DIR) $(DL_DIR) $(LIBFLOAT_PATCH)
+ toolchain/patch-kernel.sh $(LIBFLOAT_DIR) package/libfloat/ libfloat\*.patch
touch $(LIBFLOAT_DIR)/.unpacked
$(LIBFLOAT_DIR)/libfloat.so.1: $(LIBFLOAT_DIR)/.unpacked $(TARGET_CC)
diff --git a/package/libfloat/libfloat.patch b/package/libfloat/libfloat.patch
new file mode 100644
index 000000000..90459a89e
--- /dev/null
+++ b/package/libfloat/libfloat.patch
@@ -0,0 +1,45 @@
+diff -urN libfloat-dist/Makefile libfloat/Makefile
+--- libfloat-dist/Makefile 2003-10-26 00:33:45.000000000 -0500
++++ libfloat/Makefile 2003-10-26 01:07:26.000000000 -0500
+@@ -1,7 +1,7 @@
+ # 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__
++CFLAGS= -O2 -freg-struct-return -fomit-frame-pointer -D__LIBFLOAT__ -msoft-float
++LIBGCC=$(shell $(CC) -print-libgcc-file-name)
+ AR=ar
+
+ all: libfloat.a libfloat.so.1
+@@ -12,24 +11,24 @@
+
+ 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) -shared -soname=libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1 $(LIBGCC)
+
+ 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
++ cp -a libfloat.so.1 $(DESTDIR)/lib
++ cd $(DESTDIR)/lib; ln -s libfloat.so.1 libfloat.so
+ #ldconfig
+
+ clean: