From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH V2] libxcrypt: Upgrade to 4.4.1 release
Date: Mon, 17 Dec 2018 21:11:48 -0800 [thread overview]
Message-ID: <20181218051149.33374-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20181218051149.33374-1-raj.khem@gmail.com>
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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../0001-Add-x32-specific-inline-asm.patch | 42 +++++++++++++++++++
...{libxcrypt_4.1.1.bb => libxcrypt_4.4.1.bb} | 8 ++--
2 files changed, 47 insertions(+), 3 deletions(-)
create mode 100644 meta/recipes-core/libxcrypt/files/0001-Add-x32-specific-inline-asm.patch
rename meta/recipes-core/libxcrypt/{libxcrypt_4.1.1.bb => libxcrypt_4.4.1.bb} (70%)
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 @@
+From 7d01f2acf6fde6341a68a91f9b343841cc424af7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 17 Dec 2018 11:33:35 -0800
+Subject: [PATCH] Add x32 specific inline asm
+
+Upstream-Status: Pending [https://github.com/besser82/libxcrypt/issues/74#issuecomment-447966455]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ alg-yescrypt-opt.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/alg-yescrypt-opt.c b/alg-yescrypt-opt.c
+index 5dbd822..060caf4 100644
+--- a/alg-yescrypt-opt.c
++++ b/alg-yescrypt-opt.c
+@@ -528,6 +528,11 @@ static volatile uint64_t Smask2var = Smask2;
+ #undef MAYBE_MEMORY_BARRIER
+ #define MAYBE_MEMORY_BARRIER \
+ __asm__("" : : : "memory");
++#ifdef __ILP32__ /* x32 */
++#define REGISTER_PREFIX "e"
++#else
++#define REGISTER_PREFIX "r"
++#endif
+ #define PWXFORM_SIMD(X) { \
+ __m128i H; \
+ __asm__( \
+@@ -537,8 +542,8 @@ static volatile uint64_t Smask2var = Smask2;
+ "pmuludq %1, %0\n\t" \
+ "movl %%eax, %%ecx\n\t" \
+ "shrq $0x20, %%rax\n\t" \
+- "paddq (%3,%%rcx), %0\n\t" \
+- "pxor (%4,%%rax), %0\n\t" \
++ "paddq (%3,%%" REGISTER_PREFIX "cx), %0\n\t" \
++ "pxor (%4,%%" REGISTER_PREFIX "ax), %0\n\t" \
+ : "+x" (X), "=x" (H) \
+ : "d" (Smask2), "S" (S0), "D" (S1) \
+ : "cc", "ax", "cx"); \
+--
+2.20.1
+
diff --git a/meta/recipes-core/libxcrypt/libxcrypt_4.1.1.bb b/meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb
similarity index 70%
rename from meta/recipes-core/libxcrypt/libxcrypt_4.1.1.bb
rename to 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."
HOMEPAGE = "https://github.com/besser82/libxcrypt"
SECTION = "libs"
LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM ?= "file://LICENSING;md5=cb3ca4cabd2447a37bf186fad6f79852 \
+LIC_FILES_CHKSUM ?= "file://LICENSING;md5=e28ba6195a4e39904919b78a92bcf27e \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
"
inherit autotools pkgconfig
-SRCREV ?= "21b455b68baad279e6a3936faced16c5e5634376"
+# v4.4.1
+SRCREV ?= "b8714d4e9e37cf0d511917bd5eea0e51e4a397d5"
SRCBRANCH ?= "develop"
SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \
+ file://0001-Add-x32-specific-inline-asm.patch \
"
PROVIDES = "virtual/crypt"
@@ -22,6 +24,6 @@ FILES_${PN} = "${libdir}/libcrypt*.so.* ${libdir}/libcrypt-*.so ${libdir}/libowc
S = "${WORKDIR}/git"
BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE} -std=gnu99"
-TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error=missing-attributes"
BBCLASSEXTEND = "nativesdk"
--
2.20.1
next prev parent reply other threads:[~2018-12-18 5:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 5:11 [PATCH 1/2] grub2: Fix passing null to printf formats Khem Raj
2018-12-18 5:11 ` Khem Raj [this message]
2018-12-18 5:11 ` [PATCH 2/2] gnupg: Upgrade to 2.2.12 release Khem Raj
-- strict thread matches above, loose matches on Subject: below --
2018-12-17 19:40 [PATCH V2] libxcrypt: Upgrade to 4.4.1 release Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181218051149.33374-2-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox