Commit 8128836d authored by Mike Frysinger's avatar Mike Frysinger
Browse files

copy 3.4.2 and remove patches no longer needed

parent e2807887
Loading
Loading
Loading
Loading
+442 −0
Original line number Diff line number Diff line
diff -urN gcc-3.4.1-dist/boehm-gc/configure gcc-3.4.1/boehm-gc/configure
--- gcc-3.4.1-dist/boehm-gc/configure	2004-07-01 14:14:03.000000000 -0500
+++ gcc-3.4.1/boehm-gc/configure	2004-08-12 16:22:57.000000000 -0500
@@ -1947,6 +1947,11 @@
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
+linux-uclibc*)
+  lt_cv_deplibs_check_method=pass_all
+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+  ;;
+
 netbsd*)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff -urN gcc-3.4.1-dist/boehm-gc/ltconfig gcc-3.4.1/boehm-gc/ltconfig
--- gcc-3.4.1-dist/boehm-gc/ltconfig	2002-11-20 09:59:06.000000000 -0600
+++ gcc-3.4.1/boehm-gc/ltconfig	2004-08-12 15:54:42.000000000 -0500
@@ -1981,6 +1981,23 @@
   fi
   ;;
 
+linux-uclibc*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=`echo /lib/libuClibc-*.so`
+
+  # Assume using the uClibc dynamic linker.
+  dynamic_linker="uClibc ld.so"
+  ;;
+
 netbsd*)
   version_type=sunos
   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h	2004-01-31 00:18:11.000000000 -0600
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h	2004-08-12 15:54:42.000000000 -0500
@@ -81,6 +81,18 @@
   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
 
 #undef  LINK_SPEC
+#ifdef USE_UCLIBC
+#define LINK_SPEC "%{h*} %{version:-v} \
+   %{b} %{Wl,*:%*} \
+   %{static:-Bstatic} \
+   %{shared:-shared} \
+   %{symbolic:-Bsymbolic} \
+   %{rdynamic:-export-dynamic} \
+   %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
+   -X \
+   %{mbig-endian:-EB}" \
+   SUBTARGET_EXTRA_LINK_SPEC
+#else
 #define LINK_SPEC "%{h*} %{version:-v} \
    %{b} %{Wl,*:%*} \
    %{static:-Bstatic} \
@@ -91,6 +103,7 @@
    -X \
    %{mbig-endian:-EB}" \
    SUBTARGET_EXTRA_LINK_SPEC
+#endif
 
 #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
 
diff -urN gcc-3.4.1-dist/gcc/config/cris/linux.h gcc-3.4.1/gcc/config/cris/linux.h
--- gcc-3.4.1-dist/gcc/config/cris/linux.h	2003-11-28 21:08:09.000000000 -0600
+++ gcc-3.4.1/gcc/config/cris/linux.h	2004-08-12 15:54:43.000000000 -0500
@@ -79,6 +79,25 @@
 #undef CRIS_DEFAULT_CPU_VERSION
 #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
 
+#ifdef USE_UCLIBC
+
+#undef CRIS_SUBTARGET_VERSION
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
+
+#undef CRIS_LINK_SUBTARGET_SPEC
+#define CRIS_LINK_SUBTARGET_SPEC \
+ "-mcrislinux\
+  -rpath-link include/asm/../..%s\
+  %{shared} %{static}\
+  %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
+  %{!shared: \
+    %{!static: \
+      %{rdynamic:-export-dynamic} \
+      %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
+  %{!r:%{O2|O3: --gc-sections}}"
+
+#else  /* USE_UCLIBC */
+
 #undef CRIS_SUBTARGET_VERSION
 #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
 
@@ -93,6 +112,8 @@
   %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
   %{!r:%{O2|O3: --gc-sections}}"
 
+#endif  /* USE_UCLIBC */
+
 
 /* Node: Run-time Target */
 
diff -urN gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.1/gcc/config/cris/t-linux-uclibc
--- gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc	1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.4.1/gcc/config/cris/t-linux-uclibc	2004-08-12 15:54:43.000000000 -0500
@@ -0,0 +1,3 @@
+T_CFLAGS = -DUSE_UCLIBC
+TARGET_LIBGCC2_CFLAGS += -fPIC
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
diff -urN gcc-3.4.1-dist/gcc/config/i386/linux.h gcc-3.4.1/gcc/config/i386/linux.h
--- gcc-3.4.1-dist/gcc/config/i386/linux.h	2003-11-28 21:08:10.000000000 -0600
+++ gcc-3.4.1/gcc/config/i386/linux.h	2004-08-12 15:54:43.000000000 -0500
@@ -118,6 +118,15 @@
 	%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
 	%{static:-static}}}"
 #else
