Skip to contentSkip to conversation

gperftools: Upgrade to 2.6.1

PATCH New Khem Raj 1 participant 4 messages Jul 22, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/4 gperftools: Upgrade to 2.6.1

Fix build with musl

---
v1 -> v2:
- Disable thumb on armv5

 .../0001-Fix-build-failure-for-ppc.patch           | 28 ----------
 .../gperftools/0001-fix-build-with-musl-libc.patch | 61 ++++++++++++++++++++++
 ...001-include-fcntl.h-for-loff_t-definition.patch | 28 ++++++++++
 .../{gperftools_2.5.bb => gperftools_2.6.1.bb}     | 19 ++++---
 4 files changed, 102 insertions(+), 34 deletions(-)
 delete mode 100644 meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch
 create mode 100644 meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch
 create mode 100644 meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch
 rename meta-oe/recipes-support/gperftools/{gperftools_2.5.bb => gperftools_2.6.1.bb} (58%)
meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch deleted +0 -28
deleted file mode 100644
index 27f855d1e..000000000
@@ -1,28 +0,0 @@
-Subject: Fix build failure for ppc
-
-Upstream-Status: Pending
-
-Fix the following build failure.
-
-  error: 'siginfo_t' does not name a type
-
-Signed-off-by: Chen Qi <[email protected]>
----
- src/stacktrace_powerpc-linux-inl.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h
-index 5d16fa1..a9bf775 100644
---- a/src/stacktrace_powerpc-linux-inl.h
-+++ b/src/stacktrace_powerpc-linux-inl.h
-@@ -44,6 +44,7 @@
- 
- #include <stdint.h>   // for uintptr_t
- #include <stdlib.h>   // for NULL
-+#include <signal.h>   // for siginfo_t
- #include <gperftools/stacktrace.h>
- #include <base/vdso_support.h>
- 
--- 
-2.8.3
-
meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch new file +61 -0

61 lines not on this page · raw message

meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch new file +28 -0
new file mode 100644
index 000000000..667008a5b
@@ -0,0 +1,28 @@
+From 04ea8e001501931f4dbf20288aca78469617b08a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 16 Jul 2017 19:28:17 -0700
+Subject: [PATCH] include fcntl.h for loff_t definition
+
+Fixes
+linux_syscall_support.h:2641:26: error: 'loff_t' has not been declared
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/base/linux_syscall_support.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h
+index 85347a2..70431ca 100644
+--- a/src/base/linux_syscall_support.h
++++ b/src/base/linux_syscall_support.h
+@@ -162,6 +162,7 @@ extern "C" {
+ #include <unistd.h>
+ #include <linux/unistd.h>
+ #include <endian.h>
++#include <fcntl.h>
+ 
+ #ifdef __mips__
+ /* Include definitions of the ABI currently in use.                          */
+-- 
+2.13.3
+
meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb renamed from meta-oe/recipes-support/gperftools/gperftools_2.5.bb +13 -6
similarity index 58%
rename from meta-oe/recipes-support/gperftools/gperftools_2.5.bb
rename to meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
index 43780a5ee..6c29a6127 100644
@@ -2,22 +2,29 @@ SUMMARY = "Fast, multi-threaded malloc() and nifty performance analysis tools"
 HOMEPAGE = "http://code.google.com/p/gperftools/"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a"
-DEPENDS = "libunwind"
+DEPENDS += "libunwind"
 
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/gperftools/gperftools-2.5.tar.gz/aa1eaf95dbe2c9828d0bd3a00f770f50/gperftools-2.5.tar.gz \
+SRCREV = "bf840dec0495e17f5c8403e68e10b9d6bf05c559"
+SRC_URI = "git://github.com/gperftools/gperftools \
            file://0001-Support-Atomic-ops-on-clang.patch \
-           file://0001-Fix-build-failure-for-ppc.patch \
            file://0001-Use-ucontext_t-instead-of-struct-ucontext.patch \
+           file://0001-fix-build-with-musl-libc.patch \
+           file://0001-include-fcntl.h-for-loff_t-definition.patch \
            "
 
-SRC_URI[md5sum] = "aa1eaf95dbe2c9828d0bd3a00f770f50"
-SRC_URI[sha256sum] = "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173"
-
 inherit autotools
 
+S = "${WORKDIR}/git"
+
 # On mips, we have the following error.
 #   do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008
 #   Segmentation fault (core dumped)
 COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|arm|aarch64).*-linux*"
 # On aarch64, add this option to avoid system hanging when using libtcmalloc.so.
 EXTRA_OECONF_aarch64 += "--disable-libunwind"
+# Disable thumb1
+# {standard input}: Assembler messages:
+# {standard input}:434: Error: lo register required -- `ldr pc,[sp]'
+# Makefile:4538: recipe for target 'src/base/libtcmalloc_la-linuxthreads.lo' failed
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
Signature · 1 line
2.13.3
author
#1 lore raw

PATCH 2/4 openflow: Fix build with musl

Regenerate configure before running oe_runconf

---
 .../recipes-protocols/openflow/openflow.inc        |  3 +-
 ...use-strlcpy-from-libc-before-defining-own.patch | 64 ++++++++++++++++++++++
 ...lib-netdev-Adjust-header-include-sequence.patch | 59 ++++++++++++++++++++
 .../recipes-protocols/openflow/openflow_git.bb     |  5 ++
 4 files changed, 129 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch
 create mode 100644 meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch
meta-networking/recipes-protocols/openflow/openflow.inc +1 -2
index 0ae2d1f1d..cccbfa19a 100644
@@ -27,9 +27,8 @@ S = "${WORKDIR}/git"
 
 inherit autotools-brokensep pkgconfig
 
-do_configure() {
+do_configure_prepend() {
     ./boot.sh
-    oe_runconf
 }
 
 do_install_append() {
meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch new file +64 -0

64 lines not on this page · raw message

meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch new file +59 -0

59 lines not on this page · raw message

meta-networking/recipes-protocols/openflow/openflow_git.bb +5 -0
index 6403bfb22..eceb45e94 100644
@@ -2,3 +2,8 @@ include ${BPN}.inc
 
 SRCREV = "c84f33f09d5dbcfc9b489f64cb30475bf36f653a"
 PV = "1.0+git${SRCPV}"
+
+SRC_URI += "\
+           file://0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch \
+           file://0002-lib-netdev-Adjust-header-include-sequence.patch \
+           "
Signature · 1 line
2.13.3
author
#2 lore raw

PATCH 3/4 xl2tpd: Update to 1.3.9

In reply to Khem Raj

License changes are cosmetic

https://github.com/xelerance/xl2tpd/commit/1611d6f028fe30da4cee5b026fd1de81d97cba48

---
 .../recipes-protocols/xl2tpd/xl2tpd.inc            |   5 +-
 .../fix-inline-functions-errors-with-gcc-5.x.patch | 134 ---------------------
 .../recipes-protocols/xl2tpd/xl2tpd_git.bb         |   4 +-
 3 files changed, 3 insertions(+), 140 deletions(-)
 delete mode 100644 meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch
meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc +1 -4
index 6f7f69330..d037c7cfc 100644
@@ -6,12 +6,9 @@ DEPENDS = "ppp virtual/kernel"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-INC_PR = "r0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "git://github.com/xelerance/xl2tpd.git \
-    file://fix-inline-functions-errors-with-gcc-5.x.patch \
 "
 
 S = "${WORKDIR}/git"
meta-networking/recipes-protocols/xl2tpd/xl2tpd/fix-inline-functions-errors-with-gcc-5.x.patch deleted +0 -134

134 lines not on this page · raw message

meta-networking/recipes-protocols/xl2tpd/xl2tpd_git.bb +2 -2
index 42bc398a1..88ae5d6f8 100644
@@ -2,7 +2,7 @@ require xl2tpd.inc
 
 # This is v1.3.6 plus some commits.  There is no tag for this commit.
 #
-PV = "1.3.6+git${SRCPV}"
+PV = "1.3.9+git${SRCPV}"
 
-SRCREV = "a96b345962622ea58490924130675df6db062d11"
+SRCREV = "f114c10ac532051badeca0132b144a2f1596f047"
 
Signature · 1 line
2.13.3
author
#3 lore raw

PATCH 4/4 wvstreams: Fix build with musl

In reply to Khem Raj
---
 .../0001-Check-for-limits.h-during-configure.patch |  26 ++++
 ...sk-Dont-use-ucontext-on-non-glibc-systems.patch | 135 +++++++++++++++++++++
 ...k-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch |  27 +++++
 .../0004-wvcrash-Replace-use-of-basename-API.patch |  28 +++++
 ...05-check-for-libexecinfo-during-configure.patch |  30 +++++
 .../wvdial/wvstreams/argp.patch                    |  37 ++++++
 .../recipes-connectivity/wvdial/wvstreams_4.6.1.bb |   9 +-
 7 files changed, 291 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch
 create mode 100644 meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch
 create mode 100644 meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch
 create mode 100644 meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch
 create mode 100644 meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch
 create mode 100644 meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch
meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch new file +26 -0
new file mode 100644
index 000000000..b092ba2fc
@@ -0,0 +1,26 @@
+From 7deaf836d1f1b9e4426818584b4267f8c4a095aa Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 20 Jul 2017 21:04:07 -0700
+Subject: [PATCH 1/5] Check for limits.h during configure
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index fe0fa2b..188adfe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -139,6 +139,8 @@ int main()
+ 			     [Compiler warning on deprecated functions])])
+ CPPFLAGS="$CPPFLAGS_save"
+ 
++AC_CHECK_HEADERS(limits.h)
++
+ # argp
+ USE_WVSTREAMS_ARGP=0
+ AC_CHECK_HEADERS(argp.h)
+-- 
+2.13.3
+
meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch new file +135 -0

