diff -urN glibc-2.3.3-orig/config.make.in glibc-2.3.3/config.make.in
--- glibc-2.3.3-orig/config.make.in	2003-11-11 17:37:03.000000000 -0700
+++ glibc-2.3.3/config.make.in	2005-03-26 18:39:02.000000000 -0700
@@ -55,6 +55,7 @@
 enable-check-abi = @enable_check_abi@
 have-forced-unwind = @libc_cv_forced_unwind@
 have-fpie = @libc_cv_fpie@
+fno-unit-at-a-time = @fno_unit_at_a_time@
 
 static-libgcc = @libc_cv_gcc_static_libgcc@
 
diff -urN glibc-2.3.3-orig/configure.in glibc-2.3.3/configure.in
--- glibc-2.3.3-orig/configure.in	2003-11-11 17:37:03.000000000 -0700
+++ glibc-2.3.3/configure.in	2005-03-26 18:39:02.000000000 -0700
@@ -1385,6 +1385,23 @@
   fi
 fi
 
+AC_CACHE_CHECK(for -fno-unit-at-a-time, libc_cv_fno_unit_at_a_time, [dnl
+cat > conftest.c <<EOF
+int foo;
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -fno-unit-at-a-time
+			    conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+  libc_cv_fno_unit_at_a_time=yes
+else
+  libc_cv_fno_unit_at_a_time=no
+fi
+rm -f conftest*])
+if test $libc_cv_fno_unit_at_a_time = yes; then
+  fno_unit_at_a_time=-fno-unit-at-a-time
+fi
+AC_SUBST(fno_unit_at_a_time)
+
 if test $elf = yes -a $gnu_ld = yes; then
   AC_CACHE_CHECK(whether cc puts quotes around section names,
 		 libc_cv_have_section_quotes,
diff -urN glibc-2.3.3-orig/csu/Makefile glibc-2.3.3/csu/Makefile
--- glibc-2.3.3-orig/csu/Makefile	2003-09-25 14:29:39.000000000 -0600
+++ glibc-2.3.3/csu/Makefile	2005-03-26 18:39:02.000000000 -0700
@@ -104,7 +104,7 @@
 $(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
 	$(compile.S) -g0 $(ASFLAGS-.os) -o $@
 
-CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions
+CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
 
 vpath initfini.c $(full_config_sysdirs)
 
diff -urN glibc-2.3.3-orig/elf/dl-runtime.c glibc-2.3.3/elf/dl-runtime.c
--- glibc-2.3.3-orig/elf/dl-runtime.c	2003-02-07 12:43:36.000000000 -0700
+++ glibc-2.3.3/elf/dl-runtime.c	2005-03-26 19:40:25.000000000 -0700
@@ -36,6 +36,12 @@
 # define VERSYMIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
 #endif
 
+/* The fixup functions might have need special attributes.  If none
+   are provided define the macro as empty.  */
+#ifndef ARCH_FIXUP_ATTRIBUTE
+# define ARCH_FIXUP_ATTRIBUTE
+#endif
+
 
 /* This function is called through a special trampoline from the PLT the
    first time each PLT entry is called.  We must perform the relocation
@@ -45,7 +51,7 @@
    function.  */
 
 #ifndef ELF_MACHINE_NO_PLT
-static ElfW(Addr) __attribute_used__
+static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
 fixup (
 # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
@@ -132,7 +138,7 @@
 
 #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
 
-static ElfW(Addr) __attribute_used__
+static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
 profile_fixup (
 #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
        ELF_MACHINE_RUNTIME_FIXUP_ARGS,
diff -urN glibc-2.3.3-orig/locale/Makefile glibc-2.3.3/locale/Makefile
--- glibc-2.3.3-orig/locale/Makefile	2003-06-13 14:42:48.000000000 -0600
+++ glibc-2.3.3/locale/Makefile	2005-03-26 18:39:02.000000000 -0700
@@ -100,6 +100,7 @@
 CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
 CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
 CFLAGS-charmap-dir.c = -Wno-write-strings
+CFLAGS-loadlocale.c = $(fno-unit-at-t-time)
 
 # This makes sure -DNOT_IN_libc is passed for all these modules.
 cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
diff -urN glibc-2.3.3-orig/Makeconfig glibc-2.3.3/Makeconfig
--- glibc-2.3.3-orig/Makeconfig	2003-09-17 02:36:10.000000000 -0600
+++ glibc-2.3.3/Makeconfig	2005-03-26 18:39:02.000000000 -0700
@@ -511,7 +511,7 @@
 link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a)
 
 ifndef gnulib
-gnulib := -lgcc -lgcc_eh
+gnulib := -lgcc
 endif
 ifeq ($(elf),yes)
 +preinit = $(addprefix $(csu-objpfx),crti.o)
@@ -908,9 +908,10 @@
 all-subdirs = csu assert ctype locale intl catgets math setjmp signal	    \
 	      stdlib stdio-common libio malloc string wcsmbs time dirent \
 	      grp pwd posix io termios resource misc socket sysvipc gmon    \
-	      gnulib iconv iconvdata wctype manual shadow po argp	    \
+	      gnulib iconv iconvdata wctype shadow po argp	    \
 	      crypt $(add-ons) nss localedata timezone rt conform debug	    \
 	      $(sysdep-subdirs) $(dlfcn) $(binfmt-subdir)
+# FIXME: removed manual from the above list...
 all-subdirs := $(filter-out $(sysdep-inhibit-subdirs),$(all-subdirs))
 
 # The mach and hurd subdirectories have many generated header files which
diff -urN glibc-2.3.3-orig/nptl/Makefile glibc-2.3.3/nptl/Makefile
--- glibc-2.3.3-orig/nptl/Makefile	2003-11-21 11:53:01.000000000 -0700
+++ glibc-2.3.3/nptl/Makefile	2005-03-26 18:39:02.000000000 -0700
@@ -312,7 +312,7 @@
 extra-objs += $(crti-objs) $(crtn-objs)
 omit-deps += crti crtn
 
-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
 endif
 
 CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
diff -urN glibc-2.3.3-orig/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile glibc-2.3.3/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile
--- glibc-2.3.3-orig/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile	2003-03-17 04:22:52.000000000 -0700
+++ glibc-2.3.3/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile	2005-03-26 18:39:02.000000000 -0700
@@ -1,2 +1,7 @@
 # pull in __syscall_error routine
 libpthread-routines += sysdep
+
+ifeq ($(subdir),nptl)
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions \
+		       -fno-asynchronous-unwind-tables $(fno-unit-at-a-time)
+ endif
diff -urN glibc-2.3.3-orig/sysdeps/generic/libc-start.c glibc-2.3.3/sysdeps/generic/libc-start.c
--- glibc-2.3.3-orig/sysdeps/generic/libc-start.c	2003-07-31 13:20:39.000000000 -0600
+++ glibc-2.3.3/sysdeps/generic/libc-start.c	2005-03-26 18:39:02.000000000 -0700
@@ -45,7 +45,11 @@
 
 
 #ifdef LIBC_START_MAIN
-# define STATIC static inline __attribute__ ((always_inline))
+# ifdef LIBC_START_DISABLE_INLINE
+#  define STATIC static
+# else
+#  define STATIS static inline __attribute__ ((always_inline))
+# endif
 #else
 # define STATIC
 # define LIBC_START_MAIN BP_SYM (__libc_start_main)
diff -urN glibc-2.3.3-orig/sysdeps/i386/dl-machine.h glibc-2.3.3/sysdeps/i386/dl-machine.h
--- glibc-2.3.3-orig/sysdeps/i386/dl-machine.h	2003-09-24 15:08:31.000000000 -0600
+++ glibc-2.3.3/sysdeps/i386/dl-machine.h	2005-03-26 19:40:25.000000000 -0700
@@ -154,11 +154,14 @@
    destroys the passed register information.  */
 /* GKM FIXME: Fix trampoline to pass bounds so we can do
    without the `__unbounded' qualifier.  */
-static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
-     __attribute__ ((regparm (2), unused));
+#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
+
+static ElfW(Addr) fixup (struct link_map *__unbounded l,
+			 ElfW(Word) reloc_offset)
+     ARCH_FIXUP_ATTRIBUTE;
 static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
 				 ElfW(Addr) retaddr)
-     __attribute__ ((regparm (3), unused));
+     ARCH_FIXUP_ATTRIBUTE;
 # endif
 
 /* This code is used in dl-runtime.c to call the `fixup' function
diff -urN glibc-2.3.3-orig/sysdeps/powerpc/elf/libc-start.c glibc-2.3.3/sysdeps/powerpc/elf/libc-start.c
--- glibc-2.3.3-orig/sysdeps/powerpc/elf/libc-start.c	2003-03-15 16:09:18.000000000 -0700
+++ glibc-2.3.3/sysdeps/powerpc/elf/libc-start.c	2005-03-26 18:39:02.000000000 -0700
@@ -49,6 +49,7 @@
 
 /* The main work is done in the generic function.  */
 #define LIBC_START_MAIN generic_start_main
+#define LIBC_START_DISABLE_INLINE
 #define LIBC_START_MAIN_AUXVEC_ARG
 #define MAIN_AUXVEC_ARG
 #define INIT_MAIN_ARGS
diff -urN glibc-2.3.3-orig/sysdeps/unix/sysv/linux/powerpc/Makefile glibc-2.3.3/sysdeps/unix/sysv/linux/powerpc/Makefile
--- glibc-2.3.3-orig/sysdeps/unix/sysv/linux/powerpc/Makefile	2003-09-02 21:17:45.000000000 -0600
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/powerpc/Makefile	2005-03-26 18:39:03.000000000 -0700
@@ -1 +1,6 @@
 64bit-predefine = __powerpc64__
+
+ifeq ($(subdir),nptl)
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
+endif
+
