linking ICU

[email protected] (Nicholas Clark) Thu, 29 Apr 2004 16:09:40 +0100
Newsgroups perl.ponie.dev
Message-ID <[email protected]>
I forgot to mail yesterday to say that I'd fixed the C++ linking conundrum
for ponie on OS X. (And probably other places too).

Parrot uses ICU. ICU is written in C++, so needs to be linked with the C++
runtime libraries. The easiest way to do this portably is to call the C++
compiler as the linker. Unfortunately perl's configuration system assumes
that the same program works both as the C compiler and the executable linker,
so to make the C++ compiler be the executable linker means also compiling
all perl's C source with the C++ compiler.

Which breaks. Because parrot's embedding headers pull in a bit of parrot
which isn't valid C++. (perl seems to be clean here).

In the end I found that actually it is remarkably easy to split this age
old assumption in perl's configure system, so now ponie has Configure and
Makefile.SH that support a separate ${link} config var, and ponie's
Configure.PL sets this to be the same linker that Parrot is using.

Nicholas Clark