Underscore prefix detection fix

Gregor Riepl seto-kun at freesurf.ch
Wed Jul 4 18:31:09 CEST 2007


Hi there

I'm working on a native build of wireshark on OS X, which uses Gtk+/ 
Quartz and doesn't require X11 emulation.
Since wireshark depends on libgcrypt (indirectly), I wondered why it  
wasn't possible to build working i586 assembly optimisations on OS X/ 
Intel.
make check fails with error messages about unknown __mpih_* symbols  
in the test programs (I'm using libgcrypt-1.2.4 here).

As I could see, this problem is known (<http://lists.gnupg.org/ 
pipermail/gnupg-devel/2007-January/023506.html>), but no one had  
fixed it yet. So I tried my own luck.

After some backtracing, I found a small bug in the autoconf script  
that prevents it from detecting if the operating system's ABI  
required underscores (_) in front of symbol names. This is indeed the  
case on OS X/Intel, so those underscores were "forgotten" while  
compiling assembly modules and lead to the aformentioned unknown  
symbols.

The hardest part was to fix the problem in a clean way, which is  
somehow difficult with the way autoconf et al. works. It's also very  
well possible that different versions lead to different configure  
scripts, which do not work correctly any more. It might be possible  
that $global_symbol_pipe was renamed to $lt_cv_sys_global_symbol_pipe  
at some point of time, together with providing a different output  
(which has to be trimmed with cut, for example).
One of the two things I fixed is independent of the autoconf version,  
though: a closing brace was forgotten in the conftest.c code.

I hope it works for other people and can be integrated into the next  
version.

Regards
Gregor

So, long story short, here's my patch:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgcrypt-1.2.4-underscore.patch
Type: application/octet-stream
Size: 2092 bytes
Desc: not available
Url : /pipermail/attachments/20070704/18cfc60d/attachment.obj 
-------------- next part --------------



More information about the Gcrypt-devel mailing list