[lfs-support] GCC-4.7.1 - Pass 2 Error unrecognized command line option '-V' unrecognized command line option '-qversion'

lei huang code.huanglei at gmail.com
Mon Nov 12 07:25:46 PST 2012


Linux  2.6.18-308.16.1.el5 #1 SMP Tue Oct 2 22:01:37 EDT 2012 i686
i686 i386 GNU/Linux

CC=$LFS_TGT-gcc \
AR=$LFS_TGT-ar                  \
RANLIB=$LFS_TGT-ranlib          \
../gcc-4.7.1/configure          \
    --prefix=/tools             \
    --with-local-prefix=/tools  \
    --with-native-system-header-dir=/tools/include \
    --enable-clocale=gnu        \
    --enable-shared             \
    --enable-threads=posix      \
    --enable-__cxa_atexit       \
    --enable-languages=c,c++    \
    --disable-libstdcxx-pch     \
    --disable-multilib          \
    --disable-bootstrap         \
    --disable-libgomp           \
    --with-mpfr-include=$(pwd)/../gcc-4.7.1/mpfr/src \
    --with-mpfr-lib=$(pwd)/mpfr/src/.libs

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libitm support... yes
checking for gcc... i686-lfs-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in
`/mnt/lfs/sources/gcc-build':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

cat config.log | grep error

i686-lfs-linux-gnu-gcc: error: unrecognized command line option '-V'
i686-lfs-linux-gnu-gcc: fatal error: no input files
i686-lfs-linux-gnu-gcc: error: unrecognized command line option '-qversion'
i686-lfs-linux-gnu-gcc: fatal error: no input files
configure:4164: error: in `/mnt/lfs/sources/gcc-build':
configure:4168: error: cannot run C compiled programs.
stage2_werror_flag=''


config.log

Target: i686-lfs-linux-gnu
Configured with: ../gcc-4.7.1/configure --target=i686-lfs-linux-gnu
--prefix=/tools --with-sysroot=/mnt/lfs --with-newlib
--without-headers --with-local-prefix=/tools
--with-native-system-header-dir=/tools/include --disable-nls
--disable-shared --disable-multilib --disable-decimal-float
--disable-threads --disable-libmudflap --disable-libssp
--disable-libgomp --disable-libquadmath --enable-languages=c
--with-mpfr-include=/mnt/lfs/sources/gcc-build/../gcc-4.7.1/mpfr/src
--with-mpfr-lib=/mnt/lfs/sources/gcc-build/mpfr/src/.libs
Thread model: single
gcc version 4.7.1 (GCC)
configure:4045: $? = 0
configure:4034: i686-lfs-linux-gnu-gcc -V >&5
i686-lfs-linux-gnu-gcc: error: unrecognized command line option '-V'
i686-lfs-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4045: $? = 1
configure:4034: i686-lfs-linux-gnu-gcc -qversion >&5
i686-lfs-linux-gnu-gcc: error: unrecognized command line option '-qversion'
i686-lfs-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4045: $? = 1
configure:4065: checking for C compiler default output file name
configure:4087: i686-lfs-linux-gnu-gcc    conftest.c  >&5
configure:4091: $? = 0
configure:4128: result: a.out
configure:4144: checking whether the C compiler works
configure:4153: ./a.out
FATAL: kernel too old
configure:4157: $? = 127
configure:4164: error: in `/mnt/lfs/sources/gcc-build':
configure:4168: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.



help!!!



More information about the lfs-support mailing list