diff options
Diffstat (limited to 'patches/libfloat')
-rw-r--r-- | patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch | 48 | ||||
-rw-r--r-- | patches/libfloat/990616/200-cross_compile.patch | 63 |
2 files changed, 111 insertions, 0 deletions
diff --git a/patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch b/patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch new file mode 100644 index 00000000..30e7f2a3 --- /dev/null +++ b/patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch @@ -0,0 +1,48 @@ +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/200-cross_compile.patch b/patches/libfloat/990616/200-cross_compile.patch new file mode 100644 index 00000000..640008cb --- /dev/null +++ b/patches/libfloat/990616/200-cross_compile.patch @@ -0,0 +1,63 @@ +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 *~ |