Need help for building security/libgcrypt on ARM with clang

hiren panchasara hiren.panchasara at gmail.com
Thu Jun 27 21:05:48 UTC 2013


On Thu, Jun 27, 2013 at 1:52 PM, hiren panchasara
<hiren.panchasara at gmail.com> wrote:
> On Sun, Mar 10, 2013 at 5:56 AM, Olivier Cochard-Labbé
> <olivier at cochard.me> wrote:
>> Hi,
>>
>> I would to build security/libgcrypt on ARM with clang but I've got problem
>> with longlong.h
>>
>> On first run, clang complain about:
>>
>> error: invalid use of a cast in a inline asm context requiring an l-value:
>> remove the cast or build with -fheinous-gnu-extension
>> ./longlong.h:230:25: note: expanded from macro 'umul_ppmm'
>>                    : "=&r" ((USItype)(xh)),
>>
>> => For fixing this problem, I've use the same method as in
>> files/patch-mpi-longlong.h for I386 arch on the ARM section.
>>
>> But there is a new problem:
>>
>> error: invalid % escape in inline assembly string
>> ./longlong.h:228:14: note: expanded from macro 'umul_ppmm'
>>   __asm__ ("%@ Inlined umul_ppmm\n"
>
> I am also stuck right now on similar error while building libgcrypt:
>
> mpih-div.c:98:3: error: invalid % escape in inline assembly string
>                 UDIV_QRNND_PREINV(dummy, r, r,
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Has anyone built this successfully?

Grabbed the pkg from http://mirrors.nycbug.org/pub/FreeBSD_ARM/pkg/
which works just fine.

A *huge* thanks to all who maintain and upgrade this repo!

cheers,
Hiren
>
> cheers,
> Hiren
>>
>> => For fixing this problem, I've completely remove the "%@ Inlined
>> umul_ppmm\n"  string.
>>
>> But...there is a new problem and I don't know how to fix it:
>>
>> error: invalid operand in inline asm: 'umull ${1:r}, ${0:r}, ${2:r}, ${3:r}'
>> ./longlong.h:229:5: note: expanded from macro 'umul_ppmm'
>>            "umull %r1, %r0, %r2, %r3"
>>
>> Where is the problem ?
>>
>> My current nonworking longlong.h patch is here:
>> http://gugus69.free.fr/freebsd/patch-mpi-longlong.h
>>
>> Thanks,
>> _______________________________________________
>> freebsd-arm at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"


More information about the freebsd-arm mailing list