diff -Naur glibc-2.3.1-20030220.orig/Makeconfig glibc-2.3.1-20030220/Makeconfig
--- glibc-2.3.1-20030220.orig/Makeconfig	Mon Jan  6 03:41:51 2003
+++ glibc-2.3.1-20030220/Makeconfig	Tue Jul  1 12:17:57 2003
@@ -422,7 +422,7 @@
 endif
 ifndef config-LDFLAGS
 ifeq (yesyes,$(build-shared)$(elf))
-config-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name)
+config-LDFLAGS = 
 endif
 endif
 ifndef link-libc
diff -Naur glibc-2.3.1-20030220.orig/Makerules glibc-2.3.1-20030220/Makerules
--- glibc-2.3.1-20030220.orig/Makerules	Sun Feb 16 01:59:19 2003
+++ glibc-2.3.1-20030220/Makerules	Tue Jul  1 12:17:57 2003
@@ -957,8 +957,8 @@
 	 echo '   Use the shared library, but some functions are only in';\
 	 echo '   the static library, so try that secondarily.  */';\
 	 cat $<; \
-	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
+	 echo 'GROUP ( libc.so$(libc.so-version)' \
+	      '$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
 	      ')' \
 	) > $@.new
 	mv -f $@.new $@
diff -Naur glibc-2.3.1-20030220.orig/dlfcn/Makefile glibc-2.3.1-20030220/dlfcn/Makefile
--- glibc-2.3.1-20030220.orig/dlfcn/Makefile	Sun Jan  5 13:04:52 2003
+++ glibc-2.3.1-20030220/dlfcn/Makefile	Tue Jul  1 12:17:57 2003
@@ -58,7 +58,7 @@
 
 include ../Rules
 
-LDFLAGS-dl.so = -Wl,-dynamic-linker,$(slibdir)/$(rtld-installed-name)
+LDFLAGS-dl.so =
 
 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
 $(test-modules): $(objpfx)%.so: $(objpfx)%.os
diff -Naur glibc-2.3.1-20030220.orig/iconvdata/Makefile glibc-2.3.1-20030220/iconvdata/Makefile
--- glibc-2.3.1-20030220.orig/iconvdata/Makefile	Wed Feb  5 03:01:10 2003
+++ glibc-2.3.1-20030220/iconvdata/Makefile	Tue Jul  1 12:17:57 2003
@@ -175,8 +175,8 @@
 # Rule to generate the shared objects.
 charmaps = ../localedata/charmaps
 -include $(objpfx)iconv-rules
-extra-modules-left := $(modules)
-include extra-module.mk
+extra-objs =
+-include $(objpfx)iconv-rules1
 
 
 extra-objs	+= $(modules.so)
@@ -216,7 +216,7 @@
 		     $(gen-special-modules)
 
 generated = $(generated-modules:=.h) $(generated-modules:=.stmp) \
-	    iconv-test.out iconv-rules tst-loading.mtrace	 \
+	    iconv-test.out iconv-rules iconv-rules1 tst-loading.mtrace	 \
 	    mtrace-tst-loading tst-tables.out iconv-test.xxx
 ifdef objpfx
 generated += gconv-modules
@@ -265,6 +265,17 @@
 		    printf "\t$$(generate-%s-table)\n", $$1; \
 		  } \
 		}' > $@.new
+	mv -f $@.new $@
+$(objpfx)iconv-rules1: Makefile
+	{ echo $(modules); } | \
+	  $(AWK) 'NR == 1 { \
+	         for (i = 1; i <= NF; i++) { \
+	           printf "$$(objpfx)%s.so: $$(addprefix $$(objpfx),$$(addsuffix .os,$$(%s-routines)))\n", $$i, $$i; \
+	           printf "\t$$(build-module)\n"; \
+	           printf "extra-objs += $$(addsuffix .os,$$(%s-routines))\n", $$i; \
+	           printf "$$(objpfx)%s.so: $$(common-objpfx)libc.so\n", $$i; \
+                 } \
+	       }' > $@.new
 	mv -f $@.new $@
 endif
 
diff -Naur glibc-2.3.1-20030220.orig/linuxthreads/Makefile glibc-2.3.1-20030220/linuxthreads/Makefile
--- glibc-2.3.1-20030220.orig/linuxthreads/Makefile	Fri Feb  7 09:18:45 2003
+++ glibc-2.3.1-20030220/linuxthreads/Makefile	Tue Jul  1 12:19:20 2003
@@ -120,8 +120,8 @@
 	 echo '   Use the shared library, but some functions are only in';\
 	 echo '   the static library, so try that secondarily.  */';\
 	 cat $<; \
-	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
+	 echo 'GROUP ( libpthread.so$(libpthread.so-version)' \
+	      '$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
 	      ')' \
 	) > $@.new
 	mv -f $@.new $@
