summaryrefslogtreecommitdiff
path: root/sources
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 /sources
parentb5f7712c837fd770bed24b1a904715b5fd057b78 (diff)
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 'sources')
-rw-r--r--sources/dropbear-010-ranlib.patch24
-rw-r--r--sources/gcc-830-nonhidden.patch14
-rw-r--r--sources/gcc-840-abi_check.patch14
-rw-r--r--sources/i386-gcc-soft-float.patch61
-rw-r--r--sources/libfloat.patch44
5 files changed, 157 insertions, 0 deletions
diff --git a/sources/dropbear-010-ranlib.patch b/sources/dropbear-010-ranlib.patch
new file mode 100644
index 000000000..7aa8d44bd
--- /dev/null
+++ b/sources/dropbear-010-ranlib.patch
@@ -0,0 +1,24 @@
+diff -urN dropbear-0.38/libtomcrypt/makefile dropbear-0.38-new/libtomcrypt/makefile
+--- dropbear-0.38/libtomcrypt/makefile 2003-09-24 05:22:44.000000000 -0500
++++ dropbear-0.38-new/libtomcrypt/makefile 2003-10-29 23:39:57.000000000 -0600
+@@ -103,7 +103,7 @@
+
+ $(LIBNAME): $(OBJECTS)
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
+- ranlib $(LIBNAME)
++ $(RANLIB) $(LIBNAME)
+
+ #This rule makes the test program included with libtomcrypt
+ test: library $(TESTOBJECTS)
+diff -urN dropbear-0.38/libtommath/makefile dropbear-0.38-new/libtommath/makefile
+--- dropbear-0.38/libtommath/makefile 2003-09-24 03:55:34.000000000 -0500
++++ dropbear-0.38-new/libtommath/makefile 2003-10-29 23:40:18.000000000 -0600
+@@ -48,7 +48,7 @@
+
+ libtommath.a: $(OBJECTS)
+ $(AR) $(ARFLAGS) libtommath.a $(OBJECTS)
+- ranlib libtommath.a
++ $(RANLIB) libtommath.a
+
+ install: libtommath.a
+ install -d -g root -o root $(DESTDIR)$(LIBPATH)
diff --git a/sources/gcc-830-nonhidden.patch b/sources/gcc-830-nonhidden.patch
new file mode 100644
index 000000000..649a3dc94
--- /dev/null
+++ b/sources/gcc-830-nonhidden.patch
@@ -0,0 +1,14 @@
+diff -urN gcc-3.3.2-orig/gcc/mklibgcc.in gcc-3.3.2/gcc/mklibgcc.in
+--- gcc-3.3.2-orig/gcc/mklibgcc.in 2003-09-08 19:37:34.000000000 -0500
++++ gcc-3.3.2/gcc/mklibgcc.in 2003-10-22 02:27:34.000000000 -0500
+@@ -296,7 +296,9 @@
+
+ libgcc_a_objs="$libgcc_objs $libgcc_st_objs"
+
+- if [ "@libgcc_visibility@" = yes -a "$SHLIB_LINK" ]; then
++ #if [ "@libgcc_visibility@" = yes -a "$SHLIB_LINK" ]; then
++ if [ "@libgcc_visibility@" = I_AM_DISABLED -a "$SHLIB_LINK" ]; then
++ echo "OUCH!!!!! : @libgcc_visibility@ : $SHLIB_LINK : OUCH!!!!!"
+ libgcc_a_objs=
+ echo ""
+ for o in $libgcc_objs $libgcc_st_objs; do
diff --git a/sources/gcc-840-abi_check.patch b/sources/gcc-840-abi_check.patch
new file mode 100644
index 000000000..e4dfd9aa2
--- /dev/null
+++ b/sources/gcc-840-abi_check.patch
@@ -0,0 +1,14 @@
+--- gcc-3.3.2/libstdc++-v3/testsuite/Makefile.in.dist 2003-10-26 00:07:43.000000000 -0500
++++ gcc-3.3.2/libstdc++-v3/testsuite/Makefile.in 2003-10-26 00:06:35.000000000 -0500
+@@ -204,9 +204,9 @@
+ PROGRAMS = $(noinst_PROGRAMS)
+
+ abi_check_OBJECTS = abi_check.$(OBJEXT)
+-abi_check_LDADD = $(LDADD)
++abi_check_LDADD = -lstdc++ $(LDADD)
+ abi_check_DEPENDENCIES =
+-abi_check_LDFLAGS =
++abi_check_LDFLAGS = -L../src
+ CXXFLAGS = @CXXFLAGS@
+ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+ LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
diff --git a/sources/i386-gcc-soft-float.patch b/sources/i386-gcc-soft-float.patch
new file mode 100644
index 000000000..805d9bf3e
--- /dev/null
+++ b/sources/i386-gcc-soft-float.patch
@@ -0,0 +1,61 @@
+diff -urN gcc-3.3.2-orig/gcc/config/i386/i386.h gcc-3.3.2/gcc/config/i386/i386.h
+--- gcc-3.3.2-orig/gcc/config/i386/i386.h 2003-06-25 16:18:31.000000000 -0500
++++ gcc-3.3.2/gcc/config/i386/i386.h 2003-10-22 01:46:57.000000000 -0500
+@@ -653,6 +653,7 @@
+ /* Define for XFmode or TFmode extended real floating point support.
+ The XFmode is specified by i386 ABI, while TFmode may be faster
+ due to alignment and simplifications in the address calculations. */
++#if 0
+ #define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96)
+ #define MAX_LONG_DOUBLE_TYPE_SIZE 128
+ #ifdef __x86_64__
+@@ -660,6 +661,17 @@
+ #else
+ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96
+ #endif
++#else
++ /* Set up for x86 soft float with 64-bit long doubles, since that's
++ * all the soft float emulation supports. */
++#define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : (TARGET_80387 ? 96 : 64))
++#define MAX_LONG_DOUBLE_TYPE_SIZE 128
++#ifdef __x86_64__
++#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
++#else
++#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 96 : 64)
++#endif
++#endif
+
+ /* Set the value of FLT_EVAL_METHOD in float.h. When using only the
+ FPU, assume that the fpcw is set to extended precision; when using
+diff -urN gcc-3.3.2-orig/gcc/config/t-linux gcc-3.3.2/gcc/config/t-linux
+--- gcc-3.3.2-orig/gcc/config/t-linux 2003-06-04 11:56:11.000000000 -0500
++++ gcc-3.3.2/gcc/config/t-linux 2003-10-22 01:46:39.000000000 -0500
+@@ -14,3 +14,28 @@
+ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
+ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
++
++##############################################
++# We want fine grained libraries, so use the new code to build the
++# floating point emulation libraries.
++FPBIT = fp-bit.c
++DPBIT = dp-bit.c
++
++#LIB2FUNCS_EXTRA = xp-bit.c
++
++dp-bit.c: $(srcdir)/config/fp-bit.c
++ echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
++ echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
++ echo '#endif' >> dp-bit.c
++ cat $(srcdir)/config/fp-bit.c >> dp-bit.c
++
++fp-bit.c: $(srcdir)/config/fp-bit.c
++ echo '#define FLOAT' > fp-bit.c
++ echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
++ echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
++ echo '#endif' >> fp-bit.c
++ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
++
++#MULTILIB_OPTIONS = msoft-float
++#MULTILIB_DIRNAMES = soft-float
++
diff --git a/sources/libfloat.patch b/sources/libfloat.patch
new file mode 100644
index 000000000..dc9e4ea52
--- /dev/null
+++ b/sources/libfloat.patch
@@ -0,0 +1,44 @@
+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,6 @@
+ # 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__
+ 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
+
+ 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: