Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2.4.20p5/p6 sparc64 kernel failure
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message

Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Wed Sep 11, 2002 7:54 am    Post subject: 2.4.20p5/p6 sparc64 kernel failure Reply with quote

Noticed a number of sparc64 patches in the 2.4.20x pre-patches for the kernel, so I thought I'd try it out, however, it seems egcs64 is having some problems during "make vmlinux".

make CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.19/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs " -C  arch/sparc64/kernel
make[1]: Entering directory `/usr/src/linux-2.4.19/arch/sparc64/kernel'
sparc64-linux-gcc -D__KERNEL__ -I/usr/src/linux-2.4.19/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs   -nostdinc -iwithprefix include -DKBUILD_BASENAME=init_task  -c -o init_task.o init_task.c
../../gcc/c-typeck.c:5950: Internal compiler error in function add_pending_init
make[1]: *** [init_task.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.19/arch/sparc64/kernel'
make: *** [_dir_arch/sparc64/kernel] Error 2

That's the first time I've hit an "Internal Compiler Error". The code referenced in the egcs64 source, seems to look okay to me, but I know jackall about the advanced mechanisms used in a compiler.
5916: static void
5917: add_pending_init (purpose, value)
5918:      tree purpose, value;
5919: {
5920:   struct init_node *p, **q, *r;
5922:   q = &constructor_pending_elts;
5923:   p = 0;
5925:   if (TREE_CODE (constructor_type) == ARRAY_TYPE)
5926:     {
5927:       while (*q != 0)
5928:         {
5929:           p = *q;
5930:           if (tree_int_cst_lt (purpose, p->purpose))
5931:             q = &p->left;
5932:           else if (tree_int_cst_lt (p->purpose, purpose))
5933:             q = &p->right;
5934:           else
5935:             abort ();
5936:         }
5937:     }
5938:   else
5939:     {
5940:       while (*q != NULL)
5941:         {
5942:           p = *q;
5943:           if (tree_int_cst_lt (DECL_FIELD_BITPOS (purpose),
5944:                                DECL_FIELD_BITPOS (p->purpose)))
5945:             q = &p->left;
5946:           else if (tree_int_cst_lt (DECL_FIELD_BITPOS (p->purpose),
5947:                                     DECL_FIELD_BITPOS (purpose)))
5948:             q = &p->right;
5949:           else
5950:             abort ();

5951:         }
5952:     }
5954:   r = (struct init_node *) oballoc (sizeof (struct init_node));
5955:   r->purpose = purpose;
5956:   r->value = value;
5958:   *q = r;
5959:   r->parent = p;
5960:   r->left = 0;
5961:   r->right = 0;
5963:   r->balance = 0;

That's part of the function in question. I didn't paste the whole thing, since it is a pretty large function. I'm not sure whether this is some odd kernel bug, or if egcs64 is just getting...too old, perhaps? A 2.4.19 kernel compiles fine, but both 2.4.20pre5 and 2.4.20pre6 both die with this error.

I haven't found much information on building GCC 3.2 as a 64bit compiler, but the kernel does appear to have certain checks in the makefile to determine if it's using egcs64 or the newer GCC 3.x compiler.

btw, this is being built on a Sun Blade 100.

"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum