From patchwork Thu Sep 27 04:17:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 147665 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1505213lji; Wed, 26 Sep 2018 21:18:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV62KNd1TQLBMWKVjMcSY5Qj44/iYaqHFFy+r6gc6RdyC79fL/sxOLqdHx9H6o3DVtZwT//NC X-Received: by 2002:a17:902:b94b:: with SMTP id h11-v6mr8731193pls.221.1538021917365; Wed, 26 Sep 2018 21:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538021917; cv=none; d=google.com; s=arc-20160816; b=AnZ4r7Uq9L/Dew5Pgz2i2Txh9LEoJfpdE8E49NmNg/ABSgAw2uiWEWBgBnsfrAN3F4 XlhCjSem+4inYUK+Z5UWgMYBhmcDllxr8jPdjr7v1a9KpgnOSSaYsZYtJaRltpXWTLUP 1ZMCoN2lHOVTl9mR8EuLnXHT5zsTHqLI+EgK/ysh1tAGNaIVNbH3d1bWFWt98+q23kKr 1YbedY2522oWL/kB6ndH7S4h+ib7WdfQIHh5Kl1OawIOnHB/hKDG0MXqQpz4QtU6Tqa+ m0yHXj79CdN2W5vvISxw8YA/SFTuCUzTaXeGuTeSu641uJGF+K+X6X1Pa/Pbrnv3WecM rRkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=Vp9ylyB5m0HE42254aEhEEHKCXXF8DsJgGUi/qytFpk=; b=R7ImoCCc7o8xGgN/+h82CbnzSlXwKlkkOGreLU5SN7UH1XYQ2RqxRZR78EAe+yciCo MEC4jUVX+ZBJfbwFoAqlwMs27OQWGr8HCJ+e/LZbIxI3SjZIDcqG2HSfGBf2TbGCHasG JS7FcitmgTnjYYNKSHUd9lny0k5qp+BQyeXoiFin3sZbnE/pB07J8rRoAFIoNteQvAyL NRaDqOA25nk+NVlzSmEsbhW4Lsd1jT97Fba5ecMP+4atz9Lthd4uHXZBhXi2oXUv01kw hHd8sPkzWI3KYR64G+sVmdCoJneQlAAWde9SfN9gXB35stVXew9Umc0tXJFOhDzdT1aB 6cFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=VOv9cM1A; 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=QUARANTINE 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 gn7si881819plb.264.2018.09.26.21.18.37; Wed, 26 Sep 2018 21:18:37 -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.s=20161025 header.b=VOv9cM1A; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 557BE793EE; Thu, 27 Sep 2018 04:18:35 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mail.openembedded.org (Postfix) with ESMTP id CEA767459D for ; Thu, 27 Sep 2018 04:17:53 +0000 (UTC) Received: by mail-pg1-f173.google.com with SMTP id g2-v6so887176pgu.11 for ; Wed, 26 Sep 2018 21:17:55 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=xOip9iZoWLjMGQBTCYxPPHtbhqGLyBaqR88+EtIcSHA=; b=VOv9cM1AYmOGaVoFL/ByoUTWEb+jUiteap/1dQU/1OxTIdvBzkohcR615+qcLtkHoM w5ieCI30gyZkpN9hLRTn//HgxiGg22QfFtHy0bHof9Ya0PKI3N6nqWUY1h58gPQ83Irc pFEGVS0nmJdmZtrFeWl5zzI43gT8+QhMP5lkb/dGysKJhV7tmK/CAb5ZXxFqAuuS8IhH dcaJ9lCJkd6VKi6ZGpR5RcISMt6CvK/FogKfQ9+0JLc+diN55i5k8xRY4PcIhBzKnB/h IaHYS6mw3KZlo74AUhHMinYOMScG5iZvKZOfboLXLZYO2Yh95VkFQ1Df8RhAqLqY6V1J Wpkg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=xOip9iZoWLjMGQBTCYxPPHtbhqGLyBaqR88+EtIcSHA=; b=DDDHo0Es0m8nqxNPAvIxx7O9CgXU5nEs5wyEB+rItpbv2oQ5h64rHLTqV6+cWQVgC5 EVe5MVsYXpmiyw3rDLsaZPZXmRaotk3JGS8fSelhbYEGEMsLDJLMcezBRQIughBFroJT CwyoD7BGpEJxcJTT/0BDvyq6ljYAc8n75Fv6UNMq8yLoXt2E0/3G//uuLYXlAAO0arWO M+40xOmgcU9X/YCKByJjej0PyIhalmT5DehzGa7x5ee7drFwhcjTFZQUZcxQwB9kw4j/ GkFB1TQ37Luz97MdZKCXrE3N6ZwQRKv8KEjdtDZD9IEHxc7DthShWQN/OaD3jesuu9Dl 0qEg== X-Gm-Message-State: ABuFfoiHioFj8gXzBzoeP+BmS/zr6VHxoo18mfIa2f88JQde7q05f4QX 9KbPqDpMY82zkGKGXyB7gSp9QtuQ X-Received: by 2002:a63:ad44:: with SMTP id y4-v6mr8201870pgo.138.1538021874551; Wed, 26 Sep 2018 21:17:54 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::b1b1]) by smtp.gmail.com with ESMTPSA id l85-v6sm1021774pfk.34.2018.09.26.21.17.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 21:17:54 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Wed, 26 Sep 2018 21:17:43 -0700 Message-Id: <20180927041743.2769-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927041743.2769-1-raj.khem@gmail.com> References: <20180927041743.2769-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-networking][PATCH] netperf: Fix build error on musl 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: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...ve-including-sched.h-out-og-function.patch | 50 +++++++++++++++++++ .../recipes-support/netperf/netperf_git.bb | 10 ++-- 2 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch -- 2.19.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch b/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch new file mode 100644 index 0000000000..515737c8e5 --- /dev/null +++ b/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch @@ -0,0 +1,50 @@ +From 51a092ebb36dcc6180ceb93a9777258e826d9990 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 26 Sep 2018 18:11:10 -0700 +Subject: [PATCH] netlib.c: Move including sched.h out og function + +The shutdown_control() has this code where system headers are being +included inside function body and this results in compile errors on musl +especially when sched.h is included because sched.h defines a macro +which defines a static function. This means it ends up being a static +function inside another function and compiler calls it out + +In function 'bind_to_specific_processor': +| +/mnt/a/yoe/build/tmp/work/i586-yoe-linux-musl/netperf/2.7.0+git999-r0/recipe-sysroot/usr/include/sched.h:102:1: +error: invalid storage class for function '__CPU_AND_S' +| __CPU_op_func_S(AND, &) +| ^~~~~~~~~~~~~~~ + +Moving the definition out of function definition fixes the problem + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/netlib.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/netlib.c b/src/netlib.c +index 9258424..60b032d 100644 +--- a/src/netlib.c ++++ b/src/netlib.c +@@ -2262,6 +2262,10 @@ shutdown_control() + + } + ++#if HAVE_SCHED_SETAFFINITY ++#include ++#endif ++ + /* + bind_to_specific_processor will bind the calling process to the + processor in "processor" It has lots of ugly ifdefs to deal with +@@ -2308,7 +2312,6 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map) + value will not tell you if you are bound vs unbound. */ + bindprocessor(BINDPROCESS,getpid(),(cpu_t)mapped_affinity); + #elif HAVE_SCHED_SETAFFINITY +-#include + /* in theory this should cover systems with more CPUs than bits in a + long, without having to specify __USE_GNU. we "cheat" by taking + defines from /usr/include/bits/sched.h, which we ass-u-me is diff --git a/meta-networking/recipes-support/netperf/netperf_git.bb b/meta-networking/recipes-support/netperf/netperf_git.bb index f0e0f9cf1f..8921ea7460 100644 --- a/meta-networking/recipes-support/netperf/netperf_git.bb +++ b/meta-networking/recipes-support/netperf/netperf_git.bb @@ -8,10 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6" PV = "2.7.0+git${SRCPV}" -SRC_URI="git://github.com/HewlettPackard/netperf.git \ - file://cpu_set.patch \ - file://vfork.patch \ - file://init" +SRC_URI = "git://github.com/HewlettPackard/netperf.git \ + file://cpu_set.patch \ + file://vfork.patch \ + file://init \ + file://0001-netlib.c-Move-including-sched.h-out-og-function.patch \ + " SRCREV = "f482bab49fcedee46fc5b755da127f608325cd13"