public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Build failure with 3.1 CVS on sparc-sun-solaris2.8
@ 2002-02-06 10:17 Kenneth Lareau
  2002-02-06 11:37 ` Jeff Sturm
  0 siblings, 1 reply; 17+ messages in thread
From: Kenneth Lareau @ 2002-02-06 10:17 UTC (permalink / raw)
  To: gcc

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
elessar@numenor.org

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: Build failure with 3.1 CVS on sparc-sun-solaris2.8
@ 2002-02-06 17:49 Richard Kenner
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Kenner @ 2002-02-06 17:49 UTC (permalink / raw)
  To: rth; +Cc: gcc

    With sources as of what date?  I believe I fixed this
    Monday afternoon (2002-02-04).

As another datapoint, the last two nights a GNAT bootstrap on Sparc
failed with a miscompiled stage2/gnat1.  I haven't looked at it yet.

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: Build failure with 3.1 CVS on sparc-sun-solaris2.8
@ 2002-02-06 18:32 Brad Lucier
  2002-02-06 21:54 ` Jeff Sturm
  0 siblings, 1 reply; 17+ messages in thread
From: Brad Lucier @ 2002-02-06 18:32 UTC (permalink / raw)
  To: rth, gcc; +Cc: Brad Lucier

> With sources as of what date?  I believe I fixed this
> Monday afternoon (2002-02-04).

I'm having a similar problem in cc1, where the stack pointer is bogus upon
entry to a function.  The .i file is quite big, so I was hoping to
find time to come up with a smaller example, but since the problem is in
cc1, perhaps the following example will help to find it.

These are sources from

LAST_UPDATED: Wed Feb  6 08:12:45 UTC 2002

So it's after some of your recent fixes.

The source file is at

http://www.math.purdue.edu/~lucier/GNATS/GNATS-1/_meroon.i.gz

It seems that the frame pointer is bogus, too.

Brad

banach-5% gdb /pkgs/gcc-3.1v9/lib/gcc-lib/sparcv9-sun-solaris2.8/3.1/cc1
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc64-sun-solaris2.8"...
(gdb) run -m64 -fPIC -O1 -fschedule-insns2 -fno-math-errno -fno-strict-aliasing -mcpu=ultrasparc -mtune=ultrasparc -Wall -W -Wno-unused _meroon.i
Starting program: /pkgs/gcc-3.1v9/lib/gcc-lib/sparcv9-sun-solaris2.8/3.1/cc1 -m64 -fPIC -O1 -fschedule-insns2 -fno-math-errno -fno-strict-aliasing -mcpu=ultrasparc -mtune=ultrasparc -Wall -W -Wno-unused _meroon.i
 {GC 5329k -> 1143k} ___H__20___meroon {GC 150229k -> 
Program received signal SIGSEGV, Segmentation fault.
0x1002aff90 in ggc_set_mark ()
(gdb) disassem
Dump of assembler code for function ggc_set_mark:
0x1002aff90 <ggc_set_mark>:     save  %sp, -2240, %sp
0x1002aff94 <ggc_set_mark+4>:   sethi  %hi(0), %o3
0x1002aff98 <ggc_set_mark+8>:   sethi  %hi(0x50b000), %o0
0x1002aff9c <ggc_set_mark+12>:  or  %o3, 1, %o1
0x1002affa0 <ggc_set_mark+16>:  sllx  %o1, 0x20, %o1
0x1002affa4 <ggc_set_mark+20>:  add  %o1, %o0, %o1
0x1002affa8 <ggc_set_mark+24>:  mov  -1, %o0
...
(gdb) info registers
g0             0x0      0
g1             0x0      0
g2             0x0      0
g3             0x0      0
g4             0xffffffff7f248a1c       -2161866212
g5             0x80ffe400       2164253696
g6             0x0      0
g7             0x0      0
o0             0x10a76a480      4470514816
o1             0x10018e10c      4296597772
o2             0x100    256
o3             0x40000  262144
o4             0x10a75a8c0      4470450368
o5             0x0      0
sp             0xffffffff7f7fdbb1       18446744071553670065
o7             0x10018e118      4296597784
l0             0x10675f700      4403361536
l1             0x0      0
l2             0x41     65
l3             0x10a765c88      4470496392
l4             0x0      0
l5             0x0      0
l6             0x0      0
l7             0x0      0
i0             0x10a772240      4470547008
i1             0x3c4c00 3951616
i2             0x178    376
i3             0x200000 2097152
i4             0x10a75a8c0      4470450368
i5             0x0      0
fp             0xffffffff7f7fec70       18446744071553674352
...

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2002-02-09  5:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-06 10:17 Build failure with 3.1 CVS on sparc-sun-solaris2.8 Kenneth Lareau
2002-02-06 11:37 ` Jeff Sturm
2002-02-06 17:21   ` Richard Henderson
2002-02-06 17:32     ` Kenneth Lareau
2002-02-06 17:34       ` Richard Henderson
2002-02-06 18:36         ` Kenneth Lareau
2002-02-07 15:25           ` Kenneth Lareau
2002-02-09  0:33             ` Kenneth Lareau
2002-02-06 17:49 Richard Kenner
2002-02-06 18:32 Brad Lucier
2002-02-06 21:54 ` Jeff Sturm
2002-02-07  0:07   ` Richard Henderson
2002-02-07  7:55     ` Jeff Sturm
2002-02-07  8:17       ` Jakub Jelinek
2002-02-07 10:03         ` Jeff Sturm
2002-02-07 10:40   ` Brad Lucier
2002-02-07 10:52     ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).