+#if defined USE_UCLIBC
+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
+  %{!shared: \
+    %{!ibcs: \
+      %{!static: \
+	%{rdynamic:-export-dynamic} \
+	%{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+	%{static:-static}}}"
+#else
 #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
   %{!shared: \
     %{!ibcs: \
@@ -126,6 +135,7 @@
 	%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 	%{static:-static}}}"
 #endif
+#endif
 
 /* A C statement (sans semicolon) to output to the stdio stream
    FILE the assembler definition of uninitialized global DECL named
diff -urN gcc-3.4.1-dist/gcc/config/mips/linux.h gcc-3.4.1/gcc/config/mips/linux.h
--- gcc-3.4.1-dist/gcc/config/mips/linux.h	2004-06-15 20:42:24.000000000 -0500
+++ gcc-3.4.1/gcc/config/mips/linux.h	2004-08-12 15:54:43.000000000 -0500
@@ -109,6 +109,17 @@
 
 /* Borrowed from sparc/linux.h */
 #undef LINK_SPEC
+#ifdef USE_UCLIBC
+#define LINK_SPEC \
+ "%(endian_spec) \
+  %{shared:-shared} \
+  %{!shared: \
+    %{!ibcs: \
+      %{!static: \
+        %{rdynamic:-export-dynamic} \
+        %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+        %{static:-static}}}"
+#else
 #define LINK_SPEC \
  "%(endian_spec) \
   %{shared:-shared} \
@@ -118,6 +129,7 @@
         %{rdynamic:-export-dynamic} \
         %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
         %{static:-static}}}"
+#endif
 
 #undef SUBTARGET_ASM_SPEC
 #define SUBTARGET_ASM_SPEC "\
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/linux.h gcc-3.4.1/gcc/config/rs6000/linux.h
--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h	2004-02-25 09:11:19.000000000 -0600
+++ gcc-3.4.1/gcc/config/rs6000/linux.h	2004-08-12 15:54:43.000000000 -0500
@@ -61,7 +61,11 @@
 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
 
 #undef	LINK_OS_DEFAULT_SPEC
+#ifdef USE_UCLIBC
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
+#else
 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+#endif
 
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h gcc-3.4.1/gcc/config/rs6000/sysv4.h
--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h	2004-06-10 01:39:50.000000000 -0500
+++ gcc-3.4.1/gcc/config/rs6000/sysv4.h	2004-08-12 15:54:43.000000000 -0500
@@ -947,6 +947,7 @@
   mcall-linux  : %(link_os_linux)       ; \
   mcall-gnu    : %(link_os_gnu)         ; \
   mcall-netbsd : %(link_os_netbsd)      ; \
+  mcall-linux-uclibc : %(link_os_linux_uclibc); \
   mcall-openbsd: %(link_os_openbsd)     ; \
                : %(link_os_default)     }"
 
@@ -1124,6 +1125,10 @@
   %{rdynamic:-export-dynamic} \
   %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
 
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+  %{rdynamic:-export-dynamic} \
+  %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
+
 #if defined(HAVE_LD_EH_FRAME_HDR)
 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 #endif
