[PATCH] mpi: Fix powerpc32 build

NIIBE Yutaka gniibe at fsij.org
Wed May 9 02:38:32 CEST 2018


Dirk Eibach <dirk.eibach at gdsys.cc> wrote:
> We are using ppc32 in our products for ages. This is simply the first
> time we need libgcrypt.

What's your build and host environment?

For powerpc-unknown-linux-gnu, it has been built successfuly for years.

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

> 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

This particular issue is handled by configure script with the var
ac_cv_sys_symbol_underscore.  Like:

   $ ./configure ac_cv_sys_symbol_underscore=no

But I wonder why this is needed on your machine.
Do you cross-compiling?

In libgcrypt/acinclude.m4, it defaults to "yes" for cross-compiling, now:

      if test "$cross_compiling" = yes; then
        if test "x$ac_cv_sys_symbol_underscore" = x ; then
           ac_cv_sys_symbol_underscore=yes
        fi
      else
         tmp_do_check="yes"
      fi

I think that given the situation for modern tool-chain like ELF,
probably, it's better to default to "no".
-- 



More information about the Gcrypt-devel mailing list