I am using sys-devel/gcc-config-1.5.1 and sys-devel/crossdev-20120305 and am unable to set /usr/bin/gcc to execute the native compiler: # rm /usr/bin/{gccgo,gcc,g++,cc,c++,cpp} # gcc-config -l [1] i686-pc-mingw32-4.5.3 * [2] x86_64-pc-linux-gnu-4.6.2 * # gcc-config 2 * Switching native-compiler to x86_64-pc-linux-gnu-4.6.2 ... [ ok ] # /usr/bin/gcc -dumpspecs | grep -A1 *libgcc: *libgcc: %{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt Reproducible: Always Portage 2.2.0_alpha90 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.2, glibc-2.14.1-r2, 3.2.9-gentoo x86_64) ================================================================= System uname: Linux-3.2.9-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5000+-with-gentoo-2.1 Timestamp of tree: Thu, 08 Mar 2012 18:15:01 +0000 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.2_p20 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.2.2 dev-util/cmake: 2.8.7-r4 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.9.2 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.3 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.6.2 sys-devel/gcc-config: 1.5.1 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers) sys-libs/glibc: 2.14.1-r2 Repositories: gentoo local kde sunrise Installed sets: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-pipe -O2 -march=athlon64-sse3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0 /var/lib/neatx/home" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-pipe -O2 -march=athlon64-sse3" DISTDIR="/var/cache/portage/distfiles" EMERGE_DEFAULT_OPTS="--depclean-lib-check n --with-bdeps y --keep-going" FEATURES="assume-digests binpkg-logs compressdebug distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="" GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://distfiles.gentoo.org" LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--hash-style=gnu" LINGUAS="de" MAKEOPTS="-j3" PKGDIR="/var/cache/portage/packages" PORTAGE_COMPRESS="xz" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/cache/portage/gentoo" PORTDIR_OVERLAY="/var/cache/portage/local /var/cache/portage/overlays/kde /var/cache/portage/overlays/sunrise" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
This might have something to do with crossdev not being able to finish "Emerging cross-mingw-runtime" (I manually unmasked a broken version) and hence not proceeding with "Emerging cross-gcc-stage2" when running "crossdev i686-pc-mingw32". If so, then crossdev should not be able to confuse gcc-config so easily.
(In reply to comment #1) > This might have something to do with crossdev not being able to finish > "Emerging cross-mingw-runtime" (I manually unmasked a broken version) and > hence not proceeding with "Emerging cross-gcc-stage2" when running "crossdev > i686-pc-mingw32". If so, then crossdev should not be able to confuse > gcc-config so easily. Reason: I corrected the mingw-runtime compilation issue so that crossdev could finish including gcc-stage2 and now gcc seems to point to the correct compiler. This might be a coincidence, of course - would be interesting if someone can reproduce it.
(In reply to comment #2) > (In reply to comment #1) > > This might have something to do with crossdev not being able to finish > > "Emerging cross-mingw-runtime" (I manually unmasked a broken version) and > > hence not proceeding with "Emerging cross-gcc-stage2" when running "crossdev > > i686-pc-mingw32". If so, then crossdev should not be able to confuse > > gcc-config so easily. > Reason: I corrected the mingw-runtime compilation issue so that crossdev > could finish including gcc-stage2 and now gcc seems to point to the correct > compiler. This might be a coincidence, of course - would be interesting if > someone can reproduce it. I just tried to reproduce this by unmerging i686-pc-mingw32 and then breaking cross-mingw-runtime building again before trying to reinstall the mingw target, but it did not work.
For comparison, here my merge histories for the cross-i686-pc-mingw32 category and crossdev ("genlop crossdev", "genlop cross-i686-pc-mingw32/"): [...] Wed Nov 23 11:06:17 2011 >>> cross-i686-pc-mingw32/gcc-4.5.3-r1 Fri Dec 2 01:03:20 2011 >>> cross-i686-pc-mingw32/binutils-2.22 Fri Dec 2 07:01:33 2011 >>> cross-i686-pc-mingw32/pthreads-w32-2.8.0 Fri Dec 2 14:28:52 2011 >>> cross-i686-pc-mingw32/mingw-runtime-3.18 Fri Dec 2 14:32:53 2011 >>> cross-i686-pc-mingw32/pthreads-w32-2.8.0 Fri Dec 2 14:51:30 2011 >>> cross-i686-pc-mingw32/w32api-3.17.2 Sat Dec 3 00:07:26 2011 >>> cross-i686-pc-mingw32/binutils-2.22 Tue Dec 6 16:09:15 2011 >>> cross-i686-pc-mingw32/gcc-4.5.3-r1 Sun Dec 11 12:35:15 2011 >>> cross-i686-pc-mingw32/mingw-runtime-3.20 Mon Dec 12 11:00:19 2011 >>> cross-i686-pc-mingw32/binutils-2.22-r1 Tue Dec 13 21:36:34 2011 >>> cross-i686-pc-mingw32/gcc-4.5.3-r2 Sun Feb 5 12:58:24 2012 >>> cross-i686-pc-mingw32/binutils-2.22.52.0.1 Tue Feb 7 19:45:58 2012 >>> cross-i686-pc-mingw32/binutils-2.22-r1 Sat Mar 3 17:07:09 2012 >>> cross-i686-pc-mingw32/binutils-2.22-r1 Sat Mar 3 17:07:33 2012 >>> cross-i686-pc-mingw32/w32api-3.17.2 Sat Mar 3 17:07:55 2012 >>> cross-i686-pc-mingw32/mingw-runtime-3.20 Sat Mar 3 17:15:54 2012 >>> cross-i686-pc-mingw32/gcc-4.5.3-r2 Sat Mar 3 17:16:42 2012 >>> cross-i686-pc-mingw32/w32api-3.17.2 Thu Mar 8 22:08:30 2012 >>> cross-i686-pc-mingw32/mingw-runtime-3.18 Thu Mar 8 22:09:34 2012 >>> cross-i686-pc-mingw32/mingw-runtime-3.18 Thu Mar 8 22:22:49 2012 >>> cross-i686-pc-mingw32/gcc-4.5.3-r2 Thu Mar 8 23:52:48 2012 >>> cross-i686-pc-mingw32/binutils-2.22-r1 Thu Mar 8 23:53:18 2012 >>> cross-i686-pc-mingw32/w32api-3.17.2 Thu Mar 8 23:53:43 2012 >>> cross-i686-pc-mingw32/mingw-runtime-3.20 Fri Mar 9 00:07:18 2012 >>> cross-i686-pc-mingw32/gcc-4.5.3-r2 Fri Mar 9 00:08:17 2012 >>> cross-i686-pc-mingw32/w32api-3.17.2 Fri Mar 9 00:23:37 2012 >>> cross-i686-pc-mingw32/mingw-runtime-3.18 Fri Mar 9 00:24:51 2012 >>> cross-i686-pc-mingw32/mingw-runtime-3.18 Fri Mar 9 00:38:16 2012 >>> cross-i686-pc-mingw32/gcc-4.5.3-r2 [...] Wed Oct 12 11:27:30 2011 >>> sys-devel/crossdev-20111011 Wed Oct 19 10:55:44 2011 >>> sys-devel/crossdev-20111018 Sat Dec 3 05:47:52 2011 >>> sys-devel/crossdev-20111018 Mon Dec 12 11:03:58 2011 >>> sys-devel/crossdev-20111118 Fri Dec 23 19:57:56 2011 >>> sys-devel/crossdev-20111221 Wed Feb 15 18:56:53 2012 >>> sys-devel/crossdev-20120214 Tue Feb 28 22:09:13 2012 >>> sys-devel/crossdev-20120228 Fri Mar 2 01:29:27 2012 >>> sys-devel/crossdev-20120301 Tue Mar 6 02:17:42 2012 >>> sys-devel/crossdev-20120305 /var/log/portage/cross-* does not contain information about invocations of crossdev, so I will have to guess from the merge times listed above: It appears that sys-devel/crossdev-20120301 (built March 2nd) was the last version that built the complete toolchain before it broke (on March 3rd). Would be nice if someone could compare their times.
what does `echo $GCC_SPECS` show ?
(In reply to comment #5) > what does `echo $GCC_SPECS` show ? Here it is currently empty, but I have no idea what it contained when /usr/bin/gcc was still broken.
(In reply to comment #6) > (In reply to comment #5) > > what does `echo $GCC_SPECS` show ? > Here it is currently empty [...] i.e. set but empty: $ grep -z GCC_SPECS /proc/self/environ GCC_SPECS=
well, re-open when you can make it break again