Re: perl5's use of $(CCCMD)
[email protected] (Andy Dougherty) Thu, 22 Apr 2004 14:29:25 -0400 (EDT)
| Newsgroups | perl.perl5.porters,perl.ponie.dev |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 22 Apr 2004, Nicholas Clark wrote:
> Why does the perl Makefile use $(CCCMD) both for linking and for compiling?
The short mostly-correct answer is "Because in 1994 I didn't know any
better."
> Is there any reason not to split out a linker command, for the rules that
> generate miniperl and perl from object files?
In parrot, I submitted a patch a long time ago to try to cleanly separate
three functions:
Compiler -- tool used to turn .c files into object files.
(Usually cc or cl, or something like that.)
Linker -- tool used to link object files (plus libraries) into
an executable. It is usually $cc on Unix-ish systems.
VMS and Win32 might use "Link".
$ld: Tool used to build dynamically loadable libraries. Often
$cc on Unix-ish systems, but 'ld' on some systems.
Perl's Configure only gives you two variables ($cc and $ld) for those
three functions. The mapping is done via hints files and lots of
special case code sprinkled all over the place.
There's no reason Configure couldn't introduce a new variable, $link,
default it to $cc nearly everywhere, and use it in Makefile.SH.
--
Andy Dougherty [email protected]