From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/3] libxcrypt: Fix build with gcc8
Date: Thu, 10 May 2018 23:52:48 -0700 [thread overview]
Message-ID: <20180511065249.40069-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20180511065249.40069-1-raj.khem@gmail.com>
Reported-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...format-truncation-warning-with-gcc-8.patch | 36 +++++++++++++++++++
.../recipes-core/libxcrypt/libxcrypt_4.0.0.bb | 4 ++-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch
diff --git a/meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch b/meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch
new file mode 100644
index 0000000000..654eae6c6a
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch
@@ -0,0 +1,36 @@
+From c8c5908611e44a649489e8d217528fedc4864e14 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 10 May 2018 13:32:20 -0700
+Subject: [PATCH] disable format-truncation warning with gcc-8
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ crypt-sunmd5.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/crypt-sunmd5.c b/crypt-sunmd5.c
+index 4c85b7f..3e838cd 100644
+--- a/crypt-sunmd5.c
++++ b/crypt-sunmd5.c
+@@ -151,6 +151,11 @@ getrounds (const char *s)
+ return ((uint32_t)val);
+ }
+
++#pragma GCC diagnostic push
++#if defined(__GNUC__) && (__GNUC__ >= 8)
++#pragma GCC diagnostic ignored "-Wformat-truncation"
++#endif
++
+ void
+ gensalt_sunmd5_rn (unsigned long count,
+ const uint8_t *rbytes, size_t nrbytes,
+@@ -189,6 +194,7 @@ gensalt_sunmd5_rn (unsigned long count,
+ "$" CRYPT_ALGNAME "," ROUNDS "%u$%s$",
+ (unsigned int)count, rndstr);
+ }
++#pragma GCC diagnostic pop
+
+ void
+ crypt_sunmd5_rn (const char *phrase, const char *setting,
diff --git a/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb b/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb
index a1be4be7ef..8cc5edac49 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb
+++ b/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb
@@ -12,7 +12,9 @@ inherit autotools
SRCREV ?= "215b32aa4e0b255c3356a96bd6d257661bad73ca"
SRCBRANCH ?= "master"
-SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \
+ file://0001-disable-format-truncation-warning-with-gcc-8.patch \
+ "
PROVIDES = "virtual/crypt"
--
2.17.0
next prev parent reply other threads:[~2018-05-11 6:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 6:52 [PATCH 1/3] gcc-sanitizers: Package new liblsan objects built with gcc8 Khem Raj
2018-05-11 6:52 ` Khem Raj [this message]
2018-05-11 6:52 ` [PATCH 3/3] uninative-tarball: Add libjis and euc-jp gconv files Khem Raj
2018-05-23 4:53 ` Khem Raj
2018-05-11 14:13 ` [PATCH 1/3] gcc-sanitizers: Package new liblsan objects built with gcc8 Dan McGregor
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=20180511065249.40069-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