summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2008-05-13 09:26:04 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2008-05-13 09:26:04 +0000
commitdfeffe4b3ad7c811658cd40a7e6b0b846b1a7178 (patch)
treeb7d6a8888e3b1bed5388ad40c41f3fa9141664d4 /patches
parent1ed7fb5023e6a7934fc096d03c115069a8f47494 (diff)
downloadOSELAS.Toolchain-dfeffe4b3ad7c811658cd40a7e6b0b846b1a7178.tar.gz
OSELAS.Toolchain-dfeffe4b3ad7c811658cd40a7e6b0b846b1a7178.tar.xz
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/branches/OSELAS.Toolchain-mkl@6326 f8d472c7-5700-0410-ac5a-87979cec3adf
Diffstat (limited to 'patches')
-rw-r--r--patches/glibc-2.7/generic/configure-sane_readelf.diff119
-rw-r--r--patches/glibc-2.7/generic/configure_in-sane_readelf.diff35
-rw-r--r--patches/glibc-2.7/generic/cross_timezone.diff477
-rw-r--r--patches/glibc-2.7/generic/glibc-2.5_stdlib_longlong.h37
-rw-r--r--patches/glibc-2.7/generic/glibc-configure-apple-as.patch47
-rw-r--r--patches/glibc-2.7/generic/glibc-configure-old-gcc.patch17
-rw-r--r--patches/glibc-2.7/generic/make-install-lib-all.patch45
-rw-r--r--patches/glibc-2.7/generic/quilt-dummy.patch10
-rw-r--r--patches/glibc-2.7/generic/series9
9 files changed, 785 insertions, 11 deletions
diff --git a/patches/glibc-2.7/generic/configure-sane_readelf.diff b/patches/glibc-2.7/generic/configure-sane_readelf.diff
new file mode 100644
index 0000000..f833609
--- /dev/null
+++ b/patches/glibc-2.7/generic/configure-sane_readelf.diff
@@ -0,0 +1,119 @@
+---
+ configure | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 88 insertions(+), 2 deletions(-)
+
+Index: glibc-2.7/configure
+===================================================================
+--- glibc-2.7.orig/configure
++++ glibc-2.7/configure
+@@ -5981,6 +5981,92 @@ _ACEOF
+ fi
+ fi
+
++ # Extract the first word of "$target_alias-readelf", so it can be a program name with args.
++set dummy $target_alias-readelf; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_READELF+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$READELF"; then
++ ac_cv_prog_READELF="$READELF" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_READELF="$target_alias-readelf"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++READELF=$ac_cv_prog_READELF
++if test -n "$READELF"; then
++ { echo "$as_me:$LINENO: result: $READELF" >&5
++echo "${ECHO_T}$READELF" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++if test -z "$ac_cv_prog_READELF"; then
++ if test "$build" = "$target"; then
++ ac_ct_READELF=$READELF
++ # Extract the first word of "readelf", so it can be a program name with args.
++set dummy readelf; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_READELF+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_READELF"; then
++ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_READELF="readelf"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_prog_ac_ct_READELF" && ac_cv_prog_ac_ct_READELF="readelf"
++fi
++fi
++ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
++if test -n "$ac_ct_READELF"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_READELF" >&5
++echo "${ECHO_T}$ac_ct_READELF" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++ READELF=ac_ct_READELF
++ else
++ READELF="readelf"
++ fi
++else
++ READELF="$ac_cv_prog_READELF"
++fi
++
++
+ { echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
+ echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6; }
+ if test "${libc_cv_initfini_array+set}" = set; then
+@@ -6000,7 +6086,7 @@ EOF
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+ then
+- if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
++ if ${READELF} -S conftest | fgrep INIT_ARRAY > /dev/null; then
+ libc_cv_initfini_array=yes
+ else
+ libc_cv_initfini_array=no
+@@ -6300,7 +6386,7 @@ EOF
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+ then
+- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
++ if ${READELF} -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
+ libc_cv_z_combreloc=yes
+ else
+ libc_cv_z_combreloc=no
diff --git a/patches/glibc-2.7/generic/configure_in-sane_readelf.diff b/patches/glibc-2.7/generic/configure_in-sane_readelf.diff
new file mode 100644
index 0000000..0e7d29a
--- /dev/null
+++ b/patches/glibc-2.7/generic/configure_in-sane_readelf.diff
@@ -0,0 +1,35 @@
+---
+ configure.in | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+Index: glibc-2.7/configure.in
+===================================================================
+--- glibc-2.7.orig/configure.in
++++ glibc-2.7/configure.in
+@@ -1347,6 +1347,8 @@ EOF
+ fi
+ fi
+
++ AC_CHECK_TARGET_TOOL([READELF],[readelf],[readelf],[$PATH])
++
+ AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
+ libc_cv_initfini_array, [dnl
+ cat > conftest.c <<EOF
+@@ -1358,7 +1360,7 @@ EOF
+ if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
+ -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
+ then
+- if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
++ if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
+ libc_cv_initfini_array=yes
+ else
+ libc_cv_initfini_array=no
+@@ -1543,7 +1545,7 @@ dnl cross-platform since the gcc used ca
+ dnl introducing new options this is not easily doable. Instead use a tool
+ dnl which always is cross-platform: readelf. To detect whether -z combreloc
+ dnl look for a section named .rel.dyn.
+- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
++ if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
+ libc_cv_z_combreloc=yes
+ else
+ libc_cv_z_combreloc=no
diff --git a/patches/glibc-2.7/generic/cross_timezone.diff b/patches/glibc-2.7/generic/cross_timezone.diff
new file mode 100644
index 0000000..75ea2ab
--- /dev/null
+++ b/patches/glibc-2.7/generic/cross_timezone.diff
@@ -0,0 +1,477 @@
+From: http://trac.cross-lfs.org/browser/branches/clfs-sysroot/patches/glibc-2.6.1-sysdep_cancel-1.patch
+
+Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
+Date: 2006-11-26
+Initial Package Version: 2.5
+Origin: Joe Ciccone
+Upstream Status: Unknown
+Description: Adds native compile support to the build system then uses that
+ support to build zic-native, for installing timezone info,
+ rpcgen-native, for building librpcsvc.a, and localedef-native,
+ for creating the locale-archive.
+
+---
+ Makeconfig | 14 ++++++++++++++
+ Makerules | 9 ++++++++-
+ Rules | 9 ++++++++-
+ iconv/Makefile | 4 ++++
+ iconvdata/Makefile | 18 ++++++++++--------
+ include-native/bits/libc-tsd.h | 3 +++
+ include-native/config.h | 1 +
+ include-native/gnu/stubs.h | 1 +
+ include-native/intl/loadinfo.h | 4 ++++
+ include-native/libintl.h | 13 +++++++++++++
+ include-native/symbol-hacks.h | 1 +
+ include-native/tls.h | 11 +++++++++++
+ locale/Makefile | 9 +++++++++
+ localedata/Makefile | 5 +++++
+ malloc/Makefile | 5 -----
+ sunrpc/Makefile | 23 ++++++++++++++++++-----
+ timezone/Makefile | 14 ++++++++++----
+ 17 files changed, 120 insertions(+), 24 deletions(-)
+
+Index: glibc-2.7/iconv/Makefile
+===================================================================
+--- glibc-2.7.orig/iconv/Makefile
++++ glibc-2.7/iconv/Makefile
+@@ -57,6 +57,9 @@ distribute = gconv_builtin.h gconv_int.h
+ iconvconfig.h
+
+ others = iconv_prog iconvconfig
++ifneq ($(cross-compiling),no)
++others-native = iconvconfig-native
++endif
+ install-others-programs = $(inst_bindir)/iconv
+ install-sbin = iconvconfig
+
+@@ -79,6 +82,7 @@ $(inst_bindir)/iconv: $(objpfx)iconv_pro
+
+ $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
+ $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
++$(objpfx)iconvconfig-native: $(iconvconfig-modules:%=$(objpfx)%-native.o)
+
+ ifneq ($(cross-compiling),yes)
+ xtests: test-iconvconfig
+Index: glibc-2.7/iconvdata/Makefile
+===================================================================
+--- glibc-2.7.orig/iconvdata/Makefile
++++ glibc-2.7/iconvdata/Makefile
+@@ -315,23 +315,25 @@ $(objpfx)iso8859-7jp.stmp: $(charmaps)/I
+
+ headers: $(addprefix $(objpfx), $(generated-modules:=.h))
+
++ifeq ($(cross-compiling),no)
++iconvconfig-cmd = LC_ALL=C LANGUAGE=C \
++ $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
++ $(common-objpfx)iconv/iconvconfig
++else
++iconvconfig-cmd = LC_ALL=C LANGUAGE=C \
++ $(common-objpfx)iconv/iconvconfig-native
++endif
++
+ $(addprefix $(inst_gconvdir)/, $(modules.so)): \
+ $(inst_gconvdir)/%: $(objpfx)% $(+force)
+ $(do-install-program)
+ $(inst_gconvdir)/gconv-modules: gconv-modules $(+force)
+ $(do-install)
+-ifeq (no,$(cross-compiling))
+ # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
+ # if this libc has more gconv modules than the previously installed one.
+ if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
+- LC_ALL=C LANGUAGE=C \
+- $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
+- $(common-objpfx)iconv/iconvconfig \
+- $(addprefix --prefix=,$(install_root)); \
++ $(iconvconfig-cmd) $(addprefix --prefix=,$(install_root)); \
+ fi
+-else
+- @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
+-endif
+
+ endif # build-shared = yes
+
+Index: glibc-2.7/include-native/bits/libc-tsd.h
+===================================================================
+--- /dev/null
++++ glibc-2.7/include-native/bits/libc-tsd.h
+@@ -0,0 +1,3 @@
++#ifndef __libc_tsd_define
++#define __libc_tsd_define(A,B)
++#endif
+Index: glibc-2.7/include-native/config.h
+===================================================================
+--- /dev/null
++++ glibc-2.7/include-native/config.h
+@@ -0,0 +1 @@
++/* Empty */
+Index: glibc-2.7/include-native/gnu/stubs.h
+===================================================================
+--- /dev/null
++++ glibc-2.7/include-native/gnu/stubs.h
+@@ -0,0 +1 @@
++/* Empty */
+Index: glibc-2.7/include-native/intl/loadinfo.h
+===================================================================
+--- /dev/null
++++ glibc-2.7/include-native/intl/loadinfo.h
+@@ -0,0 +1,4 @@
++#ifndef LOADINFO_H
++#define LOADINFO_H
++struct loaded_l10nfile;
++#endif
+Index: glibc-2.7/include-native/libintl.h
+===================================================================
+--- /dev/null
++++ glibc-2.7/include-native/libintl.h
+@@ -0,0 +1,13 @@
++#include_next <libintl.h>
++
++#ifndef _
++#define _(X) (X)
++#endif
++
++#ifndef N_
++#define N_(X) (X)
++#endif
++
++#ifndef _libc_intl_domainname
++#define _libc_intl_domainname "libc"
++#endif
+Index: glibc-2.7/include-native/symbol-hacks.h
+===================================================================
+--- /dev/null
++++ glibc-2.7/include-native/symbol-hacks.h
+@@ -0,0 +1 @@
++/* Empty */
+Index: glibc-2.7/include-native/tls.h
+===================================================================
+--- /dev/null
++++ glibc-2.7/include-native/tls.h
+@@ -0,0 +1,11 @@
++#ifndef _include_tls_h
++#define _include_tls_h 1
++
++#if USE_TLS && HAVE___THREAD \
++ && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++# define USE___THREAD 1
++#else
++# define USE___THREAD 0
++#endif
++
++#endif
+Index: glibc-2.7/locale/Makefile
+===================================================================
+--- glibc-2.7.orig/locale/Makefile
++++ glibc-2.7/locale/Makefile
+@@ -44,6 +44,9 @@ categories = ctype messages monetary num
+ aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
+ xlocale localename global-locale coll-lookup
+ others = localedef locale
++ifneq ($(cross-compiling),no)
++others-native = localedef-native
++endif
+ #others-static = localedef locale
+ install-bin = localedef locale
+ extra-objs = $(localedef-modules:=.o) $(localedef-aux:=.o) \
+@@ -81,6 +84,12 @@ $(objpfx)localedef: $(localedef-aux:%=$(
+ $(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
+ $(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
+
++ifneq ($(cross-compiling),no)
++$(objpfx)localedef-native: $(localedef-modules:%=$(objpfx)%-native.o)
++$(objpfx)localedef-native: $(localedef-aux:%=$(objpfx)%-native.o)
++$(objpfx)localedef-native: $(lib-modules:%=$(objpfx)%-native.o)
++endif
++
+ C-translit.h: C-translit.h.in gen-translit.pl
+ $(PERL) gen-translit.pl < $< > $@.tmp
+ mv -f $@.tmp $@
+Index: glibc-2.7/localedata/Makefile
+===================================================================
+--- glibc-2.7.orig/localedata/Makefile
++++ glibc-2.7/localedata/Makefile
+@@ -206,8 +206,13 @@ include SUPPORTED
+ INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
+
+ # Sometimes the whole collection of locale files should be installed.
++ifeq ($(cross-compiling),no)
+ LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
+ $(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef
++else
++LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
++$(common-objpfx)locale/localedef-native
++endif
+ install-locales: $(INSTALL-SUPPORTED-LOCALES)
+
+ install-locales-dir:
+Index: glibc-2.7/Makeconfig
+===================================================================
+--- glibc-2.7.orig/Makeconfig
++++ glibc-2.7/Makeconfig
+@@ -445,6 +445,13 @@ ifndef +link-static
+ $(common-objpfx)libc% $(+postinit),$^) \
+ $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit)
+ endif
++# Command for linking programs against the host system.
++ifndef +link-native
+++link-native = $(BUILD_CC) -static -g -o $@ $^ \
++ $(LDFLAGS) $(LDFLAGS-$(@F)) \
++ $(combreloc-LDFLAGS) $(relro-LDFLAGS) \
++ $(link-extra-libs)
++endif
+ # Command for statically linking bounded-pointer programs with the C library.
+ ifndef +link-bounded
+ +link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \
+@@ -658,6 +665,8 @@ endif # $(+cflags) == ""
+ $(+sysdep-includes) $(includes) \
+ $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
+
+++includes-native = -I$(..)include-native -I$(objpfx) -I.
++
+ # Since libio has several internal header files, we use a -I instead
+ # of many little headers in the include directory.
+ libio-include = -I$(..)libio
+@@ -672,10 +681,15 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+incl
+ $(foreach lib,$(libof-$(basename $(@F))) \
+ $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
+ $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
++CPPFLAGS-native = -D_GNU_SOURCE $($(subdir)-CPPFLAGS) $(+includes-native) $(defines) \
++ $(CPPFLAGS-$(suffix $@)) -include $(..)include/libc-symbols.h \
++ $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
+ override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
+ $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
+ $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
+ $(CFLAGS-$(@F))
++override CFLAGS-native = -std=gnu99 $(default_cflags) $(+gccwarn-c) \
++ $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
+ override CXXFLAGS = $(c++-sysincludes) \
+ $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
+ $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
+Index: glibc-2.7/Makerules
+===================================================================
+--- glibc-2.7.orig/Makerules
++++ glibc-2.7/Makerules
+@@ -292,6 +292,9 @@ endef
+ object-suffixes-left := $(all-object-suffixes)
+ include $(o-iterator)
+
++$(objpfx)%-native.o: %.c $(before-compile)
++ $(native-compile-command.c)
++
+ # Omit the objpfx rules when building in the source tree, because
+ # objpfx is empty and so these rules just override the ones above.
+ ifdef objpfx
+@@ -368,6 +371,8 @@ compile-command.S = $(compile.S) $(OUTPU
+ compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags)
+ compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
+ compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags)
++# Native commands
++native-compile-command.c = $(native-compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
+
+ # GCC can grok options after the file name, and it looks nicer that way.
+ compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
+@@ -377,6 +382,8 @@ compile.S = $(CC) $< -c $(CPPFLAGS) $(S-
+ COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
+ $(ASFLAGS) $(ASFLAGS-$(suffix $@))
+ COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
++# Native commands
++native-compile.c = $(BUILD_CC) -g $< -c $(CFLAGS-native) $(CPPFLAGS-native)
+
+ # We need this for the output to go in the right place. It will default to
+ # empty if make was configured to work with a cc that can't grok -c and -o
+@@ -1178,7 +1185,7 @@ define native-compile
+ $(make-target-directory)
+ $(patsubst %/,cd % &&,$(objpfx)) \
+ $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
+- $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
++ $(addprefix $(shell pwd)/, $^) -o $(@F)
+ endef
+
+ # Command to compile $< in $(common-objdir) using the native libraries.
+Index: glibc-2.7/malloc/Makefile
+===================================================================
+--- glibc-2.7.orig/malloc/Makefile
++++ glibc-2.7/malloc/Makefile
+@@ -73,10 +73,6 @@ address-width=18
+ endif
+ endif
+
+-# Unless we get a test for the availability of libgd which also works
+-# for cross-compiling we disable the memusagestat generation in this
+-# situation.
+-ifneq ($(cross-compiling),yes)
+ # If the gd library is available we build the `memusagestat' program.
+ ifneq ($(LIBGD),no)
+ others: $(objpfx)memusage
+@@ -91,7 +87,6 @@ extra-objs += memusagestat.o
+ # is to presume that the standard system headers will be ok for this file.
+ $(objpfx)memusagestat.o: sysincludes = # nothing
+ endif
+-endif
+
+ # Another goal which can be used to override the configure decision.
+ .PHONY: do-memusagestat
+Index: glibc-2.7/Rules
+===================================================================
+--- glibc-2.7.orig/Rules
++++ glibc-2.7/Rules
+@@ -87,7 +87,7 @@ common-generated += dummy.o dummy.c
+
+ .PHONY: others tests
+ ifeq ($(build-programs),yes)
+-others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
++others: $(addprefix $(objpfx),$(others) $(others-native) $(sysdep-others) $(extra-objs))
+ else
+ others: $(addprefix $(objpfx),$(extra-objs))
+ endif
+@@ -106,9 +106,11 @@ endif
+ ifeq ($(build-programs),yes)
+ binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
+ binaries-static = $(others-static) $(tests-static) $(xtests-static)
++binaries-native = $(others-native)
+ else
+ binaries-all = $(tests) $(xtests) $(test-srcs)
+ binaries-static =
++binaries-native =
+ endif
+
+ binaries-shared = $(filter-out $(binaries-static), $(binaries-all))
+@@ -127,6 +129,11 @@ $(addprefix $(objpfx),$(binaries-static)
+ $(+link-static)
+ endif
+
++ifneq "$(strip $(binaries-native))" ""
++$(addprefix $(objpfx),$(binaries-native)): %: %.o
++ $(+link-native)
++endif
++
+ ifeq ($(build-bounded),yes)
+ binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
+ $(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
+Index: glibc-2.7/sunrpc/Makefile
+===================================================================
+--- glibc-2.7.orig/sunrpc/Makefile
++++ glibc-2.7/sunrpc/Makefile
+@@ -70,6 +70,9 @@ routines := auth_none auth_unix authuxpr
+ clnt_unix svc_unix create_xid xdr_intXX_t
+
+ others := rpcinfo
++ifneq ($(cross-compiling),no)
++others-native := rpcgen-native
++endif
+ install-bin := rpcgen
+ install-sbin := rpcinfo
+ rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
+@@ -98,15 +101,12 @@ otherlibs += $(nssobjdir)/libnss_files.a
+ $(resolvobjdir)/libresolv.a
+ endif
+
+-ifeq (no,$(cross-compiling))
+-# We can only build this library if we can run the rpcgen we build.
+ headers += $(rpcsvc:%.x=rpcsvc/%.h)
+ extra-libs := librpcsvc
+ extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
+ librpcsvc-routines = $(rpcsvc:%.x=x%)
+ librpcsvc-inhibit-o = .os # Build no shared rpcsvc library.
+ omit-deps = $(librpcsvc-routines)
+-endif
+
+ CFLAGS-xbootparam_prot.c = -Wno-unused $(PIC-ccflag)
+ CFLAGS-xnlm_prot.c = -Wno-unused $(PIC-ccflag)
+@@ -136,13 +136,26 @@ $(objpfx)rpcgen: $(addprefix $(objpfx),$
+ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
+ $(+link)
+
++ifneq ($(cross-compiling),no)
++rpcgen.c:
++ touch rpcgen.c
++
++$(objpfx)rpcgen-native: $(addprefix $(objpfx),$(rpcgen-objs:%.o=%-native.o))
++endif
++
+ # This makes sure -DNOT_IN_libc is passed for all these modules.
+ cpp-srcs-left := $(rpcgen-objs:.o=.c)
+ lib := nonlib
+ include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+
+ # Tell rpcgen where to find the C preprocessor.
++ifeq ($(cross-compiling),no)
+ rpcgen-cmd = CPP='$(CC) -E -x c-header' $(built-program-cmd) -Y ../scripts
++rpcgen = $(objpfx)rpcgen
++else
++rpcgen-cmd = CPP='$(CC) -E -x c-header' $(objpfx)rpcgen-native -Y ../scripts
++rpcgen = $(objpfx)rpcgen-native
++endif
+
+ # Install the rpc data base file.
+ $(inst_sysconfdir)/rpc: etc.rpc $(+force)
+@@ -153,7 +166,7 @@ $(inst_sysconfdir)/rpc: etc.rpc $(+force
+ # relinked.
+ $(rpcsvc:%.x=$(objpfx)rpcsvc/%.h): $(objpfx)rpcsvc/%.h: $(objpfx)rpcsvc/%.stmp
+ @:
+-$(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(objpfx)rpcgen
++$(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(rpcgen)
+ $(make-target-directory)
+ -@rm -f ${@:stmp=T} $@
+ $(rpcgen-cmd) -h $< -o ${@:stmp=T}
+@@ -163,7 +176,7 @@ $(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(obj
+ # Generate the rpcsvc XDR functions with rpcgen.
+ $(rpcsvc:%.x=$(objpfx)x%.c): $(objpfx)x%.c: $(objpfx)x%.stmp
+ @:
+-$(objpfx)x%.stmp: rpcsvc/%.x $(objpfx)rpcgen
++$(objpfx)x%.stmp: rpcsvc/%.x $(rpcgen)
+ -@rm -f ${@:stmp=T} $@
+ $(rpcgen-cmd) -c $< -o ${@:stmp=T}
+ $(move-if-change) $(@:stmp=T) $(@:stmp=c)
+Index: glibc-2.7/timezone/Makefile
+===================================================================
+--- glibc-2.7.orig/timezone/Makefile
++++ glibc-2.7/timezone/Makefile
+@@ -28,6 +28,9 @@ distribute := tzfile.h private.h scheck.
+ extra-objs := scheck.o ialloc.o
+
+ others := zdump zic
++ifneq ($(cross-compiling),no)
++others-native := zic-native
++endif
+ tests := test-tz tst-timezone
+
+ tzbases := africa antarctica asia australasia europe northamerica \
+@@ -69,13 +72,10 @@ installed-posixrules-file := $(firstword
+ $(addprefix $(inst_zonedir)/, \
+ $(posixrules-file)))
+
+-ifeq ($(cross-compiling),no)
+-# Don't try to install the zoneinfo files since we can't run zic.
+ install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
+ $(zonenames:%=posix/%) \
+ $(zonenames:%=right/%)) \
+ $(installed-localtime-file) $(installed-posixrules-file)
+-endif
+
+ ifeq ($(have-ksh),yes)
+ install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
+@@ -128,7 +128,11 @@ echo-zonenames:
+ # We have to use `-d $(inst_zonedir)' to explictly tell zic where to
+ # place the output files although $(zonedir) is compiled in. But the
+ # user might have set $(install_root) on the command line of `make install'.
++ifeq ($(cross-compiling),no)
+ zic-cmd = $(built-program-cmd) -d $(inst_zonedir)
++else
++zic-cmd = $(common-objpfx)/timezone/zic-native -d $(inst_zonedir)
++endif
+ tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \
+ -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $<
+
+@@ -158,8 +162,10 @@ $(installed-posixrules-file): $(inst_zon
+ $(zic-cmd) -p $(posixrules)
+ endif
+
+-
+ $(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
++ifneq ($(cross-compiling),no)
++$(objpfx)zic-native: $(objpfx)scheck-native.o $(objpfx)ialloc-native.o
++endif
+
+ tz-cflags = -DTZDIR='"$(zonedir)"' \
+ -DTZDEFAULT='"$(localtime-file)"' \
diff --git a/patches/glibc-2.7/generic/glibc-2.5_stdlib_longlong.h b/patches/glibc-2.7/generic/glibc-2.5_stdlib_longlong.h
new file mode 100644
index 0000000..3d51974
--- /dev/null
+++ b/patches/glibc-2.7/generic/glibc-2.5_stdlib_longlong.h
@@ -0,0 +1,37 @@
+---
+ stdlib/longlong.h | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+Index: glibc-2.7/stdlib/longlong.h
+===================================================================
+--- glibc-2.7.orig/stdlib/longlong.h
++++ glibc-2.7/stdlib/longlong.h
+@@ -205,6 +205,14 @@ UDItype __umulsidi3 (USItype, USItype);
+ "rI" ((USItype) (bh)), \
+ "r" ((USItype) (al)), \
+ "rI" ((USItype) (bl)) __CLOBBER_CC)
++/* v3m and all higher arches have long multiply support. */
++#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)
++#define umul_ppmm(xh, xl, a, b) \
++ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
++#define UMUL_TIME 5
++#define smul_ppmm(xh, xl, a, b) \
++ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
++#else
+ #define umul_ppmm(xh, xl, a, b) \
+ {register USItype __t0, __t1, __t2; \
+ __asm__ ("%@ Inlined umul_ppmm\n" \
+@@ -226,7 +234,13 @@ UDItype __umulsidi3 (USItype, USItype);
+ : "r" ((USItype) (a)), \
+ "r" ((USItype) (b)) __CLOBBER_CC );}
+ #define UMUL_TIME 20
++#endif
+ #define UDIV_TIME 100
++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
++#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
++#define COUNT_LEADING_ZEROS_0 32
++#endif
++
+ #endif /* __arm__ */
+
+ #if defined (__hppa) && W_TYPE_SIZE == 32
diff --git a/patches/glibc-2.7/generic/glibc-configure-apple-as.patch b/patches/glibc-2.7/generic/glibc-configure-apple-as.patch
new file mode 100644
index 0000000..a0b26b9
--- /dev/null
+++ b/patches/glibc-2.7/generic/glibc-configure-apple-as.patch
@@ -0,0 +1,47 @@
+http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
+http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
+
+The following makes it possible to configure glibc-2.3.2 on Mac OS X,
+where the assembler but doesn't understand the --version flag.
+
+Fixes the symptom
+checking whether ld is GNU ld... no
+checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
+checking version of /usr/libexec/gcc/darwin/ppc/as...
+<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
+
+---
+ configure | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: glibc-2.7/configure
+===================================================================
+--- glibc-2.7.orig/configure
++++ glibc-2.7/configure
+@@ -4524,7 +4524,7 @@ else
+ # Found it, now check the version.
+ { echo "$as_me:$LINENO: checking version of $AS" >&5
+ echo $ECHO_N "checking version of $AS... $ECHO_C" >&6; }
+- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 2.1[3-9]*)
+@@ -4535,7 +4535,7 @@ echo $ECHO_N "checking version of $AS...
+ { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+ echo "${ECHO_T}$ac_prog_version" >&6; }
+ fi
+-if test $ac_verc_fail = yes; then
++if test $ac_verc_fail = yes -a -z "$enable_hacker_mode"; then
+ AS=: critic_missing="$critic_missing as"
+ fi
+
+@@ -4598,7 +4598,7 @@ echo $ECHO_N "checking version of $LD...
+ { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+ echo "${ECHO_T}$ac_prog_version" >&6; }
+ fi
+-if test $ac_verc_fail = yes; then
++if test $ac_verc_fail = yes -a -z "$enable_hacker_mode"; then
+ LD=: critic_missing="$critic_missing ld"
+ fi
+
diff --git a/patches/glibc-2.7/generic/glibc-configure-old-gcc.patch b/patches/glibc-2.7/generic/glibc-configure-old-gcc.patch
new file mode 100644
index 0000000..b38d79f
--- /dev/null
+++ b/patches/glibc-2.7/generic/glibc-configure-old-gcc.patch
@@ -0,0 +1,17 @@
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: glibc-2.7/configure
+===================================================================
+--- glibc-2.7.orig/configure
++++ glibc-2.7/configure
+@@ -4716,7 +4716,7 @@ echo $ECHO_N "checking version of $CC...
+ { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+ echo "${ECHO_T}$ac_prog_version" >&6; }
+ fi
+-if test $ac_verc_fail = yes; then
++if test $ac_verc_fail = yes -a -z "$enable_hacker_mode"; then
+ critic_missing="$critic_missing gcc"
+ fi
+
diff --git a/patches/glibc-2.7/generic/make-install-lib-all.patch b/patches/glibc-2.7/generic/make-install-lib-all.patch
new file mode 100644
index 0000000..501b736
--- /dev/null
+++ b/patches/glibc-2.7/generic/make-install-lib-all.patch
@@ -0,0 +1,45 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+#
+# T2 SDE: package/.../glibc32/make-install-lib-all.patch
+# Copyright (C) 2004 - 2005 The T2 SDE Project
+#
+# More information can be found in the files COPYING and README.
+#
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+# --- T2-COPYRIGHT-NOTE-END ---
+---
+# Makerules | 8 ++++++++
+# 1 file changed, 8 insertions(+)
+#
+Index: glibc-2.7/Makerules
+===================================================================
+--- glibc-2.7.orig/Makerules
++++ glibc-2.7/Makerules
+@@ -867,6 +867,13 @@ endef
+ installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
+ $(inst_libdir)/$(patsubst %,$(libtype$o),\
+ $(libprefix)$(libc-name)))
++
++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
++ $(inst_slibdir)/libc-$(version).so \
++ $(inst_libdir)/libc.so \
++ $(inst_libdir)/libc.a \
++ install-lib
++
+ install: $(installed-libcs)
+ $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
+ $(make-target-directory)
+@@ -890,6 +897,7 @@ endef
+ install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
+ install-lib := $(filter-out %.so %_pic.a,$(install-lib))
+
++
+ ifeq (yes,$(build-shared))
+ # Find which .so's have versions.
+ versioned := $(strip $(foreach so,$(install-lib.so),\
diff --git a/patches/glibc-2.7/generic/quilt-dummy.patch b/patches/glibc-2.7/generic/quilt-dummy.patch
deleted file mode 100644
index 403fe98..0000000
--- a/patches/glibc-2.7/generic/quilt-dummy.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-Index: glibc-2.7/README
-===================================================================
---- glibc-2.7.orig/README 2008-03-10 18:38:00.000000000 +0100
-+++ glibc-2.7/README 2008-03-10 18:38:19.000000000 +0100
-@@ -91,3 +91,5 @@
- The GNU C Library is free software. See the file COPYING.LIB for copying
- conditions, and LICENSES for notices about a few contributions that require
- these additional notices to be distributed.
-+
-+-- Coldfire port for ptxdist 2008.03.10
diff --git a/patches/glibc-2.7/generic/series b/patches/glibc-2.7/generic/series
index 1cb3391..4b9d92e 100644
--- a/patches/glibc-2.7/generic/series
+++ b/patches/glibc-2.7/generic/series
@@ -1 +1,8 @@
-quilt-dummy.patch
+make-install-lib-all.patch
+glibc-configure-apple-as.patch
+glibc-configure-old-gcc.patch
+configure_in-sane_readelf.diff
+configure-sane_readelf.diff
+
+glibc-2.5_stdlib_longlong.h
+cross_timezone.diff