Index: gcc/config/svr4.h =================================================================== --- gcc/config/svr4.h (2000-02-26 14:24:45.000000000 -0600) +++ gcc/config/svr4.h (2009-12-16 22:19:19.000000000 -0600) @@ -90,7 +90,7 @@ #undef ASM_SPEC #define ASM_SPEC \ - "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}" + "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} --32" /* svr4 assemblers need the `-' (indicating input from stdin) to come after the -o option (and its argument) for some reason. If we try to put it Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (2002-01-02 15:03:39.000000000 -0600) +++ gcc/gcc.c (2009-12-16 22:19:19.000000000 -0600) @@ -1179,8 +1179,8 @@ static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; static const char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; -static const char *standard_startfile_prefix_1 = "/lib/"; -static const char *standard_startfile_prefix_2 = "/usr/lib/"; +static const char *standard_startfile_prefix_1 = "/lib32/"; +static const char *standard_startfile_prefix_2 = "/usr/lib32/"; static const char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX; static const char *tooldir_prefix; Index: libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h =================================================================== --- libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h (2000-12-14 01:20:36.000000000 -0600) +++ libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h (2009-12-16 22:24:10.000000000 -0600) @@ -32,6 +32,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; @@ -75,7 +78,9 @@ return __high; } - +#undef __ctype_b +#undef __ctype_tolower +#undef __ctype_toupper Index: Makefile.in =================================================================== --- Makefile.in (2001-06-07 22:23:56.000000000 -0500) +++ Makefile.in (2009-12-16 23:09:51.000000000 -0600) @@ -83,17 +83,18 @@ # These flag values are normally overridden by the configure script. CFLAGS = -g +CFLAGS_FOR_HOST = $(CFLAGS) -m32 CXXFLAGS = -g -O2 LDFLAGS = -LIBCFLAGS = $(CFLAGS) +LIBCFLAGS = $(CFLAGS_FOR_HOST) CFLAGS_FOR_TARGET = $(CFLAGS) LDFLAGS_FOR_TARGET = LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) PICFLAG = PICFLAG_FOR_TARGET = -CHILLFLAGS = $(CFLAGS) +CHILLFLAGS = $(CFLAGS_FOR_HOST) CHILL_LIB = -lchill CXX = c++ @@ -336,7 +337,7 @@ "BISON=$(BISON)" \ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ - "CFLAGS=$(CFLAGS)" \ + "CFLAGS=$(CFLAGS_FOR_HOST)" \ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ "CHILLFLAGS=$(CHILLFLAGS)" \ "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \