Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inter::progs ought to be smarter about finding linker #679

Open
jkeenan opened this issue Sep 22, 2009 · 0 comments
Open

inter::progs ought to be smarter about finding linker #679

jkeenan opened this issue Sep 22, 2009 · 0 comments

Comments

@jkeenan
Copy link
Contributor

jkeenan commented Sep 22, 2009

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

Originally http://trac.parrot.org/parrot/ticket/1056

@rurban rurban removed the Patch label Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants