Created attachment 180185 [details] Output of `make build` command Although the `configure` seems to determine the NEON instruction set is not supported, `make build` compiles assembly files with NEON instructions - resulting in a failure to compile. `security/libgcrypt` port provides no option to disable assembly.
(In reply to Simon Rozman from comment #0) As a workaround, configure libgcrypt with --disable-neon-support Thanks for reporting
(In reply to Carlos J. Puga Medina from comment #1) Same result: cipher-gcm-armv8-aarch64-ce.S:401:35: error: instruction requires: neon The port is configured using: root@rpi3:/usr/ports/security/libgcrypt/work/libgcrypt-1.7.6 # ./config.status --config '--disable-drng-support' '--disable-neon-support' '--enable-static=yes' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/info/' '--build=aarch64-portbld-freebsd12.0' 'build_alias=aarch64-portbld-freebsd12.0' 'CC=cc' 'CFLAGS=-O2 -pipe -fno-strict-aliasing -std=gnu89' 'LDFLAGS=' 'LIBS=' 'CPPFLAGS=' 'CPP=cpp' Perhaps the libgcrypt-1.7.6 itself has an issue.
(In reply to Simon Rozman from comment #2) Second attempt: Try to disable NEON and ARMv8 crypto support. --disable-neon-support --disable-arm-crypto-support
(In reply to Carlos J. Puga Medina from comment #3) The same. No matter how I play with `configure` parameters, `make` can not avoid compiling the notorious `cipher-gcm-armv8-aarch64-ce.S` file.
root@rpi3:/usr/ports/security/libgcrypt/work/libgcrypt-1.7.6/cipher # cc --version FreeBSD clang version 3.9.1 (tags/RELEASE_391/final 289601) (based on LLVM 3.9.1) Target: aarch64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin
(In reply to Simon Rozman from comment #5) Indeed, the NEON instructions cannot be compiled with clang. checking whether GCC inline assembler supports NEON instructions... n/a checking whether GCC inline assembler supports AArch32 Crypto Extension instructions... n/a checking whether GCC inline assembler supports AArch64 NEON instructions... no checking whether GCC inline assembler supports AArch64 Crypto Extension instructions... yes It's complaining that it doesn't support ARM NEON Try using ARM NEON: no (unsupported by compiler)
Created attachment 180321 [details] libgcrypt patch This patch fixes the build, please commit
(In reply to Kirill Ponomarew from comment #7) It works! Thanks Kirill
A commit references this bug: Author: cpm Date: Tue Feb 28 12:21:14 UTC 2017 New revision: 435049 URL: https://svnweb.freebsd.org/changeset/ports/435049 Log: security/libgcrypt: fix build on aarch64 libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -Wa,--noexecstack -O2 -pipe -fno-strict-aliasing -std=gnu89 -MT cipher-gcm-armv8-aarch64-ce.lo -MD -MP -MF .deps/cipher-gcm-armv8-aarch64-ce.Tpo -c cipher-gcm-armv8-aarch64-ce.S -fPIC -DPIC -o .libs/cipher-gcm-armv8-aarch64-ce.o cipher-gcm-armv8-aarch64-ce.S:190:3: error: instruction requires: neon eor v31.16b, v31.16b, v31.16b ^ PR: 217271 Submitted by: krion Reported by: Simon Rozman <simon@rozman.si> MFH: 2017Q1 (blanket) Changes: head/security/libgcrypt/Makefile head/security/libgcrypt/files/ head/security/libgcrypt/files/extra-patch-aarch64
A commit references this bug: Author: cpm Date: Tue Feb 28 12:28:24 UTC 2017 New revision: 435050 URL: https://svnweb.freebsd.org/changeset/ports/435050 Log: MFH: r435049 security/libgcrypt: fix build on aarch64 libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -Wa,--noexecstack -O2 -pipe -fno-strict-aliasing -std=gnu89 -MT cipher-gcm-armv8-aarch64-ce.lo -MD -MP -MF .deps/cipher-gcm-armv8-aarch64-ce.Tpo -c cipher-gcm-armv8-aarch64-ce.S -fPIC -DPIC -o .libs/cipher-gcm-armv8-aarch64-ce.o cipher-gcm-armv8-aarch64-ce.S:190:3: error: instruction requires: neon eor v31.16b, v31.16b, v31.16b ^ PR: 217271 Submitted by: krion Reported by: Simon Rozman <simon@rozman.si> Approved by: ports-secteam (blanket) Changes: _U branches/2017Q1/ branches/2017Q1/security/libgcrypt/Makefile branches/2017Q1/security/libgcrypt/files/
Committed! Thanks