diff -Naur glibc-2.3.1-20030220.orig/localedata/Makefile glibc-2.3.1-20030220/localedata/Makefile
--- glibc-2.3.1-20030220.orig/localedata/Makefile	Tue Jul  1 12:16:17 2003
+++ glibc-2.3.1-20030220/localedata/Makefile	Tue Jul  1 12:17:57 2003
@@ -141,7 +141,7 @@
 # Dependency for the locale files.  We actually make it depend only on
 # one of the files.
 $(addprefix $(objpfx),$(CTYPE_FILES)): %: \
-  gen-locale.sh $(common-objpfx)locale/localedef Makefile \
+  gen-locale.sh `which localedef` Makefile \
   $(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS))
 	@$(SHELL) -e gen-locale.sh $(common-objpfx) '$(built-program-cmd)' $@
 
@@ -162,7 +162,7 @@
 		       $(addprefix $(objpfx),$(CTYPE_FILES))
 	$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' tst-fmon.data \
 	  > $@
-$(objpfx)tst-locale.out: tst-locale.sh $(common-objpfx)locale/localedef \
+$(objpfx)tst-locale.out: tst-locale.sh `which localedef` \
 			 $(ld-test-srcs) $(addprefix $(objpfx),$(CTYPE_FILES))
 	$(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
 $(objpfx)tst-rpmatch.out: tst-rpmatch.sh $(objpfx)tst-rpmatch \
@@ -198,8 +198,7 @@
 INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
 
 # Sometimes the whole collection of locale files should be installed.
-LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
-$(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef
+LOCALEDEF=I18NPATH=. `which localedef`
 install-locales: $(INSTALL-SUPPORTED-LOCALES)
 
 install-locales-dir:
diff -Naur glibc-2.3.1-20030220.orig/sunrpc/Makefile glibc-2.3.1-20030220/sunrpc/Makefile
--- glibc-2.3.1-20030220.orig/sunrpc/Makefile	Thu Oct 17 02:09:46 2002
+++ glibc-2.3.1-20030220/sunrpc/Makefile	Tue Jul  1 12:17:57 2003
@@ -94,15 +94,12 @@
 	     $(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
 CFLAGS-xnlm_prot.c = -Wno-unused
@@ -136,7 +133,7 @@
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
 # Tell rpcgen where to find the C preprocessor.
-rpcgen-cmd = CPP='$(CC) -E -x c-header' $(built-program-cmd) -Y ../scripts
+rpcgen-cmd = CPP='$(CC) -E -x c-header' `which rpcgen`
 
 # Install the rpc data base file.
 $(inst_sysconfdir)/rpc: etc.rpc $(+force)
diff -Naur glibc-2.3.1-20030220.orig/sysdeps/arm/machine-gmon.h glibc-2.3.1-20030220/sysdeps/arm/machine-gmon.h
--- glibc-2.3.1-20030220.orig/sysdeps/arm/machine-gmon.h	Fri Jul  6 08:55:48 2001
+++ glibc-2.3.1-20030220/sysdeps/arm/machine-gmon.h	Tue Jul  1 12:24:43 2003
@@ -32,10 +32,10 @@
 weak_alias (_mcount, mcount)
 #endif
 
-static void mcount_internal (u_long frompc, u_long selfpc);
+void mcount_internal (u_long frompc, u_long selfpc);
 
 #define _MCOUNT_DECL(frompc, selfpc) \
-static void mcount_internal (u_long frompc, u_long selfpc)
+void mcount_internal (u_long frompc, u_long selfpc)
 
 /* This macro/func MUST save r0, r1 because the compiler inserts
 	blind calls to _mount(), ignoring the fact that _mcount may
diff -Naur glibc-2.3.1-20030220.orig/sysdeps/arm/sysdep.h glibc-2.3.1-20030220/sysdeps/arm/sysdep.h
--- glibc-2.3.1-20030220.orig/sysdeps/arm/sysdep.h	Fri Jul  6 08:55:48 2001
+++ glibc-2.3.1-20030220/sysdeps/arm/sysdep.h	Tue Jul  1 12:20:25 2003
@@ -76,7 +76,7 @@
 #define CALL_MCOUNT			\
 	str	lr,[sp, #-4]!	;	\
 	bl	PLTJMP(mcount)	;	\
-	ldr	lr, [sp], #4
+	ldr	lr, [sp], #4    ;
 #else
 #define CALL_MCOUNT		/* Do nothing.  */
 #endif
diff -Naur glibc-2.3.1-20030220.orig/sysdeps/unix/sysv/linux/arm/sysdep.h glibc-2.3.1-20030220/sysdeps/unix/sysv/linux/arm/sysdep.h
--- glibc-2.3.1-20030220.orig/sysdeps/unix/sysv/linux/arm/sysdep.h	Thu Jan  9 07:09:24 2003
+++ glibc-2.3.1-20030220/sysdeps/unix/sysv/linux/arm/sysdep.h	Tue Jul  1 12:20:04 2003
@@ -138,10 +138,10 @@
    call.  */
 #undef INLINE_SYSCALL
 #define INLINE_SYSCALL(name, nr, args...)				\
-  ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args);	\
-     if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0))	\
+  ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, 0, nr, args);	\
+     if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result,0), 0))\
        {								\
-	 __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result));		\
+	 __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result,0));		\
 	 _sys_result = (unsigned int) -1;				\
        }								\
      (int) _sys_result; })
