[PATCH] mpi: Fix powerpc32 build

Dirk Eibach dirk.eibach at gdsys.cc
Thu Apr 26 08:39:31 CEST 2018


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



More information about the Gcrypt-devel mailing list