patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 08 17:48:32 2007 +0000 (2007-05-08)
changeset 78 c3868084d81a
permissions -rw-r--r--
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.
yann@1
     1
This patch comes from the Debian archive:
yann@1
     2
  ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/libfloat_990616-3.diff.gz
yann@1
     3
yann@1
     4
It was stripped of all Debian-related hunks.
yann@1
     5
Kept is the library versioning.
yann@1
     6
yann@1
     7
--- libfloat-990616.orig/Makefile
yann@1
     8
+++ libfloat-990616/Makefile
yann@1
     9
@@ -4,15 +4,15 @@
yann@1
    10
 #CC=gcc -g -O2 -freg-struct-return -D__LIBFLOAT__
yann@1
    11
 AR=ar
yann@1
    12
 
yann@1
    13
-all: libfloat.a libfloat.so
yann@1
    14
+all: libfloat.a libfloat.so.1
yann@1
    15
 
yann@1
    16
 libfloat.a: softfloat.o fplib_glue.o
yann@1
    17
 	rm -f libfloat.a
yann@1
    18
 	$(AR) cq libfloat.a softfloat.o fplib_glue.o
yann@1
    19
 
yann@1
    20
-libfloat.so: softfloat.os fplib_glue.os
yann@1
    21
-	rm -f libfloat.so
yann@1
    22
-	gcc -shared softfloat.os fplib_glue.os -o libfloat.so
yann@1
    23
+libfloat.so.1: softfloat.os fplib_glue.os
yann@1
    24
+	rm -f libfloat.so.1
yann@1
    25
+	gcc -shared -Wl,-soname,libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1
yann@1
    26
 
yann@1
    27
 softfloat.o: softfloat/bits64/softfloat.c
yann@1
    28
 	$(CC) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
yann@1
    29
@@ -26,14 +26,14 @@
yann@1
    30
 fplib_glue.os: fplib_glue.S
yann@1
    31
 	$(CC) -fpic -c -o fplib_glue.os fplib_glue.S
yann@1
    32
 
yann@1
    33
-install: libfloat.a libfloat.so
yann@1
    34
-	cp -a libfloat.a /usr/lib
yann@1
    35
-	cp -a libfloat.so /usr/lib
yann@1
    36
-	ldconfig
yann@1
    37
+install: libfloat.a libfloat.so.1
yann@1
    38
+	cp -a libfloat.a $(DESTDIR)/usr/lib
yann@1
    39
+	cp -a libfloat.so.1 $(DESTDIR)/usr/lib
yann@1
    40
+	cd $(DESTDIR)/usr/lib; ln -s libfloat.so.1 libfloat.so
yann@1
    41
 
yann@1
    42
 clean: 
yann@1
    43
 	rm -f *.o
yann@1
    44
 	rm -f *.os
yann@1
    45
 	rm -f libfloat.a
yann@1
    46
-	rm -f libfloat.so
yann@1
    47
+	rm -f libfloat.so.1
yann@1
    48
 	rm -f *~