[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    xgcc: language we not recognized Solaris 2.6 egcs 1.1.2 bootstrap
From:       "Mark Wright" <markw () odi ! com ! au>
Date:       1999-03-30 12:59:11
[Download RAW message or body]

Hello,

I'm running into the error "xgcc: language we not recognized" while trying to
"make bootstrap" egcs 1.1.2 on Solaris 2.6 SPARC, with the following configure \
options:

/export/home/tools/egcs/objdir> /export/home/tools/egcs/egcs-1.1.2/configure \
--prefix=/opt/egcs-1.1.2 --enable-shared --enable-version-specific-runtime-libs \
--verbose

The "make bootstrap" fails, the error is:

make[2]: Leaving directory \
`/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libiberty' make[2]: Entering \
directory `/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio' if [ x"yes" = \
xyes ] && [ ! -d pic ]; then \  mkdir pic; \
else true; fi
touch stamp-picdir
rootme=`pwd`/ ; export rootme; \
CC="/export/home/tools/egcs/objdir/gcc/xgcc -B/export/home/tools/egcs/objdir/gcc/ -I. \
-I/export/home/tools/egcs/egcs-1.1.2/libio"; export CC; \ \
CXX="/export/home/tools/egcs/objdir/gcc/xgcc -B/export/home/tools/egcs/objdir/gcc/ \
-I. -I/export/home/tools/egcs/egcs-1.1.2/libio -nostdinc++ -nostdinc++ -g -xwe"; \
export CXX; \ CONFIG_NM="nm"; export CONFIG_NM; \
/bin/sh /export/home/tools/egcs/egcs-1.1.2/libio/gen-params LIB_VERSION=2.8.0  \
                >tmp-params.h
xgcc: language we not recognized

This occurs on the first C++ file it attempts to compile.  I can reproduce this by:

/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio> /bin/sh -x \
                /export/home/tools/egcs/egcs-1.1.2/libio/gen-params LIB_VERSION=2.8.0 \
                >tmp-params.h
/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio> \
/export/home/tools/egcs/objdir/gcc/xgcc -B/export/home/tools/egcs/objdir/gcc/ -I. \
-I/export/home/tools/egcs/egcs-1.1.2/libio -nostdinc++ -nostdinc++ -g -xwe -O -c \
                dummy.C
xgcc: language we not recognized
xgcc: dummy.C: linker input file unused since linking not done
/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio>

For some reason, xgcc doesn't realise that a .C file is C++.  It doesn't know
about .cpp files either:

/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio> ln -s dummy.C dummy.cpp
/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio> \
/export/home/tools/egcs/objdir/gcc/xgcc -B/export/home/tools/egcs/objdir/gcc/ -I. \
-I/export/home/tools/egcs/egcs-1.1.2/libio -nostdinc++ -nostdinc++ -g -xwe -O -c \
                dummy.cpp
xgcc: language we not recognized
xgcc: dummy.cpp: linker input file unused since linking not done
/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio> 

If I tell xgcc it really is C++, its happy:

/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio> \
/export/home/tools/egcs/objdir/gcc/xgcc -B/export/home/tools/egcs/objdir/gcc/ -I. \
-I/export/home/tools/egcs/egcs-1.1.2/libio -nostdinc++ -nostdinc++ -g -xwe -O -c -x \
                c++ dummy.C
/export/home/tools/egcs/objdir/sparc-sun-solaris2.6/libio>

So I added -x c++ to my CXXFLAGS in the Makefile.  But this workaround doesn't
work, as it then thinks that .o files are C++ source files:

/export/home/tools/egcs/objdir/gcc/xgcc -B/export/home/tools/egcs/objdir/gcc/ -g -xwe \
-x c++ -fno-implicit-templates -h libstdc++.so.2.9.0 -shared -o libstdc++.so.2.9.0 \
`cat piclist` -lm pic/cmathi.o:1: unterminated character constant
pic/cmathi.o:8: unterminated string or character constant
pic/cmathi.o:8: possible real start of unterminated constant
pic/cstdlibi.o:1: parse error before character 0177
pic/cstdlibi.o:1: malformed floating constant
pic/cstdlibi.o:1: warning: integer constant out of range
etc, lots more errors omitted.

I can compile the C compiler part of egcs fine, so I compiled and installed
it.  The above errors occur when I'm compiling C++ and all the other languages
in the full egcs 1.1.2 distribution with the egcs 1.1.2 C compiler.
The same error also occurred when I compiled it with gcc 2.8.1.

I'm using GNU make:

/export/home/tools/egcs/objdir> make -v
GNU Make version 3.76.1, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97
        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.

Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.

/export/home/tools/egcs/objdir> 

Please let me know if there's anything you'd like me to try, or how to debug
this problem.

Thanks,

Mark Wright


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic