Leopold Toetsch <[EMAIL PROTECTED]> writes:
> Dan Sugalski <[EMAIL PROTECTED]> wrote:
>
> > I think we're entering a maze of twisty little compiler version quirks,
> > all of them annoying. :(
>
> The problem is JIT_CGP. This does nasty things with call frames, as well
> as gcc does. Only core_ops_cgp.c has to be compiled with
> mno-accumulate-... Or we disable JIT_CGP for failing gcc versions.
That explains something. The compilation of cgoto is so anoyingly slow
on my machine that I nearly always configure with --cgoto=0.
Another idea would be only add -mnoaccumulate-... if the target
supports it and needs it.
Something like this:
Index: config/auto/gcc.pl
===================================================================
RCS file: /cvs/public/parrot/config/auto/gcc.pl,v
retrieving revision 1.12
diff -u -r1.12 gcc.pl
--- config/auto/gcc.pl 13 Oct 2003 14:19:28 -0000 1.12
+++ config/auto/gcc.pl 13 Oct 2003 17:35:22 -0000
@@ -18,8 +18,9 @@
%gnuc=eval cc_run() or die "Can't run the test program: $!";
cc_clean();
- my($gccversion, $warns, $ccwarn);
+ my($gccversion, $warns, $ccwarn, $ccflags);
$ccwarn=Configure::Data->get('ccwarn');
+ $ccflags=Configure::Data->get('ccflags');
unless (exists $gnuc{__GNUC__}) {
return;
@@ -74,7 +75,7 @@
2.7 => "",
2.8 => "-Wsign-compare",
2.95 => "",
- 3.0 => "-Wformat-nonliteral -Wformat-security -Wpacked
-Wdisabled-optimization -mno-accumulate-outgoing-args -Wno-shadow",
+ 3.0 => "-Wformat-nonliteral -Wformat-security -Wpacked
-Wdisabled-optimization -Wno-shadow",
# -Wsequence-point is part of -Wall
# -Wfloat-equal may not be what we want
# We shouldn't be using __packed__, but I doubt -Wpacked will harm us
@@ -96,6 +97,11 @@
}
$warns = join ' ', @warns;
}
+ # target dependend options
+ my $target = Configure::Data->get('cpuarch');
+ if ($target eq 'i386' && $gccversion >= 3.0) {
+ $ccflags .= ' -mno-accumulate-outgoing-args';
+ }
}
if (defined $miniparrot && $gccversion) {
@@ -112,6 +118,7 @@
Configure::Data->set(
ccwarn => "$warns $ccwarn",
+ ccflags => $ccflags,
gccversion => $gccversion
);
}
Index: lib/Parrot/Configure/RunSteps.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/Configure/RunSteps.pm,v
retrieving revision 1.26
diff -u -r1.26 RunSteps.pm
--- lib/Parrot/Configure/RunSteps.pm 30 Sep 2003 12:52:47 -0000 1.26
+++ lib/Parrot/Configure/RunSteps.pm 13 Oct 2003 17:35:23 -0000
@@ -23,9 +23,9 @@
auto/byteorder.pl
auto/pack.pl
auto/format.pl
+ auto/jit.pl
auto/gcc.pl
auto/isreg.pl
- auto/jit.pl
auto/funcptr.pl
auto/cgoto.pl
auto/gc.pl