cross compile libgcrypt for dm500

Jussi Kivilinna jussi.kivilinna at iki.fi
Fri Apr 20 17:53:21 CEST 2018


Hello,

On 19.04.2018 12:15, disit wrote:
> Hi Jussi,
> I am trying to cross compile libgcrypt for my STB receiver Dreambox 500s
> (PowerPc CPU).
> I am using the official toolchain for this STB, which features a very old
> gcc compiler indeed (3.4.4), but I am forced to do so for compatibility
> issues.
> 
> This is the configure I am using
> 
> CC=/opt/cross/dm500/cdk/bin/powerpc-tuxbox-linux-gnu-gcc CFLAGS="-Wall
> -mcpu=405 -msoft-float -mmultiple -mstring -meabi -pipe -O2 -ggdb3
> -DHAVE_DREAMBOX_HARDWARE" ./configure --host=powerpc-unknown-linux-gnu
> --enable-static --with-libgpg-error-prefix=/opt/cross/gnupg/libgpg-error/
> --prefix=/opt/cross/gnupg/libgcrypt --disable-asm
> 
> Though, I am getting an error and don't know how to solve:
> 
> libtool: link: /opt/cross/dm500/cdk/bin/powerpc-tuxbox-linux-gnu-gcc
> -I/opt/cross/gnupg/libgpg-error/include -Wall -mcpu=405 -msoft-float
> -mmultiple -mstring -meabi -pipe -O2 -ggdb3 -DHAVE_DREAMBOX_HARDWARE -Wall
> -o basic basic.o  ../src/.libs/libgcrypt.so ../compat/.libs/libcompat.a
> -L/opt/cross/gnupg/libgpg-error/lib
> /opt/cross/gnupg/libgpg-error/lib/libgpg-error.so
> -Wl,-rpath -Wl,/opt/gnupg/libgcrypt-1.8.2/src/.libs -Wl,-rpath
> -Wl,/opt/cross/gnupg/libgpg-error/lib -Wl,-rpath
> -Wl,/opt/cross/gnupg/libgcrypt/lib
> -Wl,-rpath -Wl,/opt/cross/gnupg/libgpg-error/lib
> basic.o(.rodata+0xa01cc): undefined reference to `.LC3075'
> collect2: ld returned 1 exit status
> Makefile:608: recipe for target 'basic' failed
> make[2]: *** [basic] Error 1
> make[2]: Leaving directory '/opt/gnupg/libgcrypt-1.8.2/tests'
> Makefile:477: recipe for target 'all-recursive' failed
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory '/opt/gnupg/libgcrypt-1.8.2'
> Makefile:408: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> Do you have idea how to solve?

This might be compiler bug. 'basic' test ends up being quite large, so
maybe generated code hits some internal limit in gcc-3.4.4. Have you
tried different optimization levels, -O0, -O1, -Os, etc?

-Jussi



More information about the Gcrypt-devel mailing list