135 lines not on this page · raw message

meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch new file +27 -0
new file mode 100644
index 000000000..f9304197a
@@ -0,0 +1,27 @@
+From f1fc9f4d523dd8b773a4535176547b0619ec05c6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 20 Jul 2017 21:08:57 -0700
+Subject: [PATCH 3/5] wvtask: Check for HAVE_LIBC_STACK_END only on glibc
+ systems
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ utils/wvtask.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/wvtask.cc b/utils/wvtask.cc
+index c0bff7d..716344b 100644
+--- a/utils/wvtask.cc
++++ b/utils/wvtask.cc
+@@ -563,7 +563,7 @@ void WvTaskMan::do_task()
+ 
+ const void *WvTaskMan::current_top_of_stack()
+ {
+-#ifdef HAVE_LIBC_STACK_END
++#if defined(HAVE_LIBC_STACK_END) && defined(__GLIBC__)
+     extern const void *__libc_stack_end;
+     if (use_shared_stack() || current_task == NULL)
+         return __libc_stack_end;
+-- 
+2.13.3
+
meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch new file +28 -0
new file mode 100644
index 000000000..6f3fbffbd
@@ -0,0 +1,28 @@
+From bfe68126693f9159f7ac66a69217e0b5f43e5781 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 20 Jul 2017 21:11:21 -0700
+Subject: [PATCH 4/5] wvcrash: Replace use of basename API
+
+musl does not have this API
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ utils/wvcrash.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/wvcrash.cc b/utils/wvcrash.cc
+index 0417759..3d160b7 100644
+--- a/utils/wvcrash.cc
++++ b/utils/wvcrash.cc
+@@ -404,7 +404,7 @@ extern void __wvcrash_init_buffers(const char *program_name);
+ void wvcrash_setup(const char *_argv0, const char *_desc)
+ {
+     if (_argv0)
+-	argv0 = basename(_argv0);
++	argv0 = strrchr(_argv0, '/') ? strrchr(_argv0, '/')+1 : _argv0;
+     __wvcrash_init_buffers(argv0);
+     if (_desc)
+     {
+-- 
+2.13.3
+
meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch new file +30 -0
new file mode 100644
index 000000000..25e9ee236
@@ -0,0 +1,30 @@
+From fd9515f08dcdafea6ae03413fbe5a43a6438fe3e Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 20 Jul 2017 21:25:48 -0700
+Subject: [PATCH 5/5] check for libexecinfo during configure
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 188adfe..1ab4d3c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -159,6 +159,12 @@ AC_SEARCH_LIBS([argp_parse], [argp c], [], [
+       USE_WVSTREAMS_ARGP=1
+   fi
+ ])
++
++USE_LIBEXECINFO=0
++AC_SEARCH_LIBS([backtrace], [execinfo], [], [
++USE_LIBEXECINFO=1
++])
++
+ # Function checks
+ AC_HEADER_DIRENT
+ 
+-- 
+2.13.3
+
meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch new file +37 -0
new file mode 100644
index 000000000..e85721363
@@ -0,0 +1,37 @@
+Check for argp_parse in libargp and then in libc before using internal version
+
+Index: wvstreams-4.6.1/configure.ac
+===================================================================
+--- wvstreams-4.6.1.orig/configure.ac
++++ wvstreams-4.6.1/configure.ac
+@@ -142,20 +142,21 @@ CPPFLAGS="$CPPFLAGS_save"
+ # argp
+ USE_WVSTREAMS_ARGP=0
+ AC_CHECK_HEADERS(argp.h)
+-AC_CHECK_FUNC(argp_parse)
+-if test "$ac_cv_func_argp_parse" != yes \
+-    -o "$ac_cv_header_argp_h" != yes ; then
+-    (
+-    	echo
++AC_SEARCH_LIBS([argp_parse], [argp c], [], [
++
++  if test "$ac_cv_func_argp_parse" != yes \
++      -o "$ac_cv_header_argp_h" != yes ; then
++      (
++       	echo
+     	echo 'configuring argp...'
+     	cd argp
+     	./configure --host=$host_cpu-$host_os || exit $?
+     	echo 'argp configured.'
+     	echo
+-    ) || exit $?
+-    USE_WVSTREAMS_ARGP=1
+-fi
+-
++      ) || exit $?
++      USE_WVSTREAMS_ARGP=1
++  fi
++])
+ # Function checks
+ AC_HEADER_DIRENT
+ 
meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb +8 -1
index 607a6178f..0ac175251 100644
@@ -5,6 +5,7 @@ LICENSE = "LGPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605"
 
 DEPENDS = "zlib openssl (>= 0.9.8) dbus readline"
+DEPENDS_append_libc-musl = " argp-standalone libexecinfo"
 
 SRC_URI = "http://${BPN}.googlecode.com/files/${BP}.tar.gz \
            file://04_signed_request.diff \
@@ -12,7 +13,13 @@ SRC_URI = "http://${BPN}.googlecode.com/files/${BP}.tar.gz \
            file://06_gcc-4.7.diff \
            file://07_buildflags.diff \
            file://gcc-6.patch \
-          "
+           file://argp.patch \
+           file://0001-Check-for-limits.h-during-configure.patch \
+           file://0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch \
+           file://0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch \
+           file://0004-wvcrash-Replace-use-of-basename-API.patch \
+           file://0005-check-for-libexecinfo-during-configure.patch \
+           "
 
 SRC_URI[md5sum] = "2760dac31a43d452a19a3147bfde571c"
 SRC_URI[sha256sum] = "8403f5fbf83aa9ac0c6ce15d97fd85607488152aa84e007b7d0621b8ebc07633"
Signature · 1 line
2.13.3