Index: gcc/config/i386/t-linux64 =================================================================== --- gcc/config/i386/t-linux64 (2002-05-08 18:23:20.000000000 -0500) +++ gcc/config/i386/t-linux64 (2009-07-08 22:57:39.000000000 -0600) @@ -12,4 +12,10 @@ EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o -SHLIB_SLIBDIR_SUFFIXES = 64:64 32: +SHLIB_SLIBDIR_SUFFIXES = 64: 32:/32 + +# The pushl in CTOR initialization interferes with frame pointer elimination. +# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables, +# because then __FRAME_END__ might not be the last thing in .eh_frame +# section. +CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables Index: gcc/config/t-linux =================================================================== --- gcc/config/t-linux (2001-12-15 05:46:55.000000000 -0600) +++ gcc/config/t-linux (2009-07-08 22:57:39.000000000 -0600) @@ -2,7 +2,7 @@ STMP_FIXPROTO = # Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = -fPIC +CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC # Compile libgcc2.a with pic. TARGET_LIBGCC2_CFLAGS = -fPIC Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (2002-04-23 17:53:29.000000000 -0500) +++ gcc/gcc.c (2009-07-08 23:43:40.000000000 -0600) @@ -5626,6 +5626,15 @@ through and look for it in the normal places. */ if (newname != NULL) return newname; + + const char *const try_lib32 = ACONCAT (("../lib32", dir_separator_str, name, NULL)); + + newname = find_a_file (&startfile_prefixes, try_lib32, R_OK); + + /* If we don't find it in the multi library dir, then fall + through and look for it in the normal places. */ + if (newname != NULL) + return newname; } newname = find_a_file (&startfile_prefixes, name, R_OK); Index: libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h =================================================================== --- libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h (2002-04-19 02:59:07.000000000 -0500) +++ libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h (2009-07-08 23:43:40.000000000 -0500) @@ -33,6 +33,9 @@ // // Information as gleaned from /usr/include/ctype.h +#define __ctype_b *__ctype_b_loc() +#define __ctype_tolower *__ctype_tolower_loc() +#define __ctype_toupper *__ctype_toupper_loc() #if _GLIBCPP_USE_SHADOW_HEADERS using _C_legacy::__ctype_toupper; @@ -98,3 +101,7 @@ } return __high; } + +#undef __ctype_b +#undef __ctype_tolower +#undef __ctype_toupper