Wrong configure test for PCH ?

Benjamin Kosnik bkoz@redhat.com
Tue Sep 30 13:51:00 GMT 2003


>AC_DEFUN(GLIBCXX_ENABLE_PCH, [
>...
>
>      echo '#include <math.h>' > conftest.h
>      if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
>             -o conftest.h.gch 1>&5 2>&1 &&
>...
>
>I think there is a '-c' missing there.

No, not with  -x c++-header.

%/mnt/hd/bld/gcc/gcc/xgcc -B/mnt/hd/bld/gcc/gcc/ -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/bin/ -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/lib/ -x c++ config.h -o config.h.gch
/usr/lib/crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status


 %/mnt/hd/bld/gcc/gcc/xgcc -B/mnt/hd/bld/gcc/gcc/ -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/bin/ -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/lib/ -x c++-header config.h -o config.h.gch


This configure test is correct.

best,
benjamin



More information about the Libstdc++ mailing list