# New Ticket Created by Andy Dougherty # Please include the string: [perl #31443] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31443 >
Currently, Configure.pl checks if your compiler is gcc before it determines what compiler to use. Similarly, it enables optimization before choosing the compiler. This is (obviously, I hope) backwards. Here's the current order: Checking MANIFEST.....................................................done. Setting up Configure's data structures................................done. Tweaking settings for miniparrot......................................done. Determining if your C compiler is actually gcc........................done. Loading platform and local hints files................................done. Enabling optimization.................................................done. Determining nongenerated header files.................................done. Determining what C compiler and linker to use.........................done. The gcc check should come *after* choosing the compiler, and optimizer flags should only be chosen after you actually have a compiler. The patch below fixes these things. Alas, there's a problem still. Configure.pl loads up the hints files before determining the compiler, but hints files may well want to take different actions depending on the compiler in question. (In fact, the solaris hints file does so now, but it doesn't generally work because it relies on the gcc-version test, which is currently not necessarily done with the right compiler!) The correct solution to this conundrum is not obvious to me. In perl5, we have a complex set of call-back units, and we also have a convention that the compiler ought to be chosen on the Configure command line. I think parrot needs some sort of plan for how it will handle such issues, otherwise we'll likely end up with an unmaintainable hodge-podge. Anyway, here's the patch: diff -r -u parrot-current/lib/Parrot/Configure/RunSteps.pm parrot-andy/lib/Parrot/Configure/RunSteps.pm --- parrot-current/lib/Parrot/Configure/RunSteps.pm Thu Sep 2 03:00:19 2004 +++ parrot-andy/lib/Parrot/Configure/RunSteps.pm Fri Sep 3 14:56:12 2004 @@ -28,11 +28,11 @@ init/manifest.pl init/data.pl init/miniparrot.pl - auto/gcc.pl init/hints.pl - init/optimize.pl init/headers.pl inter/progs.pl + auto/gcc.pl + init/optimize.pl inter/types.pl inter/ops.pl inter/exp.pl