cvsuser 04/07/28 23:56:35
Modified: classes fixedpmcarray.pmc config/init/hints linux.pl imcc cfg.c io io_buf.c ops debug.ops src py_func.c string.c Log: [perl #30847] [PATCH] icc fixes The first attached patch resolves some issues that have crept in since the last cleanup (before ICU) w.r.t. Intel C++ on Linux. Courtesy of Adam Thomason <[EMAIL PROTECTED]> Revision Changes Path 1.18 +7 -4 parrot/classes/fixedpmcarray.pmc Index: fixedpmcarray.pmc =================================================================== RCS file: /cvs/public/parrot/classes/fixedpmcarray.pmc,v retrieving revision 1.17 retrieving revision 1.18 diff -u -w -r1.17 -r1.18 --- fixedpmcarray.pmc 26 Jul 2004 08:27:22 -0000 1.17 +++ fixedpmcarray.pmc 29 Jul 2004 06:56:15 -0000 1.18 @@ -1,6 +1,6 @@ /* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. -$Id: fixedpmcarray.pmc,v 1.17 2004/07/26 08:27:22 leo Exp $ +$Id: fixedpmcarray.pmc,v 1.18 2004/07/29 06:56:15 leo Exp $ =head1 NAME @@ -65,12 +65,15 @@ static void array_sort(Interp *interpreter, PMC *self, PMC *cmp_func) { int (*func)(void*, void*); + PMC *first; + INTVAL type; + PMC *s; if (REG_INT(3) == 0) { - PMC *first = ((PMC**)PMC_data(self))[0]; + first = ((PMC**)PMC_data(self))[0]; /* XXX simulate MMD inheritance: Int isa TT */ - INTVAL type = first->vtable->base_type - 1; - PMC *s = mmd_vtfind(interpreter, MMD_CMP, type, 0); + type = first->vtable->base_type - 1; + s = mmd_vtfind(interpreter, MMD_CMP, type, 0); /* cmp was overriden ? */ if (s->vtable->base_type == enum_class_Sub) { cmp_func = s; 1.9 +15 -3 parrot/config/init/hints/linux.pl Index: linux.pl =================================================================== RCS file: /cvs/public/parrot/config/init/hints/linux.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- linux.pl 18 May 2004 09:22:01 -0000 1.8 +++ linux.pl 29 Jul 2004 06:56:20 -0000 1.9 @@ -1,5 +1,9 @@ my $libs = Configure::Data->get('libs'); my $cflags = Configure::Data->get('ccflags'); +my $cc = Configure::Data->get('cc'); +my $linkflags = Configure::Data->get('linkflags'); +my $link = 'c++'; # should find g++ in most cases + if ($libs !~ /-lpthread/) { $libs .= ' -lpthread'; } @@ -8,12 +12,20 @@ $ld_shared .= ' -fPIC'; } +if ( $cc =~ /icc/ ) { + $link = 'icc'; # Intel C++ compiler has the same name as its C compiler + $cflags .= ' -no-gcc'; # don't allow icc to pretend it's gcc + $cflags .= ' -wd269'; # suppress sprintf warnings that don't apply +} +else { + $linkflags .= ' -Wl,-E'; # --export-dynamic, s. info gcc, ld +} + Configure::Data->set( ccflags => $cflags, libs => $libs, ld_shared => $ld_shared, i_lib_pthread => 1, # XXX fake a header entry - linkflags => '-Wl,-E', # --export-dynamic, s. info gcc, ld - link => 'c++', + linkflags => $linkflags, + link => $link, ); - 1.61 +2 -1 parrot/imcc/cfg.c Index: cfg.c =================================================================== RCS file: /cvs/public/parrot/imcc/cfg.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -w -r1.60 -r1.61 --- cfg.c 14 May 2004 13:25:09 -0000 1.60 +++ cfg.c 29 Jul 2004 06:56:22 -0000 1.61 @@ -253,9 +253,10 @@ for (pred = bb->pred_list; pred; pred = pred->next) { int found = 0; + SymReg *r; if (!strcmp(pred->from->end->op, "bsr")) { - SymReg *r = pred->from->end->r[0]; + r = pred->from->end->r[0]; sub = pred->to->start; if ((sub->type & ITLABEL) && 1.28 +5 -4 parrot/io/io_buf.c Index: io_buf.c =================================================================== RCS file: /cvs/public/parrot/io/io_buf.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -w -r1.27 -r1.28 --- io_buf.c 15 Jul 2004 08:02:24 -0000 1.27 +++ io_buf.c 29 Jul 2004 06:56:29 -0000 1.28 @@ -1,6 +1,6 @@ /* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. -$Id: io_buf.c,v 1.27 2004/07/15 08:02:24 leo Exp $ +$Id: io_buf.c,v 1.28 2004/07/29 06:56:29 leo Exp $ =head1 NAME @@ -501,6 +501,7 @@ ParrotIOBuf *b; size_t len = 1; STRING *s; + size_t avail; s = PIO_make_io_string(interpreter, buf, 1); @@ -513,7 +514,7 @@ /* read Data from buffer */ if (b->flags & PIO_BF_READBUF) { - size_t avail = b->endb - b->next; + avail = b->endb - b->next; /* if we have data available, copy out the next byte */ if (avail) { @@ -584,7 +585,7 @@ else internal_exception(1, "readline: buffer too short"); } - out_buf = (char*)s->strstart + s->strlen; + out_buf = (unsigned char*)s->strstart + s->strlen; memcpy(out_buf, buf_start, len); s->strlen = l; if (PIO_buf_fill_readbuf(interpreter, layer, io, b) == 0) @@ -601,7 +602,7 @@ else internal_exception(1, "readline: buffer too short"); } - out_buf = (char*)s->strstart + s->strlen; + out_buf = (unsigned char*)s->strstart + s->strlen; len = b->next - buf_start; memcpy(out_buf, buf_start, len); s->strlen = s->bufused = l; 1.11 +3 -1 parrot/ops/debug.ops Index: debug.ops =================================================================== RCS file: /cvs/public/parrot/ops/debug.ops,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- debug.ops 6 Jul 2004 16:57:07 -0000 1.10 +++ debug.ops 29 Jul 2004 06:56:32 -0000 1.11 @@ -137,10 +137,12 @@ op die() :base_debug { _exit(0); + goto NEXT(); } op die(in INT) :base_debug { _exit($1); + goto NEXT(); } 1.44 +2 -2 parrot/src/py_func.c Index: py_func.c =================================================================== RCS file: /cvs/public/parrot/src/py_func.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -w -r1.43 -r1.44 --- py_func.c 23 Jul 2004 16:25:50 -0000 1.43 +++ py_func.c 29 Jul 2004 06:56:35 -0000 1.44 @@ -1,6 +1,6 @@ /* Copyright: 2001-2004 The Perl Foundation. All Rights Reserved. -$Id: py_func.c,v 1.43 2004/07/23 16:25:50 leo Exp $ +$Id: py_func.c,v 1.44 2004/07/29 06:56:35 leo Exp $ =head1 NAME @@ -1110,7 +1110,7 @@ case -41: /* MMD_CMP */ f = NULL; if (v->vtable->base_type == enum_class_NCI) { - f = PMC_struct_val(v); + f = (funcptr_t) PMC_struct_val(v); mmd_register(interpreter, -nr, type, type, f); mmd_register(interpreter, -nr, type, 0, f); return; 1.211 +2 -2 parrot/src/string.c Index: string.c =================================================================== RCS file: /cvs/public/parrot/src/string.c,v retrieving revision 1.210 retrieving revision 1.211 diff -u -w -r1.210 -r1.211 --- string.c 12 Jul 2004 17:26:19 -0000 1.210 +++ string.c 29 Jul 2004 06:56:35 -0000 1.211 @@ -1,6 +1,6 @@ /* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. -$Id: string.c,v 1.210 2004/07/12 17:26:19 leo Exp $ +$Id: string.c,v 1.211 2004/07/29 06:56:35 leo Exp $ =head1 NAME @@ -1095,8 +1095,8 @@ { internal_exception(UNIMPLEMENTED, "string_str_index: case not implemented yet"); - return -1; } + return -1; } /*