Guys,

I've been wanting to relax the dependency that parrot's core has on
parrot_config. As things stand at the moment, src/global_setup.c makes
a call to parrot_get_config which is linked into the executable itself
by selecting either null_config.o, parrot_config.o or
install_config.o.

This works pretty well on most platforms so far, but is a major
headache for building on cygwin (and Windows?) and perhaps some future
platforms. Why? Well, some platforms have a limitation whereby a
Shared Library or DLL cannot access symbolic information in the
executable that loads them. This will affect us more as parrot is used
as a library, or we try to get dynclasses working on awkward
platforms.

What I've done is add a function to optionally register the config
string -- That way the call is exclusively from the executable into
parrot only. The contents of the config *.c files is slightly changed,
and the function parrot_get_config has been moved into a new file
src/config.c (better names gladly accepted!)

Since registering the config string is optional, utilities such as
pbc_merge and pdb no longer need to link with null_config.o.

At the moment this patch is for review as I'm expecting some good
advise before it hopefully gets accepted.

Cheers,

Nick

Attachment: config.patch
Description: Binary data

Reply via email to