This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Build failure with 3.1 CVS on sparc-sun-solaris2.8

I know the release of 3.1 is still a few months away, but I'm wondering
if it will be buildable with earlier releases of gcc on the Sparc plat-
form.  I know there's been some corrections with using Sun's compiler
to build it (and it seems to be working), but trying with gcc 2.95.3
seems to fail shortly after the first stage pass completes:

../configure --with-cpu=ultrasparc --prefix=/usr/local/gcc

make CFLAGS='-O2' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
[stage 1 runs successfully]
stage1/xgcc -Bstage1/ -B/usr/local/gcc/sparc-sun-solaris2.8/bin/ -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H -DGENERATOR_FILE  -o genflags \
 genflags.o rtl.o read-rtl.o bitmap.o ggc-none.o gensupport.o print-rtl.o errors.o ../libiberty/libiberty.a
ld: warning: file ../libiberty/libiberty.a(hashtab.o): wrong ELF class: ELFCLASS32
Undefined          first referenced
 symbol                in file
htab_create                         read-rtl.o
_obstack_begin                      genflags.o
_sch_toupper                        genflags.o
obstack_free                        read-rtl.o
htab_find                           read-rtl.o
_sch_istable                        read-rtl.o
xstrdup                             read-rtl.o
xmalloc                             genflags.o
htab_find_slot                      read-rtl.o
_obstack_newchunk                   genflags.o
htab_traverse                       read-rtl.o
ld: fatal: Symbol referencing errors. No output written to genflags
collect2: ld returned 1 exit status
gmake[2]: *** [genflags] Error 1
gmake[2]: Leaving directory home/klareau/gcc/sparc-sun-solaris2.8/gcc'
gmake[1]: *** [stage2_build] Error 2
gmake[1]: Leaving directory home/klareau/gcc/sparc-sun-solaris2.8/gcc'
gmake: *** [bootstrap] Error 2

After trying a quick test, apparently it seems that the stage 1 xgcc
builds 64-bit object files and executables by default, which causes
the above to fail since libiberty was built as a 32-bit library.  I
can get around this by first building a single pass of just the C com-
piler, install it, then use it to do a full bootstrap, but that method
seems a bit of a hack.

So I guess the question is will gcc 3.1 be buildable with only Sun's
compilers or a pre-built 64-bit version of gcc 3.1 on Sparc, or can
this issue be fixed relatively easily to allow earlier versions of
gcc to build 3.1 properly?

Ken Lareau

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]