Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137024 - [3.4/gcc] fails with USE="objc objc-gc"
Summary: [3.4/gcc] fails with USE="objc objc-gc"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 169043 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-16 14:26 UTC by William
Modified: 2008-07-06 02:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William 2006-06-16 14:26:32 UTC
Portage 2.1 (default-linux/amd64/2006.0, gcc-3.4.4, glibc-2.3.6-r3, 2.6.16-gentoo-r9 x86_6      
4)
=================================================================
System uname: 2.6.16-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22     
virtual/os-headers:  2.6.11-r2  
ACCEPT_KEYWORDS="amd64"         
AUTOCLEAN="yes"                 
CBUILD="x86_64-pc-linux-gnu"    
CFLAGS="-mtune=k8 -march=k8 -msse2 -m3dnow -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"     
CONFIG_PROTECT="/etc /usr/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-mtune=k8 -march=k8 -msse2 -m3dnow -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributi      
ons/gentoo"                     
MAKEOPTS="-j2"                  
PKGDIR="/usr/portage/packages"  
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --      
whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude=      
'/local' --exclude='/packages'" 
PORTAGE_TMPDIR="/var/tmp"       
PORTDIR="/usr/portage"          
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 7zip X aac acpi alsa amuled apache apache1 apache2 apm applet async audiofile a      
vi background bash-completion batch bdf beagle berkdb bitmap-fonts bittorrent blender-game      
 bogofilter bonjour branding bzip2 c++ cairo carbone_theme ccache cdparanoia cdr cdrom chm      
 chroot cle266 cli cluster cpudetection crypt css cups cvs dar64 dbx dcc dcraw debugger de      
lays dga disableslit disablexmb disassembler dmalloc dnd doc dri dvd dvdr dvdread eds emac      
s emacs-w3 emboss encode escreen esd esx ethereal etwin exif ext-png ext-zlib extraengine       
extrafilters fbcon firefox fmod font-server fontconfig foomaticdb fortran fping ftp gaim g      
ecko-sdk geometry ggi gif gimp gkrellm glade glitz glut gmail gmailtimestamps gnome gnomed      
b gnuplot gnustep gpm graphicsmagick graphviz gstreamer gtk gtk2 guionly hal hesiod howl h      
ttpd i8x0 ieee1394 imlib imlib2 immqt inode ipv6 irc isdnlog java java-external java-inter      
nal jpeg jpeg2k kdrive kqemu lame largeterminal lesstif libclamav libdsk libffi libnotify       
libsexy lingerd linuxkeys live logmail lzw lzw-tiff mailbox maildir maildrop mailwrapper m      
ax-idx-128 md5sum mime modplug mouse mozdevelop mozilla mp3 mp4 mp4live mpeg mpeg2 mplayer      
 msn msnextras mule music mysql mythtv nas ncurses net new-login nfs nhc98 nls nntp nptl n      
tfs objc objc++ objc-gc oci8 office ogg oldgtk opengl openssh openssl oracle osc pam pci p      
cre pdflib perl php player plib plotutils png pppd python qemu-fast quicktime rar readline      
 reflection reiser4 reiserfs remote rss sdl search sendmail session spell spl sql sqlite s      
qlite3 ssl stroke struts subtitles symlink tcpd teamarena tga tiff truetype truetype-fonts      
 type1-fonts unicode unzip urandom usb vcd vdr vfat videos vim vim-pager visualization vor      
bis wma wxwindows xanim xatrix xemacs xfs xft xine xml xmms xorg xpm xscreensaver xv xvid       
zip zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAG      
E_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

