Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] populate_sdk_ext.bbclass: check unfsd before create it
From: Robert Yang @ 2016-11-07  8:03 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 58de12eaaac9c60bb8fc84a3a965ef86d2a39ae0:

  distro_check: partial rewrite to make it work again (2016-11-06 23:35:23 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/ext
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/ext

Robert Yang (1):
  populate_sdk_ext.bbclass: check unfsd before create it

 meta/classes/populate_sdk_ext.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.9.0



^ permalink raw reply

* [PATCH 1/2] libbsd: Fix build with musl
From: Khem Raj @ 2016-11-07  7:25 UTC (permalink / raw)
  To: openembedded-core

a.out.h support is not across all architectures only
x86/x86_64 support is in linux/a.out.h, this patch
abstracts the minimum needed constructs into itself

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch | 363 +++++++++++++++++++++
 .../libbsd/libbsd/0002-Remove-funopen.patch        |  55 ++++
 ...3-Fix-build-breaks-due-to-missing-a.out.h.patch | 130 ++++++++
 meta/recipes-support/libbsd/libbsd_0.8.3.bb        |   5 +
 4 files changed, 553 insertions(+)
 create mode 100644 meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
 create mode 100644 meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch
 create mode 100644 meta/recipes-support/libbsd/libbsd/0003-Fix-build-breaks-due-to-missing-a.out.h.patch

diff --git a/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch b/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
new file mode 100644
index 0000000..e97e30e
--- /dev/null
+++ b/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
@@ -0,0 +1,363 @@
+From 88adbe1a855b7aa95bd925c80ed83c86f3fc42e3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 09:39:31 -0800
+Subject: [PATCH 1/3] Replace __BEGIN_DECLS and __END_DECLS
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ include/bsd/err.h            | 10 ++++++++--
+ include/bsd/libutil.h        | 10 ++++++++--
+ include/bsd/md5.h            | 10 ++++++++--
+ include/bsd/nlist.h          | 10 ++++++++--
+ include/bsd/readpassphrase.h | 10 ++++++++--
+ include/bsd/stdio.h          | 10 ++++++++--
+ include/bsd/stdlib.h         | 10 ++++++++--
+ include/bsd/string.h         | 10 ++++++++--
+ include/bsd/stringlist.h     | 10 ++++++++--
+ include/bsd/unistd.h         | 10 ++++++++--
+ include/bsd/vis.h            | 10 ++++++++--
+ include/bsd/wchar.h          | 10 ++++++++--
+ src/hash/sha512.h            | 10 ++++++++--
+ 13 files changed, 104 insertions(+), 26 deletions(-)
+
+diff --git a/include/bsd/err.h b/include/bsd/err.h
+index 12fd051..43dfc32 100644
+--- a/include/bsd/err.h
++++ b/include/bsd/err.h
+@@ -42,7 +42,10 @@
+ 
+ #include <stdarg.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ void warnc(int code, const char *format, ...)
+ 	__printflike(2, 3);
+ void vwarnc(int code, const char *format, va_list ap)
+@@ -51,6 +54,9 @@ void errc(int status, int code, const char *format, ...)
+ 	__printflike(3, 4);
+ void verrc(int status, int code, const char *format, va_list ap)
+ 	__printflike(3, 0);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif
+diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h
+index ebb6160..28b919d 100644
+--- a/include/bsd/libutil.h
++++ b/include/bsd/libutil.h
+@@ -53,7 +53,10 @@ struct pidfh {
+ 	ino_t	pf_ino;
+ };
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ int humanize_number(char *buf, size_t len, int64_t bytes,
+     const char *suffix, int scale, int flags);
+ int expand_number(const char *_buf, uint64_t *_num);
+@@ -66,7 +69,10 @@ int pidfile_close(struct pidfh *pfh);
+ int pidfile_remove(struct pidfh *pfh);
+ 
+ char   *fparseln(FILE *, size_t *, size_t *, const char[3], int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ /* humanize_number(3) */
+ #define HN_DECIMAL              0x01
+diff --git a/include/bsd/md5.h b/include/bsd/md5.h
+index 9a75fad..3531fd6 100644
+--- a/include/bsd/md5.h
++++ b/include/bsd/md5.h
+@@ -30,7 +30,10 @@ typedef struct MD5Context {
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ void	 MD5Init(MD5_CTX *);
+ void	 MD5Update(MD5_CTX *, const uint8_t *, size_t)
+ 		__attribute__((__bounded__(__string__,2,3)));
+@@ -49,6 +52,9 @@ char	*MD5FileChunk(const char *, char *, off_t, off_t)
+ char	*MD5Data(const uint8_t *, size_t, char *)
+ 		__attribute__((__bounded__(__string__,1,2)))
+ 		__attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH)));
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif /* _MD5_H_ */
+diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h
+index 2730237..0389ab7 100644
+--- a/include/bsd/nlist.h
++++ b/include/bsd/nlist.h
+@@ -30,8 +30,14 @@
+ #include <sys/cdefs.h>
+ #include <a.out.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int nlist(const char *filename, struct nlist *list);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif
+diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h
+index e1dacc3..76e0d33 100644
+--- a/include/bsd/readpassphrase.h
++++ b/include/bsd/readpassphrase.h
+@@ -34,8 +34,14 @@
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ char * readpassphrase(const char *, char *, size_t, int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif /* !_READPASSPHRASE_H_ */
+diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h
+index 7697425..b5b3efd 100644
+--- a/include/bsd/stdio.h
++++ b/include/bsd/stdio.h
+@@ -41,7 +41,10 @@
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ const char *fmtcheck(const char *, const char *);
+ 
+ /* XXX: The function requires cooperation from the system libc to store the
+@@ -69,7 +72,10 @@ FILE *funopen(const void *cookie,
+ #define fwopen(cookie, fn) funopen(cookie, NULL, fn, NULL, NULL)
+ 
+ int fpurge(FILE *fp);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif
+ #endif
+diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
+index 0604cad..b9f0515 100644
+--- a/include/bsd/stdlib.h
++++ b/include/bsd/stdlib.h
+@@ -46,7 +46,10 @@
+ #include <sys/stat.h>
+ #include <stdint.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ uint32_t arc4random(void);
+ void arc4random_stir(void);
+ void arc4random_addrandom(u_char *dat, int datlen);
+@@ -73,6 +76,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval,
+                    const char **errstr);
+ 
+ char *getbsize(int *headerlenp, long *blocksizep);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif
+diff --git a/include/bsd/string.h b/include/bsd/string.h
+index ee2f953..fbf8c54 100644
+--- a/include/bsd/string.h
++++ b/include/bsd/string.h
+@@ -36,13 +36,19 @@
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ size_t strlcpy(char *dst, const char *src, size_t siz);
+ size_t strlcat(char *dst, const char *src, size_t siz);
+ char *strnstr(const char *str, const char *find, size_t str_len);
+ void strmode(mode_t mode, char *str);
+ 
+ void explicit_bzero(void *buf, size_t len);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif
+diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h
+index e3c42e9..40d0a52 100644
+--- a/include/bsd/stringlist.h
++++ b/include/bsd/stringlist.h
+@@ -43,12 +43,18 @@ typedef struct _stringlist {
+ 	size_t	  sl_cur;
+ } StringList;
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ StringList	*sl_init(void);
+ int		 sl_add(StringList *, char *);
+ void		 sl_free(StringList *, int);
+ char		*sl_find(StringList *, const char *);
+ int		 sl_delete(StringList *, const char *, int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif /* _STRINGLIST_H */
+diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
+index 1f9c5f8..5b2f4c7 100644
+--- a/include/bsd/unistd.h
++++ b/include/bsd/unistd.h
+@@ -45,7 +45,10 @@
+ #define S_ISTXT S_ISVTX
+ #endif
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int optreset;
+ 
+ #ifdef LIBBSD_OVERLAY
+@@ -68,6 +71,9 @@ void setproctitle(const char *fmt, ...)
+ 	__printflike(1, 2);
+ 
+ int getpeereid(int s, uid_t *euid, gid_t *egid);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif
+diff --git a/include/bsd/vis.h b/include/bsd/vis.h
+index 835d2d6..63c951e 100644
+--- a/include/bsd/vis.h
++++ b/include/bsd/vis.h
+@@ -74,7 +74,10 @@
+ 
+ #include <sys/cdefs.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ char	*vis(char *, int, int, int);
+ int	strvis(char *, const char *, int);
+ int	strvisx(char *, const char *, size_t, int);
+@@ -83,6 +86,9 @@ int	strunvis(char *, const char *);
+ int	strunvisx(char *, const char *, int);
+ ssize_t strnunvis(char *, const char *, size_t);
+ int	unvis(char *, int, int *, int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif /* !_VIS_H_ */
+diff --git a/include/bsd/wchar.h b/include/bsd/wchar.h
+index 33a500e..aa70742 100644
+--- a/include/bsd/wchar.h
++++ b/include/bsd/wchar.h
+@@ -43,12 +43,18 @@
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ wchar_t *fgetwln(FILE *stream, size_t *len);
+ 
+ size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
+ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif
+ #endif
+diff --git a/src/hash/sha512.h b/src/hash/sha512.h
+index 4f368a1..27ddc24 100644
+--- a/src/hash/sha512.h
++++ b/src/hash/sha512.h
+@@ -39,7 +39,10 @@ typedef struct SHA512Context {
+ 	unsigned char buf[128];
+ } SHA512_CTX;
+ 
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ void	SHA512_Init(SHA512_CTX *);
+ void	SHA512_Update(SHA512_CTX *, const void *, size_t);
+@@ -48,6 +51,9 @@ char   *SHA512_End(SHA512_CTX *, char *);
+ char   *SHA512_File(const char *, char *);
+ char   *SHA512_FileChunk(const char *, char *, off_t, off_t);
+ char   *SHA512_Data(const void *, unsigned int, char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+ 
+ #endif /* !_SHA512_H_ */
+-- 
+2.10.2
+
diff --git a/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch b/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch
new file mode 100644
index 0000000..83ce7c8
--- /dev/null
+++ b/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch
@@ -0,0 +1,55 @@
+From 28fc66e8b848709a2e69dba7f07694248e0154e8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 09:40:43 -0800
+Subject: [PATCH 2/3] Remove funopen()
+
+Musl doesnt have prerequisites for it.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [musl specific]
+
+ man/Makefile.am  | 1 -
+ src/Makefile.am  | 1 -
+ test/Makefile.am | 1 -
+ 3 files changed, 3 deletions(-)
+
+diff --git a/man/Makefile.am b/man/Makefile.am
+index e4d6e4a..c701d94 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -29,7 +29,6 @@ dist_man_MANS = \
+ 	flopen.3 \
+ 	fmtcheck.3 \
+ 	fparseln.3 \
+-	funopen.3bsd \
+ 	getbsize.3 \
+ 	getmode.3 \
+ 	getpeereid.3 \
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ad83dbf..13225a3 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -76,7 +76,6 @@ libbsd_la_SOURCES = \
+ 	fmtcheck.c \
+ 	fparseln.c \
+ 	fpurge.c \
+-	funopen.c \
+ 	getbsize.c \
+ 	getpeereid.c \
+ 	hash/md5.c \
+diff --git a/test/Makefile.am b/test/Makefile.am
+index a75c8ff..e3a1d41 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -36,7 +36,6 @@ check_PROGRAMS = \
+ 	endian \
+ 	humanize \
+ 	fgetln \
+-	funopen \
+ 	fparseln \
+ 	fpurge \
+ 	md5 \
+-- 
+2.10.2
+
diff --git a/meta/recipes-support/libbsd/libbsd/0003-Fix-build-breaks-due-to-missing-a.out.h.patch b/meta/recipes-support/libbsd/libbsd/0003-Fix-build-breaks-due-to-missing-a.out.h.patch
new file mode 100644
index 0000000..176d940
--- /dev/null
+++ b/meta/recipes-support/libbsd/libbsd/0003-Fix-build-breaks-due-to-missing-a.out.h.patch
@@ -0,0 +1,130 @@
+From a1b93c25311834f2f411e9bfe2e616899ba2122d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 10:23:55 -0800
+Subject: [PATCH 3/3] Fix build breaks due to missing a.out.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ include/bsd/nlist.h                     |  1 -
+ include/bsd/nlist.h => src/local-aout.h | 47 ++++++++++++++++++++++-----------
+ src/nlist.c                             |  9 +++++++
+ 3 files changed, 41 insertions(+), 16 deletions(-)
+ copy include/bsd/nlist.h => src/local-aout.h (63%)
+
+diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h
+index 0389ab7..9c7e3d8 100644
+--- a/include/bsd/nlist.h
++++ b/include/bsd/nlist.h
+@@ -28,7 +28,6 @@
+ #define LIBBSD_NLIST_H
+ 
+ #include <sys/cdefs.h>
+-#include <a.out.h>
+ 
+ /* __BEGIN_DECLS */
+ #ifdef __cplusplus
+diff --git a/include/bsd/nlist.h b/src/local-aout.h
+similarity index 63%
+copy from include/bsd/nlist.h
+copy to src/local-aout.h
+index 0389ab7..2adb93e 100644
+--- a/include/bsd/nlist.h
++++ b/src/local-aout.h
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright © 2009 Guillem Jover <guillem@hadrons.org>
++ * Copyright © 2016 Khem Raj <raj.khem@gmail.com>
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+@@ -24,20 +24,37 @@
+  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+-#ifndef LIBBSD_NLIST_H
+-#define LIBBSD_NLIST_H
++#ifndef LIBBSD_LOCAL_AOUT_H
++#define LIBBSD_LOCAL_AOUT_H
+ 
+-#include <sys/cdefs.h>
+-#include <a.out.h>
++#define N_UNDF  0
++#define N_ABS   2
++#define N_TEXT  4
++#define N_DATA  6
++#define N_BSS   8
++#define N_FN    15
++#define N_EXT   1
++#define N_TYPE  036
++#define N_STAB  0340
++#define N_INDR  0xa
++#define N_SETA  0x14    /* Absolute set element symbol.  */
++#define N_SETT  0x16    /* Text set element symbol.  */
++#define N_SETD  0x18    /* Data set element symbol.  */
++#define N_SETB  0x1A    /* Bss set element symbol.  */
++#define N_SETV  0x1C    /* Pointer to set vector in data area.  */
+ 
+-/* __BEGIN_DECLS */
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-extern int nlist(const char *filename, struct nlist *list);
+-#ifdef __cplusplus
+-}
+-#endif
+-/* __END_DECLS */
++struct nlist
++{
++  union
++    {
++      char *n_name;
++      struct nlist *n_next;
++      long n_strx;
++    } n_un;
++  unsigned char n_type;
++  char n_other;
++  short n_desc;
++  unsigned long n_value;
++};
+ 
+-#endif
++#endif /* LIBBSD_LOCAL_AOUT_H */
+diff --git a/src/nlist.c b/src/nlist.c
+index 0cffe55..625d310 100644
+--- a/src/nlist.c
++++ b/src/nlist.c
+@@ -40,7 +40,11 @@ static char sccsid[] = "@(#)nlist.c	8.1 (Berkeley) 6/4/93";
+ 
+ #include <errno.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <a.out.h>
++#else
++#define __NO_A_OUT_SUPPORT
++#endif
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+@@ -48,12 +52,17 @@ static char sccsid[] = "@(#)nlist.c	8.1 (Berkeley) 6/4/93";
+ #if !defined(__NO_A_OUT_SUPPORT)
+ #define _NLIST_DO_AOUT
+ #endif
++
+ #define _NLIST_DO_ELF
+ 
+ #ifdef _NLIST_DO_ELF
+ #include "local-elf.h"
+ #endif
+ 
++#ifdef _NLIST_DO_ELF
++#include "local-aout.h"
++#endif
++
+ #define SIZE_T_MAX 0xffffffffU
+ 
+ #ifdef _NLIST_DO_AOUT
+-- 
+2.10.2
+
diff --git a/meta/recipes-support/libbsd/libbsd_0.8.3.bb b/meta/recipes-support/libbsd/libbsd_0.8.3.bb
index 92121ef..b0336b7 100644
--- a/meta/recipes-support/libbsd/libbsd_0.8.3.bb
+++ b/meta/recipes-support/libbsd/libbsd_0.8.3.bb
@@ -36,6 +36,11 @@ SECTION = "libs"
 SRC_URI = " \
     http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
 "
+SRC_URI_append_libc-musl  = " \
+    file://0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch \
+    file://0002-Remove-funopen.patch \
+    file://0003-Fix-build-breaks-due-to-missing-a.out.h.patch \
+"
 
 SRC_URI[md5sum] = "e935c1bb6cc98a4a43cb1da22795493a"
 SRC_URI[sha256sum] = "934b634f4dfd865b6482650b8f522c70ae65c463529de8be907b53c89c3a34a8"
-- 
2.10.2



^ permalink raw reply related

* [PATCH 2/2] glibc-2.0: Detect pthread_getname_np() before use
From: Khem Raj @ 2016-11-07  7:25 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <20161107072527.394-1-raj.khem@gmail.com>

Fixes build with musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...st-for-pthread_getname_np-before-using-it.patch | 70 ++++++++++++++++++++++
 meta/recipes-core/glib-2.0/glib-2.0_2.50.1.bb      |  1 +
 2 files changed, 71 insertions(+)
 create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-Test-for-pthread_getname_np-before-using-it.patch

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Test-for-pthread_getname_np-before-using-it.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Test-for-pthread_getname_np-before-using-it.patch
new file mode 100644
index 0000000..c6e4966
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Test-for-pthread_getname_np-before-using-it.patch
@@ -0,0 +1,70 @@
+From f627fe16099a2b08d8b4e9023ae6b4f352451967 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 08:59:08 -0800
+Subject: [PATCH] Test for pthread_getname_np before using it
+
+Its a GNU extention and not all libc implement it
+musl e.g. implements the setname API but not getname
+in any case, it seems to be safer to check for the
+function before using it.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ config.h.in         |  3 +++
+ configure.ac        | 10 ++++++++++
+ glib/tests/thread.c |  2 +-
+ 3 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/config.h.in b/config.h.in
+index 2c35ff1..da7ac30 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -326,6 +326,9 @@
+ #undef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP
+ 
+ /* Have function pthread_setname_np(const char*) */
++#undef HAVE_PTHREAD_GETNAME_NP
++
++/* Have function pthread_setname_np(const char*) */
+ #undef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID
+ 
+ /* Have function pthread_setname_np(pthread_t, const char*) */
+diff --git a/configure.ac b/configure.ac
+index 4309671..209770a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2121,6 +2121,16 @@ AS_IF([ test x"$have_threads" = xposix], [
+              AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP,1,
+                 [Have function pthread_cond_timedwait_relative_np])],
+             [AC_MSG_RESULT(no)])
++        dnl gets thread names
++        AC_MSG_CHECKING(for pthread_getname_np(pthread_t, char*, size_t))
++        AC_LINK_IFELSE(
++            [AC_LANG_PROGRAM(
++                [#include <pthread.h>],
++                [pthread_getname_np(pthread_self(),"example",0)])],
++            [AC_MSG_RESULT(yes)
++             AC_DEFINE(HAVE_PTHREAD_GETNAME_NP,1,
++                [Have function pthread_setname_np(const char*)])],
++            [AC_MSG_RESULT(no)])
+         dnl Sets thread names on OS X 10.6, iOS 3.2 (and higher)
+         AC_MSG_CHECKING(for pthread_setname_np(const char*))
+         AC_LINK_IFELSE(
+diff --git a/glib/tests/thread.c b/glib/tests/thread.c
+index 5447836..2f248a6 100644
+--- a/glib/tests/thread.c
++++ b/glib/tests/thread.c
+@@ -174,7 +174,7 @@ test_thread5 (void)
+ static gpointer
+ thread6_func (gpointer data)
+ {
+-#ifdef HAVE_PTHREAD_SETNAME_NP_WITH_TID
++#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID) && defined(HAVE_PTHREAD_GETNAME_NP)
+   char name[16];
+ 
+   pthread_getname_np (pthread_self(), name, 16);
+-- 
+2.10.2
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.50.1.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.50.1.bb
index 00ae7ef..17016c8 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.50.1.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.50.1.bb
@@ -16,6 +16,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
            file://gi-exclude.patch \
            file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
            file://0001-Do-not-ignore-return-value-of-write.patch \
+           file://0001-Test-for-pthread_getname_np-before-using-it.patch \
            "
 
 SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
-- 
2.10.2



^ permalink raw reply related

* [PATCH version2] db: disable the ARM assembler mutex code
From: Li Zhou @ 2016-11-07  3:02 UTC (permalink / raw)
  To: openembedded-core

The swpb in macro MUTEX_SET will cause "undefined instruction" error
on the new arm arches which don't support this assembly instruction
any more. If use ldrex/strex to replace swpb, the old arm arches don't
support them. So to avoid this issue, just disable the ARM assembler
mutex code, and use the default pthreads mutex.

Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
 meta/recipes-support/db/db_6.0.35.bb | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/meta/recipes-support/db/db_6.0.35.bb b/meta/recipes-support/db/db_6.0.35.bb
index f60edf9..b1bec0e 100644
--- a/meta/recipes-support/db/db_6.0.35.bb
+++ b/meta/recipes-support/db/db_6.0.35.bb
@@ -77,15 +77,6 @@ do_configure() {
 	oe_runconf
 }
 
-# Override the MUTEX setting here, the POSIX library is
-# the default - "POSIX/pthreads/library".
-# Don't ignore the nice SWP instruction on the ARM:
-# These enable the ARM assembler mutex code
-ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
-MUTEX = ""
-MUTEX_arm = "${ARM_MUTEX}"
-MUTEX_armeb = "${ARM_MUTEX}"
-EXTRA_OECONF += "${MUTEX}"
 EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
 EXTRA_OEMAKE += "STRIP=true docdir=${docdir}/db/"
 
-- 
1.9.1



^ permalink raw reply related

* Re: "Can't install perl-soap-lite-1.20-r0@all: no package provides /bin/env" ??
From: Robert P. J. Day @ 2016-11-06 19:18 UTC (permalink / raw)
  To: Tim Orling; +Cc: OE Core mailing list
In-Reply-To: <CANx9H-BWEGfzMn-dyhUf+hBg7Jn2dH-nTPY3w2_CVjMUaX-rNg@mail.gmail.com>

On Sun, 6 Nov 2016, Tim Orling wrote:

> I created a ticket https://rt.cpan.org/Ticket/Display.html?id=118654
> And sent a pull request
> https://github.com/redhotpenguin/soaplite/pull/28
>
> Should be merged/released shortly as maintainer is already in
> contact.

  that was quick, thanks. as a temporary fix, i just added a patch
that mindlessly changed every "/bin/env" to "/usr/bin/env", and that
did the trick. i suspect that's pretty much what your patch does.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply

* Re: "Can't install perl-soap-lite-1.20-r0@all: no package provides /bin/env" ??
From: Tim Orling @ 2016-11-06 19:11 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list
In-Reply-To: <alpine.LFD.2.20.1611061315380.20227@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

I created a ticket https://rt.cpan.org/Ticket/Display.html?id=118654
And sent a pull request https://github.com/redhotpenguin/soaplite/pull/28

Should be merged/released shortly as maintainer is already in contact.

Cheers.

--Tim

On Sun, Nov 6, 2016 at 10:16 AM, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

> On Sun, 6 Nov 2016, Tim Orling wrote:
>
> > https://github.com/redhotpenguin/soaplite/search?utf8=✓&q=%2Fbin%2Fenv
> <https://github.com/redhotpenguin/soaplite/search?utf8=%E2%9C%93&q=%2Fbin%2Fenv>
> >
> > It's only for the tests (in the ${S}/t directory by convention for
> > perl modules). I would try just doing sed to /usr/bin/env on all
> > those.
>
>   that's what i did, fixed the problem.
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>

[-- Attachment #2: Type: text/html, Size: 2196 bytes --]

^ permalink raw reply

* Re: "Can't install perl-soap-lite-1.20-r0@all: no package provides /bin/env" ??
From: Robert P. J. Day @ 2016-11-06 18:16 UTC (permalink / raw)
  To: Tim Orling; +Cc: OE Core mailing list
In-Reply-To: <CANx9H-DKBM9qaLr9+d0pa7YgoBs6qz6SqoJrG8L_hN0ua0xQDQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

On Sun, 6 Nov 2016, Tim Orling wrote:

> https://github.com/redhotpenguin/soaplite/search?utf8=✓&q=%2Fbin%2Fenv
>
> It's only for the tests (in the ${S}/t directory by convention for
> perl modules). I would try just doing sed to /usr/bin/env on all
> those.

  that's what i did, fixed the problem.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply

* Re: "Can't install perl-soap-lite-1.20-r0@all: no package provides /bin/env" ??
From: Tim Orling @ 2016-11-06 18:01 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list
In-Reply-To: <alpine.LFD.2.20.1611060625550.19174@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 2554 bytes --]

https://github.com/redhotpenguin/soaplite/search?utf8=✓&q=%2Fbin%2Fenv
<https://github.com/redhotpenguin/soaplite/search?utf8=%E2%9C%93&q=%2Fbin%2Fenv>

It's only for the tests (in the ${S}/t directory by convention for perl
modules). I would try just doing sed to /usr/bin/env on all those.

Cheers.

--Tim

On Sun, Nov 6, 2016 at 3:28 AM, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

>
>   currently writing my first batch of perl recipes, fairly mindlessly
> plagiarizing from existing recipes, first bunch worked fine, then i
> whipped together a recipe for SOAP::Lite from here:
>
>   https://metacpan.org/pod/SOAP::Lite
>
> built fine, but when i tried to add the perl-soap-lite-1.20-r0.all.rpm
> to my core-image-minimal build, i got:
>
>   Computing transaction...error: Can't install \
>     perl-soap-lite-1.20-r0@all: no package provides /bin/env
>
> sure enough, that rpm has that dependency:
>
>   $ rpm -qpR perl-soap-lite-1.20-r0.all.rpm
>   /bin/env
>   /usr/bin/env
>   perl
>   $
>
> and when i fire up my "qemuppc" session for that core-image-minimal
> image, there is indeed no /bin/env file (hence the error), but there
> is:
>
>   /usr/bin/env -> /bin/busybox.nosuid
>
> so ... what is the proper solution for this? i suspect i'm going to
> run into this issue again in upcoming recipes, so i'd love to resolve
> it in a minimally hacky way.
>
> rday
>
> p.s. now that i think about it, why would a package have a dependency
> on *both* /bin/env and /usr/bin/env? isn't that sort of redundant?
>
> p.p.s. i searched for the phrase "no package provides /bin/env" as a
> first attempt, and i weirdly got this:
>
> https://www.google.ca/search?q=%22no+package+provides+/bin/
> env%22&ie=utf-8&oe=utf-8&gws_rd=cr&ei=jBMfWJ20JIfZjwTKzarIBg
>
> never heard of that website before, and no other matches. seems a bit
> odd.
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3986 bytes --]

