Phil Sexton wrote:
Could someone expound on these 3 commands? I don't really understand
the man and info pages on these.
gcc -v
gcc --version
(I thought the previous two were the same.)
cat /proc/version
gcc -v tells you what programs are invoked by gcc. gcc being a
collection of compilers, this can differ quite a bit depending on
your configuration.
*****
# gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
Configured with:
/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/configure --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.4
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --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
Thread model: posix
gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
*****
gcc --version very simply tells you the version of gcc and spams you
about the GPL ;-)
*****
# gcc --version
gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
Copyright (C) 2004 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.
*****
cat /proc/version tells you a bunch of stuff about your kernel, not
gcc specifically. It does, however, mention with which version of gcc
your kernel was compiled.
*****
# cat /proc/version
Linux version 2.6.15-gentoo-r1 ([EMAIL PROTECTED]) (gcc version 3.4.4 (Gentoo
3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)) #1 SMP PREEMPT Tue Jan 24
19:46:43 EST 2006
*****
--
gentoo-user@gentoo.org mailing list