@@ -1290,6 +1295,7 @@
   { "link_os_sim",		LINK_OS_SIM_SPEC },			\
   { "link_os_freebsd",		LINK_OS_FREEBSD_SPEC },			\
   { "link_os_linux",		LINK_OS_LINUX_SPEC },			\
+  { "link_os_linux_uclibc",	LINK_OS_LINUX_UCLIBC_SPEC },		\
   { "link_os_gnu",		LINK_OS_GNU_SPEC },			\
   { "link_os_netbsd",		LINK_OS_NETBSD_SPEC },			\
   { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
diff -urN gcc-3.4.1-dist/gcc/config/sh/linux.h gcc-3.4.1/gcc/config/sh/linux.h
--- gcc-3.4.1-dist/gcc/config/sh/linux.h	2004-01-11 20:29:13.000000000 -0600
+++ gcc-3.4.1/gcc/config/sh/linux.h	2004-08-12 15:54:43.000000000 -0500
@@ -73,12 +73,21 @@
 #undef SUBTARGET_LINK_EMUL_SUFFIX
 #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
 #undef SUBTARGET_LINK_SPEC
+#ifdef USE_UCLIBC
+#define SUBTARGET_LINK_SPEC \
+  "%{shared:-shared} \
+   %{!static: \
+     %{rdynamic:-export-dynamic} \
+     %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+   %{static:-static}"
+#else
 #define SUBTARGET_LINK_SPEC \
   "%{shared:-shared} \
    %{!static: \
      %{rdynamic:-export-dynamic} \
      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
    %{static:-static}"
+#endif
 
 #undef LIB_SPEC
 #define LIB_SPEC \
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.1/gcc/config/sh/t-linux-uclibc
--- gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc	1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.4.1/gcc/config/sh/t-linux-uclibc	2004-08-12 15:54:43.000000000 -0500
@@ -0,0 +1,13 @@
+T_CFLAGS = -DUSE_UCLIBC
+
+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
+LIB1ASMFUNCS_CACHE = _ic_invalidate
+
+LIB2FUNCS_EXTRA=
+
+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
+MULTILIB_DIRNAMES= 
+MULTILIB_MATCHES = 
+MULTILIB_EXCEPTIONS=
+
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.1/gcc/config/sh/t-sh64-uclibc
--- gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc	1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.4.1/gcc/config/sh/t-sh64-uclibc	2004-08-12 15:54:43.000000000 -0500
@@ -0,0 +1,13 @@
+EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
+
+LIB1ASMFUNCS = \
+  _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
+  _shcompact_call_trampoline _shcompact_return_trampoline \
+  _shcompact_incoming_args _ic_invalidate _nested_trampoline \
+  _push_pop_shmedia_regs \
+  _udivdi3 _divdi3 _umoddi3 _moddi3
+
+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
+MULTILIB_MATCHES=
+MULTILIB_EXCEPTIONS=
diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc
--- gcc-3.4.1-dist/gcc/config/t-linux-uclibc	1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.4.1/gcc/config/t-linux-uclibc	2004-08-12 15:54:43.000000000 -0500
@@ -0,0 +1,15 @@
+T_CFLAGS = -DUSE_UCLIBC
+
+# Compile crtbeginS.o and crtendS.o with pic.
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
+# Compile libgcc2.a with pic.
+TARGET_LIBGCC2_CFLAGS = -fPIC
+
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
+# the symbol versions that glibc used.
+#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
+
+# Use unwind-dw2-fde
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
+  $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
--- gcc-3.4.1-dist/gcc/config.gcc	2004-04-21 10:12:35.000000000 -0500
+++ gcc-3.4.1/gcc/config.gcc	2004-08-12 15:59:46.000000000 -0500
@@ -664,6 +664,12 @@
 	extra_parts=""
 	use_collect2=yes
 	;;
+arm*-*-linux-uclibc*)		# ARM GNU/Linux with ELF - uClibc
+	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
+	tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
+	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+	gnu_ld=yes
+	;;
 arm*-*-linux*)			# ARM GNU/Linux with ELF
 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
