* On 24 Dec 2012, Fabian Groffen wrote: > On 18-10-2012 15:12:21 -0500, David Champion wrote: > > +conststrings.c: txt2c config.status > > + ( \ > > + $${CC-cc} --version || \ > > + $${CC-cc} -v || \ > > + $${CC-cc} -V || \ > > + echo "unknown compiler"; \ > > I might have missed the discussion on this, but is there a reason why > the final patch in the repository first runs -v and then --version? The > difference for me is considerable:
There was a reason that I changed it. I wish that I'd documented it. :( It had to do with exit status from various likely $(CC) candidates: on some combination of platform and compiler, using --version first resulted in no useful result, while exiting 0 so that -v never got a chance. -v, then --version was the more reliable sequence. It may have been an issue with an older clang/llvm -- perhaps a third-party clang on OSX prior to Apple's switch from gcc to clang. It's not a problem on 10.8 with Apple clang, nor with Sun CC. AIX? I've changed jobs and I no longer have access to the same set of machines for testing, and I can no longer say what the particular break was. To me the "too much output" result isn't a big problem but if you want to send a patch to reverse those two options I'd be OK with it until someone reports a real build problem in the wild, and then maybe we need to look at more complex solutions such as case globbing. > % x86_64-apple-darwin11-gcc --version > x86_64-apple-darwin11-gcc (GCC) 4.2.1 (Gentoo 4.2.1_p5666-r1, Apple Inc. > build 5666) (dot 3) > Copyright (C) 2007 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > % sparcv9-sun-solaris2.10-gcc --version > sparcv9-sun-solaris2.10-gcc (Gentoo 4.6.3 p1.7, pie-0.5.2) 4.6.3 > Copyright (C) 2011 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > compared to: > > % x86_64-apple-darwin11-gcc -v > Using built-in specs. > Target: x86_64-apple-darwin11 > Configured with: > /Library/Gentoo/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/configure > --prefix=/Library/Gentoo/usr > --bindir=/Library/Gentoo/usr/x86_64-apple-darwin11/gcc-bin/4.2.1 > --includedir=/Library/Gentoo/usr/lib/gcc/x86_64-apple-darwin11/4.2.1/include > --datadir=/Library/Gentoo/usr/share/gcc-data/x86_64-apple-darwin11/4.2.1 > --mandir=/Library/Gentoo/usr/share/gcc-data/x86_64-apple-darwin11/4.2.1/man > --infodir=/Library/Gentoo/usr/share/gcc-data/x86_64-apple-darwin11/4.2.1/info > --with-gxx-include-dir=/Library/Gentoo/usr/lib/gcc/x86_64-apple-darwin11/4.2.1/include/g++-v4 > --host=x86_64-apple-darwin11 --enable-version-specific-runtime-libs > --build=x86_64-apple-darwin11 --enable-nls --without-included-gettext > --with-system-zlib --disable-checking --disable-werror --enable-shared > --enable-threads=posix --with-local-prefix=/Library/Gentoo/usr > --with-as=/Library/Gentoo/usr/bin/x86_64-apple-darwin11-as > --with-ld=/Library/Gentoo/usr/bin/x86_64-apple-darwin11-ld --disable-multilib > --enable-languages=c,c++,objc,obj-c++,fortran --enable-libgomp > Thread model: posix > gcc version 4.2.1 (Gentoo 4.2.1_p5666-r1, Apple Inc. build 5666) (dot 3) > > % sparcv9-sun-solaris2.10-gcc -v > Using built-in specs. > COLLECT_GCC=/gentoo/prefix64/usr/sparcv9-sun-solaris2.10/gcc-bin/4.6.3/sparcv9-sun-solaris2.10-gcc > COLLECT_LTO_WRAPPER=/gentoo/prefix64/usr/libexec/gcc/sparcv9-sun-solaris2.10/4.6.3/lto-wrapper > Target: sparcv9-sun-solaris2.10 > Configured with: > /gentoo/prefix64/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure > --prefix=/gentoo/prefix64/usr > --bindir=/gentoo/prefix64/usr/sparcv9-sun-solaris2.10/gcc-bin/4.6.3 > --includedir=/gentoo/prefix64/usr/lib/gcc/sparcv9-sun-solaris2.10/4.6.3/include > --datadir=/gentoo/prefix64/usr/share/gcc-data/sparcv9-sun-solaris2.10/4.6.3 > --mandir=/gentoo/prefix64/usr/share/gcc-data/sparcv9-sun-solaris2.10/4.6.3/man > > --infodir=/gentoo/prefix64/usr/share/gcc-data/sparcv9-sun-solaris2.10/4.6.3/info > > --with-gxx-include-dir=/gentoo/prefix64/usr/lib/gcc/sparcv9-sun-solaris2.10/4.6.3/include/g++-v4 > --host=sparcv9-sun-solaris2.10 --build=sparcv9-sun-solaris2.10 > --disable-altivec --disable-fixed-point --without-ppl --without-cloog > --enable-lto --enable-nls --without-included-gettext --with-system-zlib > --enable-obsolete --disable-werror --enable-secureplt --disable-multilib > --disable-libmudflap --enable-libssp --disable-libgomp > --with-python-dir=/share/gcc-data/sparcv9-sun-solaris2.10/4.6.3/python > --enable-checking=release --disable-libgcj --disable-libquadmath > --enable-languages=c,c++ --enable-shared --enable-threads=posix > --with-local-prefix=/gentoo/prefix64/usr --enable-__cxa_atexit > --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.7, > pie-0.5.2' --with-gnu-ld --with-gnu-as > Thread model: posix > gcc version 4.6.3 (Gentoo 4.6.3 p1.7, pie-0.5.2) > > > The latter output is used now, but to my taste way too lengthy for > mutt -v output. The compiler output itself already takes almost a full > terminal window here. > > > > -- > Fabian Groffen > Gentoo on a different level -- David Champion • d...@bikeshed.us