The following message is displayed and fails to compile. libtool: compile: clang -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/mpi -I.. -I../src -I/var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/src -O2 -march=i686 -pipe -fvisibility=hidden -Wall -c /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/mpi/mpih-div.c -fPIC -DPIC -o .libs/mpih-div.o /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/mpi/mpih-div.c:84:14: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions udiv_qrnnd(divisor_limb_inverted, dummy, ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/mpi/longlong.h:463:23: note: expanded from macro 'udiv_qrnnd' : "=a" ((USItype)(q)), \ ^ /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/mpi/mpih-div.c:84:37: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions udiv_qrnnd(divisor_limb_inverted, dummy, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/mpi/longlong.h:464:23: note: expanded from macro 'udiv_qrnnd' "=d" ((USItype)(r)) \ <snip> /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/mpi/longlong.h:449:23: note: expanded from macro 'sub_ddmmss' : "=r" ((USItype)(sh)), \ ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. gmake[2]: *** [mpih-div.lo] Error 1 gmake[2]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2_build/mpi' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2_build' gmake: *** [all] Error 2 and another issue) libtool: compile: clang -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1 /work/libgcrypt-1.5.2/cipher -I.. -I../src -I/var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/w ork/libgcrypt-1.5.2/src -O2 -pipe -fheinous-gnu-extensions -fvisibility=hidden -Wall -c /va r/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/cipher/rijndael.c -fPIC -DP IC -o .libs/rijndael.o /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/cipher/rijndael.c:841:46: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq') "movdqa 0xa0(%%esi), %%xmm1\n\t" ^ <inline asm>:24:2: note: instantiated into assembly here cmp $10, -24(%ebp) ^ /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/cipher/rijndael.c:847:46: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq') "movdqa 0xc0(%%esi), %%xmm1\n\t" ^ <inline asm>:30:2: note: instantiated into assembly here cmp $12, -24(%ebp) ^ <snip> /var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2/cipher/rijndael.c:858:39: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq') "pxor %%xmm1, %%xmm0\n\t" /* xmm0 = input ^ IV */ ^ <inline asm>:40:2: note: instantiated into assembly here cmp $1, -16(%ebp) ^ 10 errors generated. gmake[2]: *** [rijndael.lo] Error 1 gmake[2]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2_build/cipher' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.5.2-r1/work/libgcrypt-1.5.2_build' gmake: *** [all] Error 2 Reproducible: Always Steps to Reproduce: 1. CC=clang CXX="clang++ -stdlib=libc++" emerge dev-libs/libgcrypt 2. 3.
Created attachment 351740 [details, diff] files/libgcrypt-1.5.2-fbsd-clang.patch Taken from FreeBSD's ports patch-cipher-rijndael.c patch-mpi-longlong.h http://svnweb.freebsd.org/ports/head/security/libgcrypt/files/
(In reply to Yuta SATOH from comment #1) > Created attachment 351740 [details, diff] [details, diff] > files/libgcrypt-1.5.2-fbsd-clang.patch > > Taken from FreeBSD's ports > > patch-cipher-rijndael.c > patch-mpi-longlong.h > > http://svnweb.freebsd.org/ports/head/security/libgcrypt/files/ Does this issue still persist with 1.6.4?
(In reply to Kristian Fiskerstrand from comment #2) > (In reply to Yuta SATOH from comment #1) > > Created attachment 351740 [details, diff] [details, diff] [details, diff] > > files/libgcrypt-1.5.2-fbsd-clang.patch > > > > Taken from FreeBSD's ports > > > > patch-cipher-rijndael.c > > patch-mpi-longlong.h > > > > http://svnweb.freebsd.org/ports/head/security/libgcrypt/files/ > > Does this issue still persist with 1.6.4? Thanks for your comment. I had forgotten an update of this bug. This bug has been fixed in the upstream (Fixed in 1.6.4).