^ permalink raw reply

* Re: "Can't install perl-soap-lite-1.20-r0@all: no package provides /bin/env" ??
From: Robert P. J. Day @ 2016-11-06 16:31 UTC (permalink / raw)
  To: Christopher Larson; +Cc: OE Core mailing list
In-Reply-To: <CABcZANneDWqsPA8HEDCes7uKvvBVPTKhzk8w78g5a38SgxWxGw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2761 bytes --]

On Sun, 6 Nov 2016, Christopher Larson wrote:

>
> On Sun, Nov 6, 2016 at 4:28 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>         currently writing my first batch of perl recipes, fairly mindlessly
>       plagiarizing from existing recipes, first bunch worked fine, then i
>       whipped together a recipe for SOAP::Lite from here:
>
>         https://metacpan.org/pod/SOAP::Lite
>
>       built fine, but when i tried to add the perl-soap-lite-1.20-r0.all.rpm
>       to my core-image-minimal build, i got:
>
>         Computing transaction...error: Can't install \
>           perl-soap-lite-1.20-r0@all: no package provides /bin/env
>
>       sure enough, that rpm has that dependency:
>
>         $ rpm -qpR perl-soap-lite-1.20-r0.all.rpm
>         /bin/env
>         /usr/bin/env
>         perl
>         $
>
>       and when i fire up my "qemuppc" session for that core-image-minimal
>       image, there is indeed no /bin/env file (hence the error), but there
>       is:
>
>         /usr/bin/env -> /bin/busybox.nosuid
>
>       so ... what is the proper solution for this? i suspect i'm going to
>       run into this issue again in upcoming recipes, so i'd love to resolve
>       it in a minimally hacky way.
>
>
> Sounds like there’s a script in that package with a #!/bin/env,
> which is wrong.

  dang, i should have thought of that ... and, yes, after fetching and
unpacking source (no patches yet):

$ grep -r "/bin/env" *
bin/stubmaker.pl:#!/usr/bin/env perl
bin/SOAPsh.pl:#!/bin/env perl
examples/XMLRPC/xmlrpc.daemon:#!/usr/bin/env perl
examples/XMLRPC/xmlrpc.cgi:#!/usr/bin/env perl
t/15-daemon.t:#!/bin/env perl
t/17-mod_soap.t:#!/bin/env perl
t/05-customxml.t:#!/bin/env perl
t/03-server.t:#!/bin/env perl
t/04-attach.t:#!/bin/env perl
t/11-cgi.t:#!/bin/env perl
t/02-payload.t:#!/bin/env perl
t/12-cgi_https.t:#!/bin/env perl
t/24-wsdl.t:#!/bin/env perl
t/14-cgi_apache.t:#!/bin/env perl
t/23-ppm.t:#!/bin/env perl
t/01-core.t:#!/bin/env perl
t/13-mod_perl.t:#!/bin/env perl
t/22-interop_apache.t:#!/bin/env perl
t/19-apachesoap.t:#!/bin/env perl
t/08-schema.t:#!/bin/env perl
t/06-modules.t:#!/bin/env perl
t/21-public.t:#!/bin/env perl
$

  is the obvious solution to just patch all those "/bin/env" to
"/usr/bin/env"?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply

* Re: "Can't install perl-soap-lite-1.20-r0@all: no package provides /bin/env" ??
From: Christopher Larson @ 2016-11-06 16:03 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list
In-Reply-To: <alpine.LFD.2.20.1611060625550.19174@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

On Sun, Nov 6, 2016 at 4:28 AM, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

>   currently writing my first batch of perl recipes, fairly mindlessly
> plagiarizing from existing recipes, first bunch worked fine, then i
> whipped together a recipe for SOAP::Lite from here:
>
>   https://metacpan.org/pod/SOAP::Lite
>
> built fine, but when i tried to add the perl-soap-lite-1.20-r0.all.rpm
> to my core-image-minimal build, i got:
>
>   Computing transaction...error: Can't install \
>     perl-soap-lite-1.20-r0@all: no package provides /bin/env
>
> sure enough, that rpm has that dependency:
>
>   $ rpm -qpR perl-soap-lite-1.20-r0.all.rpm
>   /bin/env
>   /usr/bin/env
>   perl
>   $
>
> and when i fire up my "qemuppc" session for that core-image-minimal
> image, there is indeed no /bin/env file (hence the error), but there
> is:
>
>   /usr/bin/env -> /bin/busybox.nosuid
>
> so ... what is the proper solution for this? i suspect i'm going to
> run into this issue again in upcoming recipes, so i'd love to resolve
> it in a minimally hacky way.
>