diff -Naur glibc-2.3.1-20030220.orig/timezone/Makefile glibc-2.3.1-20030220/timezone/Makefile
--- glibc-2.3.1-20030220.orig/timezone/Makefile	Mon Aug  5 00:50:45 2002
+++ glibc-2.3.1-20030220/timezone/Makefile	Tue Jul  1 12:17:57 2003
@@ -69,13 +69,10 @@
 					 $(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
@@ -107,13 +104,13 @@
 	   echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/,$$($$t-zones)))' ;\
 	 fi								    ;\
 	 echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/right/,$$($*-zones)): \' ;\
-	 echo '$< $$(objpfx)zic leapseconds yearistype'			    ;\
+	 echo '$< /usr/sbin/zic leapseconds yearistype'			    ;\
 	 echo '	$$(tzcompile)'						    ;\
 	 echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/posix/,$$($*-zones)): \' ;\
-	 echo '$< $$(objpfx)zic /dev/null yearistype'			    ;\
+	 echo '$< /usr/sbin/zic /dev/null yearistype'			    ;\
 	 echo '	$$(tzcompile)'						    ;\
 	 echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/,$$($*-zones)): \' ;\
-	 echo '$< $$(objpfx)zic $$(leapseconds) yearistype'		    ;\
+	 echo '$< /usr/sbin/zic $$(leapseconds) yearistype'		    ;\
 	 echo '	$$(tzcompile)'						    ;\
 	 echo 'endif'							    ;\
 	 echo 'zonenames := $$(zonenames) $$($*-zones)'			    ;\
@@ -128,7 +125,7 @@
 # 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'.
-zic-cmd = $(built-program-cmd) -d $(inst_zonedir)
+zic-cmd = /usr/sbin/zic -d $(inst_zonedir)
 tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \
 	    -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $<
 
@@ -141,7 +138,7 @@
 					  $(patsubst $(inst_zonedir)/%,%,$@))))
 
 ifdef localtime
-$(installed-localtime-file): $(inst_zonedir)/$(localtime) $(objpfx)zic \
+$(installed-localtime-file): $(inst_zonedir)/$(localtime) \
 			     $(+force)
 	$(make-target-directory)
 	if test -r $@; then \
@@ -153,7 +150,7 @@
 	fi
 endif
 ifdef posixrules
-$(installed-posixrules-file): $(inst_zonedir)/$(posixrules) $(objpfx)zic \
+$(installed-posixrules-file): $(inst_zonedir)/$(posixrules) \
 			      $(+force)
 	$(zic-cmd) -p $(posixrules)
 endif
@@ -190,28 +187,28 @@
 test-tz-ENV = TZDIR=$(testdata)
 tst-timezone-ENV = TZDIR=$(testdata)
 
-$(testdata)/America/New_York: northamerica $(objpfx)zic $(leapseconds) \
+$(testdata)/America/New_York: northamerica $(leapseconds) \
 			      yearistype
 	$(build-testdata)
-$(testdata)/Etc/UTC: etcetera $(objpfx)zic $(leapseconds) yearistype
+$(testdata)/Etc/UTC: etcetera $(leapseconds) yearistype
 	$(build-testdata)
-$(testdata)/UTC: simplebackw $(objpfx)zic $(testdata)/Etc/UTC \
+$(testdata)/UTC: simplebackw $(testdata)/Etc/UTC \
 		 $(leapseconds) yearistype
 	$(build-testdata)
-$(testdata)/Europe/Berlin: europe $(objpfx)zic $(leapseconds) yearistype
+$(testdata)/Europe/Berlin: europe $(leapseconds) yearistype
 	$(build-testdata)
-$(testdata)/Universal: simplebackw $(objpfx)zic $(testdata)/Etc/UTC \
+$(testdata)/Universal: simplebackw $(testdata)/Etc/UTC \
 		       $(leapseconds) yearistype
 	$(build-testdata)
-$(testdata)/Australia/Melbourne: australasia $(objpfx)zic $(leapseconds) \
+$(testdata)/Australia/Melbourne: australasia $(leapseconds) \
 				 yearistype
 	$(build-testdata)
-$(testdata)/America/Sao_Paulo: southamerica $(objpfx)zic $(leapseconds) \
+$(testdata)/America/Sao_Paulo: southamerica $(leapseconds) \
 			       yearistype
 	$(build-testdata)
-$(testdata)/Asia/Tokyo: asia $(objpfx)zic $(leapseconds) yearistype
+$(testdata)/Asia/Tokyo: asia $(leapseconds) yearistype
 	$(build-testdata)
-$(testdata)/Europe/London: europe $(objpfx)zic $(leapseconds) yearistype
+$(testdata)/Europe/London: europe $(leapseconds) yearistype
 	$(build-testdata)
 
 