@@ -725,6 +731,10 @@
 	tmake_file="cris/t-cris cris/t-elfmulti"
 	gas=yes
 	;;
+cris-*-linux-uclibc*)
+	tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
+	tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
+	;;
 cris-*-linux*)
 	tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
 	tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
@@ -988,6 +998,11 @@
 		thread_file='single'
 	fi
 	;;
+i[34567]86-*-linux*uclibc*)	# Intel 80386's running GNU/Linux
+				# with ELF format using uClibc
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
+	tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
+	;;
 i[34567]86-*-linux*)	# Intel 80386's running GNU/Linux
 			# with ELF format using glibc 2
 			# aka GNU/Linux C library 6
@@ -1547,6 +1562,16 @@
 	gnu_ld=yes
 	gas=yes
 	;;
+mips*-*-linux-uclibc*)			# Linux MIPS, either endian. uClibc
+        tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
+	case ${target} in
+        mipsisa32*-*)
+                target_cpu_default="MASK_SOFT_FLOAT"
+		tm_defines="MIPS_ISA_DEFAULT=32"
+                ;;
+        esac
+	tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
+	;;
 mips*-*-linux*)				# Linux MIPS, either endian.
         tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
 	case ${target} in
@@ -1764,6 +1789,10 @@
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
 	tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
 	;;
+powerpc-*-linux-uclibc*)
+	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
+	;;
 powerpc-*-linux*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
 	tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
@@ -1916,7 +1945,7 @@
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
 	;;
 sh-*-linux* | sh[2346lbe]*-*-linux*)
-	tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux"
+	tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver"
 	case ${target} in
 	sh*be-*-* | sh*eb-*-*) ;;
 	*)
@@ -1924,9 +1953,17 @@
 		tmake_file="${tmake_file} sh/t-le"
 		;;
 	esac
-	tmake_file="${tmake_file} sh/t-linux"
+	case ${target} in
+	*-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc" ;;
+	*) tmake_file="${tmake_file} t-linux sh/t-linux" ;;
+	esac
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
 	case ${target} in
+	sh64*-*-linux-uclibc*)
+		tmake_file="${tmake_file} sh/t-sh64-uclibc"
+		tm_file="${tm_file} sh/sh64.h"
+		extra_headers="shmedia.h ushmedia.h sshmedia.h"
+		;;
 	sh64*)
 		tmake_file="${tmake_file} sh/t-sh64"
 		tm_file="${tm_file} sh/sh64.h"
diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4
--- gcc-3.4.1-dist/libtool.m4	2004-05-18 04:08:37.000000000 -0500
+++ gcc-3.4.1/libtool.m4	2004-08-12 15:54:43.000000000 -0500
@@ -689,6 +689,11 @@
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
+linux-uclibc*)
+  lt_cv_deplibs_check_method=pass_all
+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+  ;;
+
 netbsd*)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig
--- gcc-3.4.1-dist/ltconfig	2004-03-05 15:05:41.000000000 -0600
+++ gcc-3.4.1/ltconfig	2004-08-12 15:55:48.000000000 -0500
@@ -602,6 +602,7 @@
 
 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 case $host_os in
+linux-uclibc*) ;;
 linux-gnu*) ;;
 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 esac
@@ -1262,6 +1263,24 @@
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
+linux-uclibc*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  # Note: copied from linux-gnu, and may not be appropriate.
+  hardcode_into_libs=yes
+  # Assume using the uClibc dynamic linker.
+  dynamic_linker="uClibc ld.so"
+  ;;
+
 netbsd*)
   need_lib_prefix=no
   need_version=no
+3246 −0

File added.

Preview size limit exceeded, changes collapsed.

+47 −0
Original line number Diff line number Diff line
# DP: Build and install libstdc++_pic.a library.