Sounds like there’s a script in that package with a #!/bin/env, which is
wrong.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1949 bytes --]

^ permalink raw reply

* "Can't install perl-soap-lite-1.20-r0@all: no package provides /bin/env" ??
From: Robert P. J. Day @ 2016-11-06 11:28 UTC (permalink / raw)
  To: OE Core mailing list


  currently writing my first batch of perl recipes, fairly mindlessly
plagiarizing from existing recipes, first bunch worked fine, then i
whipped together a recipe for SOAP::Lite from here:

  https://metacpan.org/pod/SOAP::Lite

built fine, but when i tried to add the perl-soap-lite-1.20-r0.all.rpm
to my core-image-minimal build, i got:

  Computing transaction...error: Can't install \
    perl-soap-lite-1.20-r0@all: no package provides /bin/env

sure enough, that rpm has that dependency:

  $ rpm -qpR perl-soap-lite-1.20-r0.all.rpm
  /bin/env
  /usr/bin/env
  perl
  $

and when i fire up my "qemuppc" session for that core-image-minimal
image, there is indeed no /bin/env file (hence the error), but there
is:

  /usr/bin/env -> /bin/busybox.nosuid

so ... what is the proper solution for this? i suspect i'm going to
run into this issue again in upcoming recipes, so i'd love to resolve
it in a minimally hacky way.

rday

p.s. now that i think about it, why would a package have a dependency
on *both* /bin/env and /usr/bin/env? isn't that sort of redundant?

p.p.s. i searched for the phrase "no package provides /bin/env" as a
first attempt, and i weirdly got this:

https://www.google.ca/search?q=%22no+package+provides+/bin/env%22&ie=utf-8&oe=utf-8&gws_rd=cr&ei=jBMfWJ20JIfZjwTKzarIBg

never heard of that website before, and no other matches. seems a bit
odd.

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply

* Re: [PATCH] cmake.bbclass: Exclude native sysroot from CMAKE_FIND_ROOT_PATH
From: Khem Raj @ 2016-11-05 16:39 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CAMKF1srDpKb1-+h4Y3X6nttVSCpVTAitt_w1iUPpqPpnfq0Jag@mail.gmail.com>



On 11/1/16 11:33 AM, Khem Raj wrote:
> On Nov 1, 2016 11:28 AM, "Andre McCurdy" <armccurdy@gmail.com
> <mailto:armccurdy@gmail.com>> wrote:
>>
>> On Sat, Oct 29, 2016 at 1:47 AM, Khem Raj <raj.khem@gmail.com
> <mailto:raj.khem@gmail.com>> wrote:
>> > This has been cause of issue where we were getting both usr/include
>> > dirs ( from target as well as native sysroot) added to compiler
>> > flags.
>> >
>> > CXX_INCLUDES in final flags.cmake would include
>> > -I<target-sysroot>/usr/include -I<native-sysroot>/usr/include
>> > most of the time it would work since headers are mostly
>> > common but netflix package failed to compile since one of
>> > the headers was including curl headers which it could not
>> > find in target sysroot and it went to next include path
>> > and found it in native sysroot which is not what we want
>> > when doing cross compile.
>> >
>> > As per https://cmake.org/Wiki/CMake_Cross_Compiling
>> > never search for programs in target sysroot but search
>> > for packages,libs,includes only.
>> >
>> > Signed-off-by: Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>>
>> > ---
>> >  meta/classes/cmake.bbclass | 3 ++-
>> >  1 file changed, 2 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
>> > index 3e762de..3e8df37 100644
>> > --- a/meta/classes/cmake.bbclass
>> > +++ b/meta/classes/cmake.bbclass
>> > @@ -25,6 +25,7 @@ OECMAKE_PERLNATIVE_DIR ??= ""
>> >  OECMAKE_EXTRA_ROOT_PATH ?= ""
>> >
>> >  OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
>> > +OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-target = "NEVER"
>>
>> Using the _class-target over-ride looks odd. Perhaps making "NEVER"
>> the default and adding over-rides for the classes which need "ONLY"
>> (if there are any?) would make this clearer?
>>
> 
> Yeah I plan to rework this a bit in that direction

