http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49209

           Summary: Solaris10/SPARC: gcc.c has unresolved references to
                    fatal() while linking xgcc and cpp
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: nicolai.sta...@zmaw.de


Hi everybody,

I just tried to bootstrap gcc-4.6.0 on Solaris10 and got this:

gcc   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H
-Wl,-R/sw/solaris10/gcc/libelf-0.8.13/lib
-Wl,-R/sw/solaris10/gcc/cloog_ppl-0.15.11/lib
-Wl,-R/sw/solaris10/gcc/ppl-0.11.2/lib -Wl,-R/sw/solaris10/gcc/mpc-0.8.2/lib
-Wl,-R/sw/solaris10/gcc/mpfr-3.0.0/lib -Wl,-R/sw/solaris10/gcc/gmp-5.0.1/lib -o
cpp gcc.o opts-common.o gcc-options.o diagnostic.o pretty-print.o input.o vec.o
ggc-none.o \

gcc   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H
-Wl,-R/sw/solaris10/gcc/libelf-0.8.13/lib
-Wl,-R/sw/solaris10/gcc/cloog_ppl-0.15.11/lib
-Wl,-R/sw/solaris10/gcc/ppl-0.11.2/lib -Wl,-R/sw/solaris10/gcc/mpc-0.8.2/lib
-Wl,-R/sw/solaris10/gcc/mpfr-3.0.0/lib -Wl,-R/sw/solaris10/gcc/gmp-5.0.1/lib -o
xgcc gcc.o opts-common.o gcc-options.o diagnostic.o pretty-print.o input.o
vec.o ggc-none.o \
          gccspec.o intl.o prefix.o version.o  ../libcpp/libcpp.a
./../intl/libintl.a  ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
mv -f Tcollect2 collect2
gcc   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H
-Wl,-R/sw/solaris10/gcc/libelf-0.8.13/lib
-Wl,-R/sw/solaris10/gcc/cloog_ppl-0.15.11/lib
-Wl,-R/sw/solaris10/gcc/ppl-0.11.2/lib -Wl,-R/sw/solaris10/gcc/mpc-0.8.2/lib
-Wl,-R/sw/solaris10/gcc/mpfr-3.0.0/lib -Wl,-R/sw/solaris10/gcc/gmp-5.0.1/lib -o
cpp gcc.o opts-common.o gcc-options.o diagnostic.o pretty-print.o input.o vec.o
ggc-none.o \
          cppspec.o intl.o prefix.o version.o  ../libcpp/libcpp.a
./../intl/libintl.a  ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
Undefined                       first referenced
 symbol                             in file
fatal                               gcc.o
ld: fatal: Symbol referencing errors. No output written to xgcc
collect2: ld returned 1 exit status
gmake[4]: *** [xgcc] Error 1
gmake[4]: *** Waiting for unfinished jobs....
Undefined                       first referenced
 symbol                             in file
fatal                               gcc.o
ld: fatal: Symbol referencing errors. No output written to cpp
collect2: ld returned 1 exit status
gmake[4]: *** [cpp] Error 1
rm gcc.pod
gmake[4]: Leaving directory
`/tmp/xas/build/gcc_gcc_4.6.0_default_gcc_32/build/gcc'

I fixed this by copying the fatal() from gcc/errors.c to gcc/diagnostic.c.
However, it is not clear to me why the link succeeds on Debian Lenny (x64) and
fails on Solaris10.

I also recognized that there is some code duplication in diagnostic.c and
errors.c, maybe they're candidates for a cleanup?

Best wishes

Nicolai

Reply via email to