On 11/07/07, Andy Dougherty <[EMAIL PROTECTED]> wrote:
On Wed, 11 Jul 2007, Paul Cochrane wrote:

> To be able to configure parrot to build with icc (the intel C
> compiler) one currently needs a command line which looks like this:
>
> perl Configure.pl --cc=icc --link=icc --ld=icc
> --ccflags="<icc-header-path> -no-gcc" --ccwarn="-wd269 -Wall -Wcheck
> -w2"
>
> However, the only things which need to be specified here are:
>
> (a) the cc setting
> (b) the icc header path
>
> the rest is set in the linux hints file.
>
> So what's the problem you ask?  Well, to get icc to see its own header
> files, one needs to specify the icc header path in the --ccflags
> option.  This overwrites any settings given in the hints file.

Then I'd say the hints file is broken.  Unless it has good reason, the
hints file shouldn't normally remove command-line information.  In perl5
hints, the usual idiom is to add to existing ccflags, not replace them.

> It
> would be great to give a configure command like this instead:
>
> perl Configure.pl --cc=icc --ccflags-append=<icc-header-path>

For consistency, I would think there should also be an -append option for
every Configure variable.  (Whether you wish to write it as

        --ccflags-append=icc_header_path

or
        --append ccflags=icc_header_path

or some other syntax is, at some level, irrelevant.  What I'm saying is
that instead of introducing an append syntax specific to ccflags, you
should introduce a generic append syntax and then use it (if needed) for
ccflags.

That's a really good idea, and works far better in general.  :-)

I'm also advocating revising the hints file so the append syntax isn't
needed!

The problem doesn't really reside in the hints file, as the relevant
settings are appended there.  What happens is that in the C<runstep()>
method of config/inter/progs.pm all settings set on the command line
overwrite (with the help of the C<integrate()> method; see
lib/Parrot/Configure/Step.pm) any other settings already worked out by
the hints.  Should I then just alter the C<integrate()> method to
append any settings on the command line to those added in the hints?
At present, if any "new" settings are passed to C<integrate()> then
they replace and "old" settings.  Is this a good idea?  This changes
the current functionality quite a bit, which is something I was
wanting to avoid.

So, what is the general feeling?  Should we add an --append
<flag_name>=<extra_settings> option, or should we change the way
C<integrate()> behaves so as instead of replacing old values with new,
it actually goes through and "integrates" them as its name suggests?

Paul

Reply via email to