--- gcc/libstdc++-v3/src/Makefile.am~	2003-02-28 09:21:05.000000000 +0100
+++ gcc/libstdc++-v3/src/Makefile.am	2003-02-28 09:28:50.000000000 +0100
@@ -224,6 +224,10 @@
 	  @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
 
 
+install-exec-local:
+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
 # Added bits to build debug library.
 if GLIBCPP_BUILD_DEBUG
 all-local: build_debug

--- gcc/libstdc++-v3/src/Makefile.in~	2004-02-21 09:55:48.000000000 +0100
+++ gcc/libstdc++-v3/src/Makefile.in	2004-02-21 09:59:34.000000000 +0100
@@ -585,7 +585,7 @@
 
 install-data-am: install-data-local
 
-install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
 
 install-info: install-info-am
 
@@ -618,6 +618,7 @@
 	distclean-tags distdir dvi dvi-am info info-am install \
 	install-am install-data install-data-am install-data-local \
 	install-exec install-exec-am install-info install-info-am \
+	install-exec-local \
 	install-man install-strip install-toolexeclibLTLIBRARIES \
 	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
@@ -707,6 +708,11 @@
 install_debug:
 	(cd ${debugdir} && $(MAKE) \
 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
+
+install-exec-local:
+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
+79 −0
Original line number Diff line number Diff line
--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole	2004-01-13 08:24:37.000000000 -0500
+++ gcc-3.4.0/gcc/config/arm/arm.md	2004-04-24 18:18:04.000000000 -0400
@@ -8810,13 +8810,16 @@
    (set_attr "length" "4,8,8")]
 )
 
+; Try to convert LDR+LDR+arith into [add+]LDM+arith
+; On XScale, LDM is always slower than two LDRs, so only do this if
+; optimising for size.
 (define_insn "*arith_adjacentmem"
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(match_operator:SI 1 "shiftable_operator"
 	 [(match_operand:SI 2 "memory_operand" "m")
 	  (match_operand:SI 3 "memory_operand" "m")]))
    (clobber (match_scratch:SI 4 "=r"))]
-  "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
+  "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
   "*
   {
     rtx ldm[3];
@@ -8851,6 +8854,8 @@
       }
    if (val1 && val2)
       {
+	/* This would be a loss on a Harvard core, but adjacent_mem_locations()
+	   will prevent it from happening.  */
 	rtx ops[3];
 	ldm[0] = ops[0] = operands[4];
 	ops[1] = XEXP (XEXP (operands[2], 0), 0);
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole	2004-04-24 18:16:25.000000000 -0400
+++ gcc-3.4.0/gcc/config/arm/arm.c	2004-04-24 18:18:04.000000000 -0400
@@ -4593,8 +4593,11 @@
 	 arith_adjacentmem pattern to output an overlong sequence.  */
       if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
 	return 0;
-      
-      return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
+
+      /* For Harvard cores, only accept pairs where one offset is zero.
+         See comment in load_multiple_sequence.  */
+      return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4)
+	&& (!arm_ld_sched || val0 == 0 || val1 == 0);
     }
   return 0;
 }
@@ -4838,6 +4841,11 @@
       *load_offset = unsorted_offsets[order[0]];
     }
 
+  /* For XScale a two-word LDM is a performance loss, so only do this if
+     size is more important.  See comments in arm_gen_load_multiple.  */
+  if (nops == 2 && arm_tune_xscale && !optimize_size)
+    return 0;
+
   if (unsorted_offsets[order[0]] == 0)
     return 1; /* ldmia */
 
@@ -5064,6 +5072,11 @@
       *load_offset = unsorted_offsets[order[0]];
     }
 
+  /* For XScale a two-word LDM is a performance loss, so only do this if
+     size is more important.  See comments in arm_gen_load_multiple.  */
+  if (nops == 2 && arm_tune_xscale && !optimize_size)
+    return 0;
+
   if (unsorted_offsets[order[0]] == 0)
     return 1; /* stmia */
 