---------------------
ERROR STARTS IN
---------------------
gcc -I/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc/../gcc/config -I../../gcc -I/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc/../include /var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc/gc.c
........................lots of errors in gc.c------------------
-B/var/tmp/portage/gcc-3.4.5/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -I. -I/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc -O2 -mtune=k8 -march=k8 -O2 -pipe -W -Wall -Wwrite-strings -Wstrict-prototypes -DHAVE_GTHR_DEFAULT -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -DOBJC_WITH_GC=1 -I/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc/objc -I/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc/../gcc -I/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc/../gcc/config -I../../gcc -
/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc/gc.c:336: warning: implicit declaration of function `GC_make_descriptor'
/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libobjc/gc.c:336: warning: cast to pointer from integer of different size
make[2]: *** [gc_gc.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.5/work/build/x86_64-pc-linux-gnu/libobjc'
make[1]: *** [all-target-libobjc] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.5/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.5 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  ebuild.sh, line 1248:   Called toolchain_src_compile
  toolchain.eclass, line 24:   Called gcc_src_compile
  toolchain.eclass, line 1464:   Called gcc_do_make
  toolchain.eclass, line 1338:   Called die

!!! emake failed with profiledbootstrap
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-06-16 14:35:30 UTC

*** This bug has been marked as a duplicate of 114359 ***
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2006-08-12 22:31:06 UTC
this looks like a different bug than #114359.

have you tried gcc-3.4.6-r1 or -r2?  can you post more of the error?  i don't see what the actual error is, just two warnings.  just to clarify, this goes away when you have dev-libs/boehm-gc installed?

can you also paste the output of 'emerge -pv gcc'?  i'll try to reproduce it here.  
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2006-08-12 22:52:14 UTC
okay, got it.


/var/tmp/portage/gcc-3.4.6-r2/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.6-r2/work/build/gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -c -I. -I/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc -O2 -O2 -march=prescott -pipe -fno-ident -W -Wall -Wwrite-strings -Wstrict-prototypes -DHAVE_GTHR_DEFAULT -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -DOBJC_WITH_GC=1 -I/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/objc -I/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/../gcc -I/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/../gcc/config -I../../gcc -I/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/../include /var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c  -fPIC -DPIC -o .libs/gc_gc.o
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:38:16: gc.h: No such file or directory
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:42: error: syntax error before "word"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:42: warning: type defaults to `int' in declaration of `word'
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:42: warning: data definition has no type or storage class
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:43: error: syntax error before "signed_word"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:43: warning: type defaults to `int' in declaration of `signed_word'
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:43: warning: data definition has no type or storage class
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:46:22: gc_typed.h: No such file or directory
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:60: error: syntax error before "mask"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:60: warning: function declaration isn't a prototype
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:62: error: syntax error before "mask"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:62: warning: function declaration isn't a prototype
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:66: error: syntax error before "mask"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:67: warning: function declaration isn't a prototype
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c: In function `__objc_gc_setup_array':
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:68: error: `type' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:68: error: (Each undeclared identifier is reported only once
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:68: error: for each function it appears in.)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:76: error: `mask' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:76: error: `offset' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c: At top level:
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:95: error: syntax error before "mask"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:96: warning: function declaration isn't a prototype
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c: In function `__objc_gc_setup_struct':
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:101: error: `type' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:123: error: `offset' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:133: warning: implicit declaration of function `GC_set_bit'
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:133: error: `mask' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c: At top level:
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:155: error: syntax error before "mask"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:156: warning: function declaration isn't a prototype
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c: In function `__objc_gc_setup_union':
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:163: error: `type' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:172: error: `offset' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:172: warning: type defaults to `int' in declaration of `__v'
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:175: error: `mask' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c: At top level:
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:184: error: syntax error before "mask"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:185: warning: function declaration isn't a prototype
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c: In function `__objc_gc_type_description_from_type':
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:190: error: `type' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:218: error: `mask' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c: In function `__objc_generate_gc_type_description':
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:291: error: `GC_bitmap' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:291: error: syntax error before "mask"
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:308: error: `mask' undeclared (first use in this function)
/var/tmp/portage/gcc-3.4.6-r2/work/gcc-3.4.6/libobjc/gc.c:336: warning: implicit declaration of function `GC_make_descriptor'
make[2]: *** [gc_gc.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.6-r2/work/build/i686-pc-linux-gnu/libobjc'
make[1]: *** [all-target-libobjc] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.6-r2/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.6-r2 failed.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-08-12 22:55:59 UTC
(In reply to comment #2)
> this looks like a different bug than #114359.

Not really according to output in Comment #3. Marking as duplicate again.

*** This bug has been marked as a duplicate of 114359 ***
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2006-08-13 01:07:19 UTC
aaaaaaand open again.. ;)

i think the problem is the objc-gc USE flag.  even though it's not in IUSE for <=gcc-4.0, is it possible it's still getting passed through to toolchain.eclass and messing with this bit or something similar?

   1158     GCC_LANG="c"
   1159     is_cxx && GCC_LANG="${GCC_LANG},c++"
   1160     is_gcj && GCC_LANG="${GCC_LANG},java"
   1161     if is_objc || is_objcxx ; then
   1162         GCC_LANG="${GCC_LANG},objc"
   1163         use objc-gc && confgcc="${confgcc} --enable-objc-gc"
   1164         is_objcxx && GCC_LANG="${GCC_LANG},obj-c++"
   1165     fi

The --enable-objc-gc option requires that you have the garbage collector installed on the system before building GCC[1][2].  I don't know much about objc or boehm-gc, so i don't know what the proper way to go with this is.  Fix the eclass of course. ;)  Remove the option?  DEPEND on boehm-gc?  GCC 4.0 and up doesn't have this problem, but that could be due to the patches in bug #114359.  Can we use those here?

Testcase:

  # USE="objc" emerge -av =sys-devel/gcc-3.4.6-r2

 * Configuring GCC with:
        --prefix=/usr
        --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.6
        --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include
        --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6
        --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6/man
        --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6/info
        --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3
        --host=i686-pc-linux-gnu
        --build=i686-pc-linux-gnu
        --disable-altivec
        --disable-nls
        --with-system-zlib
        --disable-checking
        --disable-werror
        --disable-libunwind-exceptions
        --disable-multilib
        --disable-libgcj
        --enable-languages=c,c++,objc,f77
        --enable-shared
        --enable-threads=posix
        --enable-__cxa_atexit
        --enable-clocale=gnu

notice no --enable-objc-gc. so --disable appears to be the default for 3.4.6


  # USE="objc objc-gc" emerge -av =sys-devel/gcc-3.4.6-r2

* Configuring GCC with:
        --prefix=/usr
        --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.6
        --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include
        --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6
        --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6/man
        --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6/info
        --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3
        --host=i686-pc-linux-gnu
        --build=i686-pc-linux-gnu
        --disable-altivec
        --disable-nls
        --with-system-zlib
        --disable-checking
        --disable-werror
        --disable-libunwind-exceptions
        --disable-multilib
        --disable-libgcj
        --enable-objc-gc
        --enable-languages=c,c++,objc,f77
        --enable-shared
        --enable-threads=posix
        --enable-__cxa_atexit
        --enable-clocale=gnu

--enable-objc-gc is added when USE="objc objc-gc" (also when USE="objc objc++ objc-gc").  


  # USE="objc++ objc-gc" emerge -av =sys-devel/gcc-3.4.6-r2

 * Configuring GCC with:
        --prefix=/usr
        --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.6
        --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include
        --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6
        --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6/man
        --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.6/info
        --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3
        --host=i686-pc-linux-gnu
        --build=i686-pc-linux-gnu
        --disable-altivec
        --disable-nls
        --with-system-zlib
        --disable-checking
        --disable-werror
        --disable-libunwind-exceptions
        --disable-multilib
        --disable-libgcj
        --enable-languages=c,c++,f77
        --enable-shared
        --enable-threads=posix
        --enable-__cxa_atexit
        --enable-clocale=gnu

This one's odd because it doesn't enable --enable-objc-gc and also doesn't add obj-c++ to the languages list. Actually, it doesn't add it even when you USE="objc++" by itself.  It looks like there's really no way to enable objc++ at the moment. But, that's another bug report.

So, my best guess is that objc-gc is being used by toolchain.eclass, even when it's not in IUSE, but enabled in the user's USE flags.  This seems like a Bad Thing.


[1] http://gcc.gnu.org/ml/gcc-bugs/2002-02/msg00072.html
[2] http://gcc.gnu.org/onlinedocs/gcc/Garbage-Collection.html
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2006-08-13 08:13:08 UTC
(In reply to comment #5)

> This one's odd because it doesn't enable --enable-objc-gc and also doesn't add
> obj-c++ to the languages list. Actually, it doesn't add it even when you
> USE="objc++" by itself.  It looks like there's really no way to enable objc++
> at the moment. But, that's another bug report.

Or, it might be because GCC < 4.1 doesn't support obj-c++, and the eclass is smart enough to check.  Ignore this bit. :d
Comment 7 Heiko Baums 2006-08-14 14:14:19 UTC
I hadn't had time earlier because of a loooong emerge -uDN world.

Do you still need the the output of 'emerge -pv gcc' or the other error messages?

In any other of your questions about gcc, boehm-gc and objc I unfortunately can't really help you because I don't nearly nothing about it. I'm sorry. ;-)
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2006-10-21 22:01:26 UTC
i looked at this again and i'm pretty sure the problem is leaky USE flags.  gcc versions under 4.0 get objc in IUSE, 4.1 gets objc and objc-gc.  but the test that sets up the configure options for objc* doesn't take that into account.  because of this, users emerging eg. GCC-3.4.6 with objc and objc-gc in their USE flags will see this:

[ebuild   R   ] sys-devel/gcc-3.4.6-r2  USE="nopie nossp objc (-altivec) -bootstrap -boundschecking -build -doc -fortran -gcj -gtk (-hardened) -ip28 -ip32r10k (-multilib) -multislot (-n32) (-n64) -nls -nocxx -test -vanilla" 0 kB

but the eclass will still pass --enable-objc-gc to configure.  i think anyone would agree that USE flags that are not in IUSE and affect the build are evil. ;)

there's two solutions i can think of - put a conditional around `use objc-gc`

--- toolchain.eclass-orig       2006-10-21 21:39:26.000000000 -0600
+++ toolchain.eclass-mod        2006-10-21 21:39:42.000000000 -0600
@@ -1171,7 +1171,9 @@
        is_gcj && GCC_LANG="${GCC_LANG},java"
        if is_objc || is_objcxx ; then
                GCC_LANG="${GCC_LANG},objc"
-               use objc-gc && confgcc="${confgcc} --enable-objc-gc"
+               if tc_version_is_at_least "4.0" ; then
+                       use objc-gc && confgcc="${confgcc} --enable-objc-gc"
+               fi
                is_objcxx && GCC_LANG="${GCC_LANG},obj-c++"
        fi

or add the objc-gc flag to IUSE in gcc-3* and DEPEND on dev-libs/boehm-gc.[1]  i've tested both out and either works.

[1] http://gcc.gnu.org/onlinedocs/gcc/Garbage-Collection.html
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-03-02 21:11:18 UTC
*** Bug 169043 has been marked as a duplicate of this bug. ***
Comment 10 Mark Loeser (RETIRED) gentoo-dev 2008-07-06 02:43:06 UTC
I went with filtering out the flag for <gcc-4.0 since that means we aren't "supporting" any "new" features for it.