Skip to contentSkip to conversation

gcc-sanitizers: Package new liblsan objects built with gcc8

PATCH In review Khem Raj 2 participants 5 messages May 11, 2018 – May 23, 2018

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 gcc-sanitizers: Package new liblsan objects built with gcc8

Fixes installed-vs-shipped QA errors

---
 meta/recipes-devtools/gcc/gcc-sanitizers.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gcc/gcc-sanitizers.inc +1 -0
index 3b7e0028f2..e5e84526fa 100644
@@ -94,6 +94,7 @@ FILES_liblsan += "${libdir}/liblsan.so.*"
 FILES_liblsan-dev += "\
     ${libdir}/liblsan.so \
     ${libdir}/liblsan.la \
+    ${libdir}/liblsan_preinit.o \
 "
 FILES_liblsan-staticdev += "${libdir}/liblsan.a"
 
Signature · 1 line
2.17.0
author
#1 lore raw

PATCH 2/3 libxcrypt: Fix build with gcc8

---
 ...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
meta/recipes-core/libxcrypt/libxcrypt/0001-disable-format-truncation-warning-with-gcc-8.patch new file +36 -0
new file mode 100644
index 0000000000..654eae6c6a
@@ -0,0 +1,36 @@
+From c8c5908611e44a649489e8d217528fedc4864e14 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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,
meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb +3 -1
index a1be4be7ef..8cc5edac49 100644
@@ -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"
 
Signature · 1 line
2.17.0
author
#2 lore raw

PATCH 3/3 uninative-tarball: Add libjis and euc-jp gconv files

In reply to Khem Raj

packages like fontforge-native fail with mysterious errors like

| ../../git/inc/gwwiconv.h:44:21: error: conflicting types for ‘gww_iconv_close’
|  #define iconv_close gww_iconv_close
|                      ^~~~~~~~~~~~~~~
| ../../git/inc/gwwiconv.h:37:13: note: previous declaration of ‘gww_iconv_close’ was here
|  extern void gww_iconv_close( gww_iconv_t cd);
|              ^~~~~~~~~~~~~~~

The reason behind this is that a check for iconv fails during native configure run, the check fails because the autoconf test to check for iconv pokes for these gconv's in test runs before declaring iconv support successful.

Therefore when uninative is active the package fails to build but when uninative is inactive all works fine. this patch fixes that

---
 meta/recipes-core/meta/uninative-tarball.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/meta/uninative-tarball.bb +2 -0
index 38c3a314e1..c38c2a445e 100644
@@ -12,6 +12,8 @@ TOOLCHAIN_HOST_TASK = "\
     nativesdk-glibc-gconv-iso8859-1 \
     nativesdk-glibc-gconv-utf-16 \
     nativesdk-glibc-gconv-cp1252 \
+    nativesdk-glibc-gconv-euc-jp \
+    nativesdk-glibc-gconv-libjis \
     nativesdk-patchelf \
     nativesdk-libxcrypt \
     "
Signature · 1 line
2.17.0
author
#3 lore raw

Re: [PATCH 3/3] uninative-tarball: Add libjis and euc-jp gconv files

Hi Ross/Richard

We need to regenerate uninative-tarball now this patch has landed in master.

Quoted 37 lines · Khem Raj

packages like fontforge-native fail with mysterious errors like

| ../../git/inc/gwwiconv.h:44:21: error: conflicting types for ‘gww_iconv_close’
|  #define iconv_close gww_iconv_close
|                      ^~~~~~~~~~~~~~~
| ../../git/inc/gwwiconv.h:37:13: note: previous declaration of ‘gww_iconv_close’ was here
|  extern void gww_iconv_close( gww_iconv_t cd);
|              ^~~~~~~~~~~~~~~

The reason behind this is that a check for iconv fails during native configure run, the check fails because the autoconf test to check for iconv pokes for these gconv's in test runs before declaring iconv support successful.

Therefore when uninative is active the package fails to build but when uninative is inactive all works fine. this patch fixes that

---
 meta/recipes-core/meta/uninative-tarball.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/meta/uninative-tarball.bb +2 -1
index 38c3a314e1..c38c2a445e 100644
@@ -12,6 +12,8 @@ TOOLCHAIN_HOST_TASK = "\
     nativesdk-glibc-gconv-iso8859-1 \
     nativesdk-glibc-gconv-utf-16 \
     nativesdk-glibc-gconv-cp1252 \
+    nativesdk-glibc-gconv-euc-jp \
+    nativesdk-glibc-gconv-libjis \
     nativesdk-patchelf \
     nativesdk-libxcrypt \
     "
--

2.17.0

#4 lore raw
In reply to Khem Raj
Quoted 3 lines · Khem Raj

Fixes installed-vs-shipped QA errors

The email address I typically use in my git submissions is [email protected]. The gmail address is what I use only for mailing lists.

Quoted 10 lines
---
 meta/recipes-devtools/gcc/gcc-sanitizers.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gcc/gcc-sanitizers.inc +0 -0
index 3b7e0028f2..e5e84526fa 100644

meta/recipes-devtools/gcc/gcc-sanitizers.inc FILES_liblsan += "${libdir}/liblsan.so.*" · line 98

Quoted 5 lines
meta/recipes-devtools/gcc/gcc-sanitizers.inc +1 -0
@@ -94,6 +94,7 @@ FILES_liblsan += "${libdir}/liblsan.so.*"
 FILES_liblsan-dev += "\
     ${libdir}/liblsan.so \
     ${libdir}/liblsan.la \
+    ${libdir}/liblsan_preinit.o \
 "

This looks good.

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-sanitizers.inc +0 -1
 FILES_liblsan-staticdev += "${libdir}/liblsan.a"
 
--

2.17.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core