[PATCH] mpi: Fix powerpc32 build

Jussi Kivilinna jussi.kivilinna at mbnet.fi
Wed May 9 07:13:25 CEST 2018

On 07.05.2018 12:56, Dirk Eibach wrote:
> Ping.
I've noticed underscore build problem with powerpc when cross-compiling on 
x86-64 system. This can be avoided by giving 'ac_cv_sys_symbol_underscore=no'
parameter to 'configure'. When building on native powerpc system this does
not appear to be required.

On native build [1] and cross-compile with 'ac_cv_sys_symbol_underscore=no', 
configure gives:

  checking for _ prefix in compiled symbols... no

Cross-compile without 'ac_cv_sys_symbol_underscore=no' on Ubuntu x86-64

  checking for _ prefix in compiled symbols... yes


[1] https://buildd.debian.org/status/fetch.php?pkg=libgcrypt20&arch=powerpc&ver=1.8.2-2&stamp=1522261299&raw=0

> 2018-04-26 8:39 GMT+02:00 Dirk Eibach <dirk.eibach at gdsys.cc>:
>> Hi Werner,
>> sorry my last try to reply got HTML encoded and had the wrong sender
>> address. Using android for sending emails is probably not a wise
>> choice m(
>> 2018-04-25 17:54 GMT+02:00 Werner Koch <wk at gnupg.org>:
>>> On Wed, 25 Apr 2018 14:09, dirk.eibach at gdsys.cc said:
>>>> The ENTRY macro is called with C format parameter.
>>>> Adding a second underscore breaks the build.
>>> This code has not been changed for ages.  Thus I am wondering why you
>>> see a build problem only now.  Well, I can't remember that I ever used a
>>> powerpc32 box and this leads to the question why you start to use
>>> powerpc32 now.
>> We are using ppc32 in our products for ages. This is simply the first
>> time we need libgcrypt.
>> I saw that the code has not been changed for ages. But if you have a
>> look at syntax.h, it is pretty obvious that it cannot work this way.
>> EALIGN adds another underscore while END does not.
>> But they are called (e.g. inmpih-add1.S) with
>> EALIGN(_gcry_mpih_add_n,3,0) and END(_gcry_mpih_add_n).
>> Both start the parameter with an underscore.
>> After passing the preprocessor this results in:
>> .globl __gcry_mpih_add_n; .type __gcry_mpih_add_n, at function; .align 3;
>> ; __gcry_mpih_add_n:
>> ...
>> .size _gcry_mpih_add_n,.-_gcry_mpih_add_n
>> This leads to
>> Error: .size expression for _gcry_mpih_add_n does not evaluate to a constant
>> Cheers
>> Dirk
> _______________________________________________
> Gcrypt-devel mailing list
> Gcrypt-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

More information about the Gcrypt-devel mailing list