--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole	2003-07-05 01:27:22.000000000 -0400
+++ gcc-3.4.0/gcc/genpeep.c	2004-04-24 18:18:04.000000000 -0400
@@ -381,6 +381,7 @@
   printf ("#include \"recog.h\"\n");
   printf ("#include \"except.h\"\n\n");
   printf ("#include \"function.h\"\n\n");
+  printf ("#include \"flags.h\"\n\n");
 
   printf ("#ifdef HAVE_peephole\n");
   printf ("extern rtx peep_operand[];\n\n");
+119 −0
Original line number Diff line number Diff line
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm	2004-02-27 09:51:05.000000000 -0500
+++ gcc-3.4.0/gcc/config/arm/arm.c	2004-04-24 18:16:25.000000000 -0400
@@ -8520,6 +8520,26 @@
   return_used_this_function = 0;  
 }
 
+/* Return the number (counting from 0) of
+   the least significant set bit in MASK.  */
+
+#ifdef __GNUC__
+inline
+#endif
+static int
+number_of_first_bit_set (mask)
+     int mask;
+{
+  int bit;
+
+  for (bit = 0;
+       (mask & (1 << bit)) == 0;
+       ++bit)
+    continue;
+
+  return bit;
+}
+
 const char *
 arm_output_epilogue (rtx sibling)
 {
@@ -8753,27 +8773,47 @@
 	  saved_regs_mask |=   (1 << PC_REGNUM);
 	}
 
-      /* Load the registers off the stack.  If we only have one register
-	 to load use the LDR instruction - it is faster.  */
-      if (saved_regs_mask == (1 << LR_REGNUM))
-	{
-	  /* The exception handler ignores the LR, so we do
-	     not really need to load it off the stack.  */
-	  if (eh_ofs)
-	    asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
-	  else
-	    asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
-	}
-      else if (saved_regs_mask)
+      if (saved_regs_mask)
 	{
-	  if (saved_regs_mask & (1 << SP_REGNUM))
-	    /* Note - write back to the stack register is not enabled
-	       (ie "ldmfd sp!...").  We know that the stack pointer is
-	       in the list of registers and if we add writeback the
-	       instruction becomes UNPREDICTABLE.  */
-	    print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
+	  /* Load the registers off the stack.  If we only have one register
+	     to load use the LDR instruction - it is faster.  */
+	  if (bit_count (saved_regs_mask) == 1)
+	    {
+	      int reg = number_of_first_bit_set (saved_regs_mask);
+
+	      switch (reg)
+		{
+		case SP_REGNUM:
+		  /* Mustn't use base writeback when loading SP.  */
+		  asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
+		  break;
+		  
+		case LR_REGNUM:
+		  if (eh_ofs)
+		    {
+		      /* The exception handler ignores the LR, so we do
+			 not really need to load it off the stack.  */
+		      asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
+		      break;
+		    }
+		  /* else fall through */
+		  
+		default:
+		  asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
+		  break;
+		}
+	    }
 	  else
-	    print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
+	    {
+	      if (saved_regs_mask & (1 << SP_REGNUM))
+		/* Note - write back to the stack register is not enabled
+		   (ie "ldmfd sp!...").  We know that the stack pointer is
+		   in the list of registers and if we add writeback the
+		   instruction becomes UNPREDICTABLE.  */
+		print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
+	      else
+		print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
+	    }
 	}
 
       if (current_function_pretend_args_size)
@@ -11401,22 +11441,6 @@
     }
 }
 
-/* Return the number (counting from 0) of
-   the least significant set bit in MASK.  */
-
-inline static int
-number_of_first_bit_set (int mask)
-{
-  int bit;
-
-  for (bit = 0;
-       (mask & (1 << bit)) == 0;
-       ++bit)
-    continue;
-
-  return bit;
-}
-
 /* Generate code to return from a thumb function.
    If 'reg_containing_return_addr' is -1, then the return address is
    actually on the stack, at the stack pointer.  */
Loading