thinking a bit more about this problem. It doesn't seem to be solvable
with the current limitations that we have for cross compiling with cmake
in OE environment.

What we want is

1. When compiling target packages that we should be able to use binaries and
programs from native sysroot but not libraries, packages and includes

This is not possible since for this we have to add both native and target
sysroots to CMAKE_FIND_ROOT_PATH, but there is no fine grained selection
method for expressive the requirement 1 above. We only have options
ONLY - Look for files only in paths specified in CMAKE_FIND_ROOT_PATH
BOTH - Along with above also look into build hosts root dir
NEVER - Only look for files in build hosts root dir

so we can not set CMAKE_FIND_ROOT_PATH dynamically according to MODE variables
and hence the problem persists.

cmake does not cater to OE usecase where we have native sysroot along with
host to complement native packages. It only assumes there is build host and
the target sysroot.

>> >  OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
>> >
>> >  EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
>> > @@ -60,7 +61,7 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}"
> CACHE STRING "LDFLAGS" )
>> >
>> >  # only search in the paths provided so cmake doesnt pick
>> >  # up libraries and tools from the native build machine
>> > -set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE}
> ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH}
> ${EXTERNAL_TOOLCHAIN})
>> > +set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${CROSS_DIR}
> ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN})
>> >  set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
>> >  set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
> ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} )
>> >  set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
>> > --
>> > 2.10.1
>> >
>> > --
>> > _______________________________________________
>> > Openembedded-core mailing list
>> > Openembedded-core@lists.openembedded.org
> <mailto:Openembedded-core@lists.openembedded.org>
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 


^ permalink raw reply

* Re: [PATCH] kernel.bbclass: Allow ${S} to be overridden
From: Paul Barker @ 2016-11-05 10:14 UTC (permalink / raw)
  To: OpenEmbedded Core
In-Reply-To: <1477161480-20271-1-git-send-email-paul@paulbarker.me.uk>

On Sat, 22 Oct 2016 19:38:00 +0100
Paul Barker <paul@paulbarker.me.uk> wrote:

> For kernel recipes which fetch sources from an archive instead of git, it's
> necessary to point ${S} at the extracted sources. In kernel.bbclass there is
> already logic in base_do_unpack_append() to link ${KERNEL_STAGING_DIR} to ${S}
> if these aren't the same, so we just need to be able to override ${S}.
> 
> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
> ---
>  meta/classes/kernel.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 25a153c..a7d467b 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -3,7 +3,7 @@ inherit linux-kernel-base kernel-module-split
>  PROVIDES += "virtual/kernel"
>  DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross bc-native lzop-native"
>  
> -S = "${STAGING_KERNEL_DIR}"
> +S ?= "${STAGING_KERNEL_DIR}"
>  B = "${WORKDIR}/build"
>  KBUILD_OUTPUT = "${B}"
>  OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"

Ping on this. Anyone had a chance to look at it?


^ permalink raw reply

* [PATCH 1/1] trace-cmd: fix QA warning
From: Dengke Du @ 2016-11-05  5:29 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1478323482.git.dengke.du@windriver.com>

Add PACKAGECONFIG for audit.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
 meta/recipes-kernel/trace-cmd/trace-cmd_git.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
index dd9a8a0..05f5f9a 100644
--- a/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
+++ b/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
@@ -9,6 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                     file://trace-input.c;beginline=5;endline=8;md5=3ec82f43bbe0cfb5951ff414ef4d44d0 \
 "
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[audit] = ",,audit"
+
 EXTRA_OEMAKE = "\
     'prefix=${prefix}' \
     'bindir=${bindir}' \
@@ -20,6 +23,7 @@ EXTRA_OEMAKE = "\
     'libdir=${@oe.path.relative(prefix, libdir)}' \
     \
     NO_PYTHON=1 \
