if C compiler is gcc and C++ compiler is not g++, C++ compiler gets g++ flags (maybe redirect to autoconf?) export CXX=/usr/bin/CC gcc-4.5.1/configure -enable-build-with-cxx /usr/bin/CC -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.5/gcc -I../../gcc-4.5/gcc/. -I../../gcc-4.5/gcc/../include -I../../gcc-4.5/gcc/../libcpp/include -I/home/jkrell/dev2/cm3/m3-sys/m3cc/SOLsun/./gmp -I/home/jkrell/dev2/cm3/m3-sys/m3cc/gcc-4.5/gmp -I../../gcc-4.5/gcc/../libdecnumber -I../../gcc-4.5/gcc/../libdecnumber/dpd -I../libdecnumber -I/usr/include/libelf ../../gcc-4.5/gcc/df-core.c -o df-core.o CC: Warning: Option -W passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wwrite-strings passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wmissing-format-attribute passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -pedantic passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wno-long-long passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wno-variadic-macros passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wno-overlength-strings passed to ld, if ld is invoked, ignored otherwise /usr/bin/CC -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros seems a bit off. I'm trying now with CXX=CC, CC=cc. The autoconf log is looking better. - Jay
Created attachment 22315 [details] toplevel config.log
Created attachment 22316 [details] libcpp config.log
jkrell@login [login]:~/src > ssh current10s Last login: Sun Nov 7 23:09:51 2010 from login.bo.opencs Sun Microsystems Inc. SunOS 5.10 Generic January 2005 -bash-4.1$ cd obj -bash-4.1$ mkdir b -bash-4.1$ cd b -bash-4.1$ which gcc no gcc in /home/jkrell/sparc/bin /opt/csw/bin /usr/bin /usr/ccs/bin /opt/csw/bin -bash-4.1$ export CC=/opt/csw/gcc4/bin/gcc -bash-4.1$ $CC -v Using built-in specs. Target: sparc-sun-solaris2.8 Configured with: ../gcc-4.3.3/configure --prefix=/opt/csw/gcc4 --exec-prefix=/opt/csw/gcc4 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-prefix=/opt/csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-awt=xlib --enable-libada --enable-libssp --enable-objc-gc --enable-threads=posix --enable-stage1-languages=c --enable-languages=ada,c,c++,fortran,java,objc Thread model: posix gcc version 4.3.3 (GCC) -bash-4.1$ export CXX=CC -bash-4.1$ $CXX -V CC: Sun C++ 5.9 SunOS_sparc 2007/05/03 -bash-4.1$ which ar /usr/ccs/bin/ar -bash-4.1$ which gmake /opt/csw/bin/gmake -bash-4.1$ which make /usr/ccs/bin/make -bash-4.1$ export MAKE=gmake -bash-4.1$ uname -a SunOS current10s 5.10 Generic_142909-17 sun4v sparc SUNW,SPARC-Enterprise-T5220 /home/jkrell/src/gcc-trunk/configure -prefix=$HOME/test2 -enable-build-with-cxx && $MAKE ..... gmake[3]: Entering directory `/home/jkrell/obj/b/libcpp' source='/home/jkrell/src/gcc-trunk/libcpp/charset.c' object='charset.o' libtool=no DEPDIR=.deps depmode=dashXmstdout /bin/bash /home/jkrell/src/gcc-trunk/libcpp/../depcomp CC -I/home/jkrell/src/gcc-trunk/libcpp -I. -I/home/jkrell/src/gcc-trunk/libcpp/../include -I./../intl -I/home/jkrell/src/gcc-trunk/libcpp/include -g -W -Wall -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -I/home/jkrell/src/gcc-trunk/libcpp -I. -I/home/jkrell/src/gcc-trunk/libcpp/../include -I./../intl -I/home/jkrell/src/gcc-trunk/libcpp/include -c /home/jkrell/src/gcc-trunk/libcpp/charset.c CC: Warning: Option -W passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wwrite-strings passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wmissing-format-attribute passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -pedantic passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option -Wno-long-long passed to ld, if ld is invoked, ignored otherwise attached toplevel config.log and libcpp/config.log excerpt: configure:4440: checking whether /opt/csw/gcc4/bin/gcc supports -pedantic -Wno-long-long WARN_PEDANTIC='-pedantic -Wno-long-long' so you can see, CC and CXX are configured the same by autoconf, even though they might not be related.
another, this is an older Darwin/powerpc machine, using some version of g++ http://hudson.modula3.com:8080/job/cm3-current-m3cc-PPC_DARWIN/93/consoleFull g++ -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -DHAVE_CONFIG_H -o m3cgc1 m3cg/parse.o m3cg/m3-convert.o attribs.o main.o libbackend.a ../libcpp/libcpp.a ../libcpp/libcpp.a ../libiberty/libiberty.a -L/Volumes/luthien/home/hudson2/workspace/cm3-m3cc-PPC_DARWIN/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp/.libs -lgmp -L/Volumes/luthien/home/hudson2/workspace/cm3-m3cc-PPC_DARWIN/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp/.libs -lgmp ld: Undefined symbols: __Z29legitimate_indirect_address_pP7rtx_defi Presumed fix: remove inline on config/rs6000/rs6000.c/legitimate_indirect_address.