Re: [pcre-dev] [Bug 664] ABI breakage in PCRE 7.6

Etusivu
Poista viesti
Lähettäjä: Ian Lance Taylor
Päiväys:  
Vastaanottaja: Craig Silverstein
Kopio: pcre-dev, 664
Aihe: Re: [pcre-dev] [Bug 664] ABI breakage in PCRE 7.6
csilvers@??? (Craig Silverstein) writes:

> } Don't you need to concatenate the macro and the string constant? Otherwise the
> } compiler thinks they're separate symbols.
>
> Sorry for the typos and failures. When I tested pcre on a mac, I
> accidentally tested an old version. :-( Testing the most recent
> version runs across the same problems you encountered.
>
> This problem is easily fixable, and is due to the fact the __USERfoo
> macro is not a string. I'll send out a patch to philip to fix that
> part.
>
> However, we're left with the fact that mach-o doesn't seem to support
> alises at all -- I thought it supported weak alises.
>
> I a bit at my wit's end as to how to fix this. Ian, any more ideas?


It seems like the aliasing should work--I mean, the symbol is not
actually undefined, right? But in any case....

If you are creating a shared library, then it looks like the Darwin
linker supports a -alias option. You could invoke this from the
compiler as -Wl,-alias,__ZN7pcrecpp6no_argE,__ZN7pcrecpp2RE6no_argE
(or something like that). That would only work if you are creating a
shared library, though--it won't work for a .a file.

Otherwise I'm out of ideas.

Ian