From patchwork Sat Jul 22 16:50:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 108522 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2157994qge; Sat, 22 Jul 2017 09:51:05 -0700 (PDT) X-Received: by 10.101.72.130 with SMTP id n2mr11316071pgs.198.1500742265181; Sat, 22 Jul 2017 09:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500742265; cv=none; d=google.com; s=arc-20160816; b=WKNmqUs4IpaXHk4MowR/O28IkhzbX2SZk+zKeXWZT6KvoG6Oor4tBMt0S7y6u4LQ2F kKyc3/ixJCZ3iwEVUCoJY7XZvXfBdeulKXEE8gAYKJzXqxzPG52GQ8Vy6mqzoMl/78Ey z+aRJ3f8bqCnQOffyUvPvooc7O0YYZAQ4QESxglmxSWv2fOtEap8w7rDOxlacgthBkuo iI8UNBCC0m1R2o/vYV97Np546+rvdgFEJFsDOm24+paWbSU1NtWl2DX7HejZmgY0SwpF u6lVeFt1KkMTaD3xeA6ye//JmbHa5YK4a5T6vrSKZM6qT+xTwkbdpPPLjE0GN1Z9XxZS QjKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=0xo9b4YHzEImQkN6gN2SNg0V/sGUXkcWISeaTksRwcI=; b=dX4Q8CN5P7B9bP0nxbsJAb5LKnP930+qDvqXgDkjjcUSJfdIj6+6o5I1GZuSjHPoiZ 0CtGA5aH8nfPd37GtXLnEkq66kQd1hxdvjQpdv8632ypAPs+XSx52BfGj7x3UZzqTs++ 24jTwkZxxuTuTUhpO0S9TY1rX2m2JWYtWy7ueunstODGtUOMwcNeviPRb9xTrAZxNVdj ldH8K/3BuStkM2lOvgXbY5Qev/VuSTdgl5vbn7tqsBRvuKV4YkvzJthOab8gbopmGHcu 6IRDJvX4kaPPKQVEOOeRYGs1xyU84261zdJeOocq6Z9Kq66RadiPhgk4sP5LN/x5kwx9 EGpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=jvdFeglV; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 3si4519429pgc.169.2017.07.22.09.51.04; Sat, 22 Jul 2017 09:51:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=jvdFeglV; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C731378452; Sat, 22 Jul 2017 16:51:00 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by mail.openembedded.org (Postfix) with ESMTP id ECCBE783B2 for ; Sat, 22 Jul 2017 16:50:59 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id q85so7117340pfq.2 for ; Sat, 22 Jul 2017 09:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=boFHTfqbVtiMbxoBumy+k5TyIMLl07fyTBhuafIsCpU=; b=jvdFeglVfh+H6SG4a18r5QoDsohE88ws6dBeriz0OVKE6AYmzik3P/kBEqySKJaMGH giWG/sIyR6R+f6xGboDlAHJjhdyJMQOnVY4o0HW5L2qH8jpMfS6NXg4OE6YW8STxmf3M HlvppIIgDWS1kkUGLLDnSLu1gW4LWd3xkv6wSO+c5jHiuI1HJOceoGaaCQowFaw70LwU MVRDuySsoFIrmQP0iOj4qbMM78yFB4P16Zm5E4Td0VFx57VxP6mEw9NOR/siU1uXYutM JW+youiSqE16WkakNJfTwOxEbNuNVECc9JRA1HWJ6oJClhXVmQx9yaLUp42zx3HQgDm8 ne7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=boFHTfqbVtiMbxoBumy+k5TyIMLl07fyTBhuafIsCpU=; b=hqwZ5OEv1nzIOFMPWwLe7+lSqlBcwmn64NwwSrU5ukKnB2HLIk3hsjL3n54H8agcnP lKnddPk1eRbyMaCf2P3BboZNgXKdOCIFaautvvx7/f4RkfARLJELhZTMmyn+00uiAVbe gyQkH6ejckMidYAmWTOIHrAF4sQs/xcMN1KfvbSKOBBolpZ/q88wftcE2VLskz1LZn1N pxXRYFkU71l0RqlaTl6RuZboAy3B4SIK7xGJBChfrWe76tU8hDywwr4oFKBybB1pCshq 8VplYNIDxOZu/FHXWmJgWd46UORIJCqnWUStC3QrI2DY11mN7J5sdNeBnRkp7FGeuaVY HJWA== X-Gm-Message-State: AIVw1101plQs3YZwr5lNL0zgZzvEz9++g4OCx97X9m37pMzQfsx+zuWj 9O39myibxUcSngWd X-Received: by 10.84.210.172 with SMTP id a41mr12126889pli.194.1500742261022; Sat, 22 Jul 2017 09:51:01 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c:6245:cbff:fe64:591]) by smtp.gmail.com with ESMTPSA id o10sm15628924pgc.81.2017.07.22.09.50.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jul 2017 09:50:59 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sat, 22 Jul 2017 09:50:42 -0700 Message-Id: <20170722165045.44735-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.13.3 Subject: [oe] [meta-oe][PATCH 1/4 V2] gperftools: Upgrade to 2.6.1 X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Fix build with musl Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- 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%) -- 2.13.3 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch deleted file mode 100644 index 27f855d1e..000000000 --- a/meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch +++ /dev/null @@ -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 ---- - 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 // for uintptr_t - #include // for NULL -+#include // for siginfo_t - #include - #include - --- -2.8.3 - diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch new file mode 100644 index 000000000..78621c7fe --- /dev/null +++ b/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch @@ -0,0 +1,61 @@ +From 157914941bd38f1a38bb6bd7294ca6c2bc1b8dcb Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 16 Jul 2017 15:51:28 -0700 +Subject: [PATCH] fix build with musl libc + +Patch from https://github.com/gperftools/gperftools/pull/765/ + +Signed-off-by: Khem Raj +--- + configure.ac | 1 + + src/malloc_hook_mmap_linux.h | 8 ++++++-- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b42fea3..70b49a3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -188,6 +188,7 @@ AC_HEADER_STDC + AC_CHECK_TYPES([__int64]) # defined in some windows platforms + AC_CHECK_TYPES([struct mallinfo],,, [#include ]) + AC_CHECK_TYPES([Elf32_Versym],,, [#include ]) # for vdso_support.h ++AC_CHECK_FUNCS(__sbrk) # for intercepting glibc memory allocator + AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory + AC_CHECK_FUNCS(geteuid) # for turning off services when run as root + AC_CHECK_FUNCS(fork) # for the pthread_atfork setup +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 79ac4e3..d444635 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -46,6 +46,10 @@ + #include + #include "base/linux_syscall_support.h" + ++#ifndef __GLIBC__ ++typedef off64_t __off64_t; ++#endif ++ + // The x86-32 case and the x86-64 case differ: + // 32b has a mmap2() syscall, 64b does not. + // 64b and 32b have different calling conventions for mmap(). +@@ -168,7 +172,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + return result; + } + +-# if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) ++# if defined(__GLIBC__) && (!defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH)) + + extern "C" void* mmap(void *start, size_t length, int prot, int flags, + int fd, off_t offset) __THROW { +@@ -206,7 +210,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if HAVE___SBRK + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +-- +2.13.3 + diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch new file mode 100644 index 000000000..667008a5b --- /dev/null +++ b/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch @@ -0,0 +1,28 @@ +From 04ea8e001501931f4dbf20288aca78469617b08a Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- + 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 + #include + #include ++#include + + #ifdef __mips__ + /* Include definitions of the ABI currently in use. */ +-- +2.13.3 + diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.5.bb b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb 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 --- a/meta-oe/recipes-support/gperftools/gperftools_2.5.bb +++ b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb @@ -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" +