+    ${@bb.utils.contains('PACKAGECONFIG', 'audit', '', 'NO_AUDIT=1', d)} \
 "
 
 do_compile_prepend() {
-- 
2.7.4



^ permalink raw reply related

* [PATCH 0/1] trace-cmd: fix QA warning
From: Dengke Du @ 2016-11-05  5:29 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit c3d2df883a9d6d5036277114339673656d89a728:

  oeqa/selftest/kernel.py: Add new file destined for kernel related tests (2016-11-01 10:05:46 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib dengke/fix-trace_cmd-QA-warning
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=dengke/fix-trace_cmd-QA-warning

Dengke Du (1):
  trace-cmd: fix QA warning

 meta/recipes-kernel/trace-cmd/trace-cmd_git.bb | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.7.4



^ permalink raw reply

* Re: [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk
From: Phil Blundell @ 2016-11-05  0:09 UTC (permalink / raw)
  To: Burton, Ross, Nicolas Dechesne; +Cc: Koen Kooi, OE-core
In-Reply-To: <CAJTo0LZAGq8szm0vL0wyyR_rFVe1LBoMWYcoZh+VBMBcw5kW-Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

On Fri, 2016-11-04 at 23:24 +0000, Burton, Ross wrote:
> > No, I checked the files in /usr on the host, as this is a native
build it should be linking against the host libc.
> 
> $ grep -r getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
> 
> 
> Yes, looks like Debian headers are a bit broken.
> 
> 
> 

That would happen if your glibc was compiled against a newer version of
the kernel headers than you actually have installed (bits/syscall.h is
auto-generated from the kernel headers at build time). If this is a
clean Debian install then it does sound like they have messed up the
packaging somehow.

p.


[-- Attachment #2: Type: text/html, Size: 1216 bytes --]

^ permalink raw reply

* Re: [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk
From: Khem Raj @ 2016-11-05  0:04 UTC (permalink / raw)
  To: Burton, Ross, Koen Kooi; +Cc: OE-core
In-Reply-To: <CAJTo0LaC2t1BN9VpKRx4W7fMT88mDdmCBYhzgBgvsdDJXhNk_w@mail.gmail.com>



On 10/20/16 4:05 AM, Burton, Ross wrote:
> 
> On 20 October 2016 at 09:30, Koen Kooi <koen.kooi@linaro.org
> <mailto:koen.kooi@linaro.org>> wrote:
> 
>     +BBCLASSEXTEND = "native nativesdk"
> 
> 
> The native form fails on Debian stable hosts:
> 
> | make[2]: Entering directory
> '/data/poky-master/tmp-glibc/work/x86_64-linux/libbsd-native/0.8.3-r0/build/src'
> | ../x86_64-linux-libtool  --tag=CC   --mode=compile gcc  -DHAVE_CONFIG_H  
> -I.. -isystem ../../libbsd-0.8.3/include/bsd/ -include ../config.h
> -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED -D__REENTRANT
> -isystem/data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/include
>  -isystem/data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/include -O2
> -pipe -c -o getentropy.lo ../../libbsd-0.8.3/src/getentropy.c
> | x86_64-linux-libtool: compile:  gcc -DHAVE_CONFIG_H -I.. -isystem
> ../../libbsd-0.8.3/include/bsd/ -include ../config.h -DLIBBSD_OVERLAY
> -DLIBBSD_DISABLE_DEPRECATED -D__REENTRANT
> -isystem/data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/include
> -isystem/data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/include -O2
> -pipe -c ../../libbsd-0.8.3/src/getentropy.c  -fPIC -DPIC -o .libs/getentropy.o
> | In file included from /usr/include/x86_64-linux-gnu/sys/syscall.h:31:0,
> |                  from ../../libbsd-0.8.3/src/getentropy_linux.c:29,
> |                  from ../../libbsd-0.8.3/src/getentropy.c:28:
> | ../../libbsd-0.8.3/src/getentropy_linux.c: In function ‘getentropy_getrandom’:
> | ../../libbsd-0.8.3/src/getentropy_linux.c:203:17: error: ‘__NR_getrandom’
> undeclared (first use in this function)
> |    ret = syscall(SYS_getrandom, buf, len, 0);
> |                  ^
> | ../../libbsd-0.8.3/src/getentropy_linux.c:203:17: note: each undeclared
> identifier is reported only once for each function it appears in
> 
> It's not wrong - there's no actual definition of __NR_getrandom in
> /usr/include here.


Do you have libbsd pre-installed on your build system ?

> 
> Ross
> 
> 


^ permalink raw reply

* Re: [PATCH] db: disable the ARM assembler mutex code
From: Phil Blundell @ 2016-11-05  0:01 UTC (permalink / raw)
  To: Khem Raj, Li Zhou, openembedded-core
In-Reply-To: <3ceaa47d-7f30-4b0a-f554-eb193a10f82a@gmail.com>

On Fri, 2016-11-04 at 16:55 -0700, Khem Raj wrote:
> 
> yes I meant <= v5, it should work usually, I am just thinking its a
> untested
> option, it may not be as bad as I think but some testing might be
> useful

Well, I admit I haven't looked at the actual code, but from the
comments in the patch I get the impression that it just causes db to
use the same code (i.e. pthread_mutex_xx) on ARM as it already was
doing on every other architecture.  I think it's safe to say that
pthread_mutex_lock() on ARM probably does work, otherwise any number of
programs would be broken, and db probably does work with
pthread_mutex_lock generically otherwise it would be broken on x86 and
so on.

You're right of course that this specific combination could do with
some testing but all in all it seems like a fairly low-risk change.

p.



^ permalink raw reply

* Re: [PATCH] db: disable the ARM assembler mutex code
From: Khem Raj @ 2016-11-04 23:55 UTC (permalink / raw)
  To: Phil Blundell, Li Zhou, openembedded-core
In-Reply-To: <1478301288.3662.21.camel@pbcl.net>

Phil

On 11/4/16 4:14 PM, Phil Blundell wrote:
> On Fri, 2016-11-04 at 11:22 -0700, Khem Raj wrote:
>>
>>
>> On 11/4/16 2:07 AM, Li Zhou wrote:
>>>
>>> The swpb in macro MUTEX_SET will cause "undefined instruction"
>>> error
>>> on the new arm arches which don't support this assembly instruction
>>> any more. If use ldrex/strex to replace swpb, the old arm arches
>>> don't
>>> support them. So to avoid this issue, just disable the ARM
>>> assembler
>>> mutex code, and use the default pthreads mutex.
>>>
> 
>> it would be good to keep this for older < armv5 arches
> 
> I guess you meant "<= ARMv5".  STREX etc were introduced in ARMv6, so
> ARMv5 (and ARMv5TE) don't have it.  But in any case, won't the default
> libpthread mutex work just fine on those older architectures?  There is
> no SMP on anything before ARMv6 anyway so lock contention will be
> relatively low, and it seems fairly unlikely that anybody has a real-
> world application which uses db so heavily that the mutex
> implementation will have any noticeable performance impact.

yes I meant <= v5, it should work usually, I am just thinking its a untested
option, it may not be as bad as I think but some testing might be useful

> 
> And, given that it's now something like 15 years since support for
> STREX was introduced in ARMv6, and more than 10 years since support for
> SWP was deleted in ARMv7, it doesn't seem entirely unreasonable for oe-
> core to pick the newer paradigm as the case to optimise for.  Distros
> that want to target ARMv5 or older are obviously free to do so and they
> can carry the SWP patch locally if they want to.  But as far as oe-core 
> itself is concerned, at this point it seems like it's just scar tissue.

yeah agree here.

> 
> p.
> 


^ permalink raw reply

* Re: [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk
From: Nicolas Dechesne @ 2016-11-04 23:47 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Koen Kooi, OE-core
In-Reply-To: <CAJTo0LZAGq8szm0vL0wyyR_rFVe1LBoMWYcoZh+VBMBcw5kW-Q@mail.gmail.com>

On Sat, Nov 5, 2016 at 12:24 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 4 November 2016 at 21:25, Nicolas Dechesne <nicolas.dechesne@linaro.org>
> wrote:
>>
>> So in order to get the build error you are seeing, that means that
>> SYS_getrandom is define to NR_getrandom (in syscall.h), but that
>> NR_getrandom is not set to the right syscall ID. That makes it quite
>> inconsistent.. could we be mixing HOST and sysroot content here?
>
>
> No, I checked the files in /usr on the host, as this is a native build it
> should be linking against the host libc.
>
> $ grep -r getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
>
> Yes, looks like Debian headers are a bit broken.

hmm. not for me...

root@nikaia:/usr/include# grep getrandom
/usr/include/x86_64-linux-gnu/bits/syscall.h

root@nikaia:/usr/include# dpkg -S /usr/include/x86_64-linux-gnu/bits/syscall.h
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/bits/syscall.h

root@nikaia:/usr/include# dpkg -l | grep libc6-dev
ii  libc6-dev:amd64                2.19-18+deb8u6           amd64
  GNU C Library: Development Libraries and Header Files

this is from a fresh jessie debootstrap


^ permalink raw reply

* Re: [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk
From: Burton, Ross @ 2016-11-04 23:24 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: Koen Kooi, OE-core
In-Reply-To: <CAP71Wjyy-qQH+nE34FTKUhqgRqGZocpfQ4CrkmTPh+OOMGK6jg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

On 4 November 2016 at 21:25, Nicolas Dechesne <nicolas.dechesne@linaro.org>
wrote:

> So in order to get the build error you are seeing, that means that
> SYS_getrandom is define to NR_getrandom (in syscall.h), but that
> NR_getrandom is not set to the right syscall ID. That makes it quite
> inconsistent.. could we be mixing HOST and sysroot content here?
>

No, I checked the files in /usr on the host, as this is a native build it
should be linking against the host libc.

$ grep -r getrandom
x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom

Yes, looks like Debian headers are a bit broken.

Ross

[-- Attachment #2: Type: text/html, Size: 1552 bytes --]

^ permalink raw reply

* Re: [PATCH] db: disable the ARM assembler mutex code
From: Phil Blundell @ 2016-11-04 23:14 UTC (permalink / raw)
  To: Khem Raj, Li Zhou, openembedded-core
In-Reply-To: <b3c8d5de-1d26-b37b-e28c-f8cca01c9ba3@gmail.com>

On Fri, 2016-11-04 at 11:22 -0700, Khem Raj wrote:
> 
> 
> On 11/4/16 2:07 AM, Li Zhou wrote:
> > 
> > The swpb in macro MUTEX_SET will cause "undefined instruction"
> > error
> > on the new arm arches which don't support this assembly instruction
> > any more. If use ldrex/strex to replace swpb, the old arm arches
> > don't
> > support them. So to avoid this issue, just disable the ARM
> > assembler
> > mutex code, and use the default pthreads mutex.
> > 

> it would be good to keep this for older < armv5 arches

I guess you meant "<= ARMv5".  STREX etc were introduced in ARMv6, so
ARMv5 (and ARMv5TE) don't have it.  But in any case, won't the default
libpthread mutex work just fine on those older architectures?  There is
no SMP on anything before ARMv6 anyway so lock contention will be
relatively low, and it seems fairly unlikely that anybody has a real-
world application which uses db so heavily that the mutex
implementation will have any noticeable performance impact.

And, given that it's now something like 15 years since support for
STREX was introduced in ARMv6, and more than 10 years since support for
SWP was deleted in ARMv7, it doesn't seem entirely unreasonable for oe-
core to pick the newer paradigm as the case to optimise for.  Distros
that want to target ARMv5 or older are obviously free to do so and they
can carry the SWP patch locally if they want to.  But as far as oe-core 
itself is concerned, at this point it seems like it's just scar tissue.

p.



^ permalink raw reply

* Re: [PATCH] db: disable the ARM assembler mutex code
From: Khem Raj @ 2016-11-04 21:47 UTC (permalink / raw)
  To: Ross Burton; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CAMKF1sp=ZHOP4aY7r11kvURBymq4+uknmeiSGQyP9BUpW_WXBQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

Not sure the atomics in newer  compiler and libc has ever been tested in
this version of db

On Nov 4, 2016 1:29 PM, "Burton, Ross" <ross.burton@intel.com> wrote:


On 4 November 2016 at 18:22, Khem Raj <raj.khem@gmail.com> wrote:

> it would be good to keep this for older < armv5 arches
>

Doesn't the C library support its own atomics for those?

Ross

[-- Attachment #2: Type: text/html, Size: 1246 bytes --]

^ permalink raw reply

* Re: [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk
From: Nicolas Dechesne @ 2016-11-04 21:25 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Koen Kooi, OE-core
In-Reply-To: <CAJTo0LaC2t1BN9VpKRx4W7fMT88mDdmCBYhzgBgvsdDJXhNk_w@mail.gmail.com>

On Thu, Oct 20, 2016 at 1:05 PM, Burton, Ross <ross.burton@intel.com> wrote:
> On 20 October 2016 at 09:30, Koen Kooi <koen.kooi@linaro.org> wrote:
>>
>> +BBCLASSEXTEND = "native nativesdk"
>
>
> The native form fails on Debian stable hosts:
>
> | make[2]: Entering directory
> '/data/poky-master/tmp-glibc/work/x86_64-linux/libbsd-native/0.8.3-r0/build/src'
> | ../x86_64-linux-libtool  --tag=CC   --mode=compile gcc  -DHAVE_CONFIG_H
> -I.. -isystem ../../libbsd-0.8.3/include/bsd/ -include ../config.h
> -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED -D__REENTRANT
> -isystem/data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/include
> -isystem/data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/include -O2
> -pipe -c -o getentropy.lo ../../libbsd-0.8.3/src/getentropy.c
> | x86_64-linux-libtool: compile:  gcc -DHAVE_CONFIG_H -I.. -isystem
> ../../libbsd-0.8.3/include/bsd/ -include ../config.h -DLIBBSD_OVERLAY
> -DLIBBSD_DISABLE_DEPRECATED -D__REENTRANT
> -isystem/data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/include
> -isystem/data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/include -O2
> -pipe -c ../../libbsd-0.8.3/src/getentropy.c  -fPIC -DPIC -o
> .libs/getentropy.o
> | In file included from /usr/include/x86_64-linux-gnu/sys/syscall.h:31:0,
> |                  from ../../libbsd-0.8.3/src/getentropy_linux.c:29,
> |                  from ../../libbsd-0.8.3/src/getentropy.c:28:
> | ../../libbsd-0.8.3/src/getentropy_linux.c: In function
> ‘getentropy_getrandom’:
> | ../../libbsd-0.8.3/src/getentropy_linux.c:203:17: error: ‘__NR_getrandom’
> undeclared (first use in this function)
> |    ret = syscall(SYS_getrandom, buf, len, 0);
> |                  ^
> | ../../libbsd-0.8.3/src/getentropy_linux.c:203:17: note: each undeclared
> identifier is reported only once for each function it appears in
>
> It's not wrong - there's no actual definition of __NR_getrandom in
> /usr/include here.

hmm. that's odd. libbsd is supposed to work with system that have this
syscall, and with system without it. in the upstream source code, they
properly do it like this:

#ifdef SYS_getrandom
static int
getentropy_getrandom(void *buf, size_t len)
{
    int pre_errno = errno;
    int ret;
    if (len > 256)
        return (-1);
    do {
        ret = syscall(SYS_getrandom, buf, len, 0);
<...>
#endif

So in order to get the build error you are seeing, that means that
SYS_getrandom is define to NR_getrandom (in syscall.h), but that
NR_getrandom is not set to the right syscall ID. That makes it quite
inconsistent.. could we be mixing HOST and sysroot content here?

I don't have a debian stable system handy right now, i will have to setup one.

nico


^ permalink raw reply

* Re: [PATCH] db: disable the ARM assembler mutex code
From: Burton, Ross @ 2016-11-04 20:29 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core
In-Reply-To: <b3c8d5de-1d26-b37b-e28c-f8cca01c9ba3@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

On 4 November 2016 at 18:22, Khem Raj <raj.khem@gmail.com> wrote:

> it would be good to keep this for older < armv5 arches
>

Doesn't the C library support its own atomics for those?

Ross

[-- Attachment #2: Type: text/html, Size: 638 bytes --]

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox