petdance/scratch — Issue #806: inter::progs ought to be smarter about finding linker
Author: petdance
Created: 2011-11-01 05:36:57+00:00
State: open
Labels: configure, patch, Pri-normal, Sev-medium

This issue was first discussed in [http://rt.perl.org/rt3/Ticket/Display.html?id=49558 RT #49558]. I'm quoting Andy Dougherty's original post in its entirety.

"This patch just notes a problem area. In order to pick the correct linker on platforms where there is more than one possibility (e.g. the vendor's cc and gcc), Configure.pl needs to know which compiler is being used. Both solaris.pm and dec_osf.pm (assuming my recent patch is applied) handle this with a callback -- immediately after $cc is set, they run a test program to see if $cc is really gcc. Duplicating this callback code in each hints file seems wrong. Configure really ought to do at least some of that guessing right away.

"(The ????? can be filled in with whatever tag RT assigns this.)"
{{{
diff -r -u parrot-current/config/inter/progs.pm parrot-andy/config/inter/progs.pm
--- parrot-current/config/inter/progs.pm 2008-01-02 08:59:40.000000000 -0500
+++ parrot-andy/config/inter/progs.pm 2008-01-09 08:55:50.000000000 -0500
@@ -91,6 +91,15 @@
if $ask;
$conf->data->set( cc => $cc );

+ # XXX [RT ????? ] Configure should do some intelligent guessing here.
+ # Which linker to pick may well depend on the compiler chosen.
+ # If the user picks 'gcc', then the linker should probably
+ # be either 'gcc' or 'g++'.
+ # If the user picks 'cc', then the linker should probably be
+ # the associated c++ compiler, known as 'c++', 'CC', or 'cxx',
+ # or perhaps something else.
+ # Currently, solaris and dec_osf handle this with callbacks.
+ #
$link = integrate( $conf->data->get('link'), $conf->options->get('link') );
$link = prompt( "How about your linker?", $link ) if $ask;
$conf->data->set( link => $link );
}}}
I don't know whether the patch would cleanly apply today.

Thank you very much.[[BR]]
kid51

Trac ID #1056