diff options
author | cpm <cpm@FreeBSD.org> | 2017-02-28 20:21:13 +0800 |
---|---|---|
committer | cpm <cpm@FreeBSD.org> | 2017-02-28 20:21:13 +0800 |
commit | d8d0c36401a2f48cb0686a36516d42fbcb6b373f (patch) | |
tree | f5e258bdd7e140b2c5c435a750307f6934e890bf | |
parent | e226f19312c37a5086aa7eca08193d272203ea6a (diff) | |
download | freebsd-ports-gnome-d8d0c36401a2f48cb0686a36516d42fbcb6b373f.tar.gz freebsd-ports-gnome-d8d0c36401a2f48cb0686a36516d42fbcb6b373f.tar.zst freebsd-ports-gnome-d8d0c36401a2f48cb0686a36516d42fbcb6b373f.zip |
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)
-rw-r--r-- | security/libgcrypt/Makefile | 4 | ||||
-rw-r--r-- | security/libgcrypt/files/extra-patch-aarch64 | 68 |
2 files changed, 72 insertions, 0 deletions
diff --git a/security/libgcrypt/Makefile b/security/libgcrypt/Makefile index 8760fea857ec..67052389ffe5 100644 --- a/security/libgcrypt/Makefile +++ b/security/libgcrypt/Makefile @@ -33,6 +33,10 @@ OPTIONS_DEFINE= DOCS .include <bsd.port.options.mk> +.if ${ARCH} == "armv6" || ${ARCH} == "aarch64" +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-aarch64 +.endif + .if ${ARCH} == "powerpc" CONFIGURE_ARGS+= --disable-asm .endif diff --git a/security/libgcrypt/files/extra-patch-aarch64 b/security/libgcrypt/files/extra-patch-aarch64 new file mode 100644 index 000000000000..3cf8b1d2f1d4 --- /dev/null +++ b/security/libgcrypt/files/extra-patch-aarch64 @@ -0,0 +1,68 @@ +--- cipher/cipher-gcm-armv8-aarch64-ce.S.orig 2016-11-12 10:39:35 UTC ++++ cipher/cipher-gcm-armv8-aarch64-ce.S +@@ -23,7 +23,7 @@ + defined(HAVE_COMPATIBLE_GCC_AARCH64_PLATFORM_AS) && \ + defined(HAVE_GCC_INLINE_ASM_AARCH64_CRYPTO) + +-.arch armv8-a+crypto ++.cpu generic+simd+crypto + + .text + +--- cipher/rijndael-armv8-aarch64-ce.S.orig 2017-01-18 11:28:40 UTC ++++ cipher/rijndael-armv8-aarch64-ce.S +@@ -23,7 +23,7 @@ + defined(HAVE_COMPATIBLE_GCC_AARCH64_PLATFORM_AS) && \ + defined(HAVE_GCC_INLINE_ASM_AARCH64_CRYPTO) + +-.arch armv8-a+crypto ++.cpu generic+simd+crypto + + .text + +--- cipher/sha1-armv8-aarch64-ce.S.orig 2016-11-12 10:39:35 UTC ++++ cipher/sha1-armv8-aarch64-ce.S +@@ -23,7 +23,7 @@ + defined(HAVE_COMPATIBLE_GCC_AARCH64_PLATFORM_AS) && \ + defined(HAVE_GCC_INLINE_ASM_AARCH64_CRYPTO) && defined(USE_SHA1) + +-.arch armv8-a+crypto ++.cpu generic+simd+crypto + + .text + +--- cipher/sha256-armv8-aarch64-ce.S.orig 2016-11-12 10:39:35 UTC ++++ cipher/sha256-armv8-aarch64-ce.S +@@ -23,7 +23,7 @@ + defined(HAVE_COMPATIBLE_GCC_AARCH64_PLATFORM_AS) && \ + defined(HAVE_GCC_INLINE_ASM_AARCH64_CRYPTO) && defined(USE_SHA256) + +-.arch armv8-a+crypto ++.cpu generic+simd+crypto + + .text + +--- configure.ac.orig 2017-01-18 11:37:00 UTC ++++ configure.ac +@@ -1623,7 +1623,7 @@ AC_CACHE_CHECK([whether GCC inline assem + gcry_cv_gcc_inline_asm_aarch64_neon=no + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [[__asm__( +- ".arch armv8-a\n\t" ++ ".cpu generic+simd\n\t" + "mov w0, \#42;\n\t" + "dup v0.8b, w0;\n\t" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b},[x0],\#32;\n\t" +@@ -1648,7 +1648,11 @@ AC_CACHE_CHECK([whether GCC inline assem + gcry_cv_gcc_inline_asm_aarch64_crypto=no + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [[__asm__( +- ".arch armv8-a+crypto\n\t" ++ ".cpu generic+simd\n\t" ++ ++ "mov w0, \#42;\n\t" ++ "dup v0.8b, w0;\n\t" ++ "ld4 {v0.8b,v1.8b,v2.8b,v3.8b},[x0],\#32;\n\t" + + "sha1h s0, s0;\n\t" + "sha1c q0, s0, v0.4s;\n\t" |