Here are a couple of patches to make gcc-3.4.6/libobjc compile on my system: Gentoo on an AMD box with gcc-3.3.5. The problem was that the configure script was failing with this error:
checking for gthread cflags... configure: error: not found because there is nothing to be found about GTHREAD in ../Makefile, contrary to what is said in the file THREADS: <quote> If you are compiling libobjc as part of GCC, the thr-objc.c backend is always used; this backend uses GCC's gthread code. The thread system is automatically configured when GCC is configured. Important: make sure you configure GCC using `--enable-threads' if you want threads ! </quote> I configured gcc-3.4.6 with --enable-threads so I guess this documentation is outdated. $ diff -Naur configure.in{.old,} --- configure.in.old 2006-03-21 21:38:41.000000000 -0800 +++ configure.in 2006-03-21 21:38:00.000000000 -0800 @@ -75,16 +75,16 @@ # Determine CFLAGS for gthread. -AC_CACHE_CHECK([for gthread cflags],objc_cv_gthread_flags, -[if test -f "$r"/gcc/Makefile -then - objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'` -else - AC_MSG_ERROR([not found]) -fi]) -GTHREAD_FLAGS=$objc_cv_gthread_flags -AC_SUBST(GTHREAD_FLAGS) - +dnl AC_CACHE_CHECK([for gthread cflags],objc_cv_gthread_flags, +dnl [if test -f "$r"/gcc/Makefile +dnl then +dnl objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'` +dnl else +dnl AC_MSG_ERROR([not found]) +dnl fi]) +dnl GTHREAD_FLAGS=$objc_cv_gthread_flags +dnl AC_SUBST(GTHREAD_FLAGS) + AC_ARG_ENABLE(objc-gc, [ --enable-objc-gc enable the use of Boehm's garbage collector with the GNU Objective-C runtime.], $ diff -Naur Makefile.in{.old,} --- Makefile.in.old 2006-03-21 21:47:16.000000000 -0800 +++ Makefile.in 2006-03-21 21:47:19.000000000 -0800 @@ -69,7 +69,7 @@ CC = @CC@ CFLAGS = @CFLAGS@ WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \ $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing Now it configures and compiles just fine. -- Summary: Checking for gthread causes configure script to fail Product: gcc Version: 3.4.6 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libobjc AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: issac dot trotts at gmail dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26794