summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libxcrypt
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-17 11:40:04 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-18 16:19:34 +0000
commit195c763eff990cd6d45813ba56005bd3e5dda5ba (patch)
tree970ecffd93ba09ee375f836caa0d59db0c8224c6 /meta/recipes-core/libxcrypt
parentd59c162a3303a2b31f1df3680c25fdd86551eac4 (diff)
downloadpoky-195c763eff990cd6d45813ba56005bd3e5dda5ba.tar.gz
libxcrypt: Upgrade to 4.4.1 release
License-Update: New files added to existing list Add -Wno-error=missing-attributes to compiler flags, this helps in compiling with gcc 9.0, eventually, the code should be fixed Add a patch to fix x32 build (From OE-Core rev: 59be9254df9ffeda594b21af8be433564c898474) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/libxcrypt')
-rw-r--r--meta/recipes-core/libxcrypt/files/0001-Add-x32-specific-inline-asm.patch42
-rw-r--r--meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb (renamed from meta/recipes-core/libxcrypt/libxcrypt_4.1.1.bb)8
2 files changed, 47 insertions, 3 deletions
diff --git a/meta/recipes-core/libxcrypt/files/0001-Add-x32-specific-inline-asm.patch b/meta/recipes-core/libxcrypt/files/0001-Add-x32-specific-inline-asm.patch
new file mode 100644
index 0000000000..9e31b03561
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/files/0001-Add-x32-specific-inline-asm.patch
@@ -0,0 +1,42 @@
1From 7d01f2acf6fde6341a68a91f9b343841cc424af7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 17 Dec 2018 11:33:35 -0800
4Subject: [PATCH] Add x32 specific inline asm
5
6Upstream-Status: Pending [https://github.com/besser82/libxcrypt/issues/74#issuecomment-447966455]
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 alg-yescrypt-opt.c | 9 +++++++--
11 1 file changed, 7 insertions(+), 2 deletions(-)
12
13diff --git a/alg-yescrypt-opt.c b/alg-yescrypt-opt.c
14index 5dbd822..060caf4 100644
15--- a/alg-yescrypt-opt.c
16+++ b/alg-yescrypt-opt.c
17@@ -528,6 +528,11 @@ static volatile uint64_t Smask2var = Smask2;
18 #undef MAYBE_MEMORY_BARRIER
19 #define MAYBE_MEMORY_BARRIER \
20 __asm__("" : : : "memory");
21+#ifdef __ILP32__ /* x32 */
22+#define REGISTER_PREFIX "e"
23+#else
24+#define REGISTER_PREFIX "r"
25+#endif
26 #define PWXFORM_SIMD(X) { \
27 __m128i H; \
28 __asm__( \
29@@ -537,8 +542,8 @@ static volatile uint64_t Smask2var = Smask2;
30 "pmuludq %1, %0\n\t" \
31 "movl %%eax, %%ecx\n\t" \
32 "shrq $0x20, %%rax\n\t" \
33- "paddq (%3,%%rcx), %0\n\t" \
34- "pxor (%4,%%rax), %0\n\t" \
35+ "paddq (%3,%%" REGISTER_PREFIX "cx), %0\n\t" \
36+ "pxor (%4,%%" REGISTER_PREFIX "ax), %0\n\t" \
37 : "+x" (X), "=x" (H) \
38 : "d" (Smask2), "S" (S0), "D" (S1) \
39 : "cc", "ax", "cx"); \
40--
412.20.1
42
diff --git a/meta/recipes-core/libxcrypt/libxcrypt_4.1.1.bb b/meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb
index 465aa96523..5e5d7c077c 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt_4.1.1.bb
+++ b/meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb
@@ -3,16 +3,18 @@ DESCRIPTION = "Forked code from glibc libary to extract only crypto part."
3HOMEPAGE = "https://github.com/besser82/libxcrypt" 3HOMEPAGE = "https://github.com/besser82/libxcrypt"
4SECTION = "libs" 4SECTION = "libs"
5LICENSE = "LGPLv2.1" 5LICENSE = "LGPLv2.1"
6LIC_FILES_CHKSUM ?= "file://LICENSING;md5=cb3ca4cabd2447a37bf186fad6f79852 \ 6LIC_FILES_CHKSUM ?= "file://LICENSING;md5=e28ba6195a4e39904919b78a92bcf27e \
7 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ 7 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
8" 8"
9 9
10inherit autotools pkgconfig 10inherit autotools pkgconfig
11 11
12SRCREV ?= "21b455b68baad279e6a3936faced16c5e5634376" 12# v4.4.1
13SRCREV ?= "b8714d4e9e37cf0d511917bd5eea0e51e4a397d5"
13SRCBRANCH ?= "develop" 14SRCBRANCH ?= "develop"
14 15
15SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \ 16SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \
17 file://0001-Add-x32-specific-inline-asm.patch \
16 " 18 "
17 19
18PROVIDES = "virtual/crypt" 20PROVIDES = "virtual/crypt"
@@ -22,6 +24,6 @@ FILES_${PN} = "${libdir}/libcrypt*.so.* ${libdir}/libcrypt-*.so ${libdir}/libowc
22S = "${WORKDIR}/git" 24S = "${WORKDIR}/git"
23 25
24BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE} -std=gnu99" 26BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE} -std=gnu99"
25TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" 27TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error=missing-attributes"
26 28
27BBCLASSEXTEND = "nativesdk" 29BBCLASSEXTEND = "nativesdk"