From patchwork Thu Sep 19 16:05:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 174068 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1206364ill; Thu, 19 Sep 2019 09:05:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGY+kzWBnjF83Jx7ug9CWSgvHhSrkK7FRdg2FJHk3DSB1j3zzQYpB/GQRFED8VzTm+Yl+y X-Received: by 2002:a17:906:bcd6:: with SMTP id lw22mr7604333ejb.270.1568909129892; Thu, 19 Sep 2019 09:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568909129; cv=none; d=google.com; s=arc-20160816; b=vHZTw26GakanIT1sLQST2x38jejZmBKmjWP/Zey0bDLFz5jjkUYGfRYNeioLa9nL20 JYZla5N8QgNIwzaeMlAoAaqGmmX6IA2Pz0yy0NOh2io7YS3IP5tlkJOXJHxN4nHLVTMI ci2N8XgYbDSEbPEofZPX/3S9xpVHzJq+7MA93Ik2R8sWAGVGldSXLnYCV4vluvqrr1oP JvfXknXv42XF1jRZSd6X88UmU1Mx7ofRp2zK7Qqso0y/DLsQtS4FG8zI+Yyx5N/6Ks5t LtTVOwoMsLcXMQvlITYo5fMAH6sXuQgByq5HEuVrE1Vnl3tTD3IbNnRNuWt/3PAs7gZ3 KDjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=oWulYD7B080MVQfmnSpp87cWzUMLXTr6wp3qPP73Jlc=; b=aLasf4+K8nmi1CBF7AcZSn+WFCieaShnjzhnc+TWJjYSeIPJOG1ptTts0fbhaZuWQH 0259USi1sMGtIyE4y2VcF40ian4RniOti2dhEhmtI7JL5SMcrM51qsCzynTpn1WMu0SE mjPxaGs8uxyUgAxbrxXd9zlKMyXyI6wT7iY+BSfTSZa6lNChhWAHx4De8gKNWPlw1o0L IzyzMCWZJKlsUHYl5lhVqz7zwkTl1TybUNmu+IuVzS4MXJNhuWLZ6eWNZ0i69/UNegYN dfl9GAKK5J8mZ65gGa96aeXYXOU2AMYzx0M8rQ208tKiXCZc+jF0dkdTrudj+T4t6rzW aHrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Aa3gf0rV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si1434380eda.294.2019.09.19.09.05.28; Thu, 19 Sep 2019 09:05:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Aa3gf0rV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404091AbfISQFY (ORCPT + 26 others); Thu, 19 Sep 2019 12:05:24 -0400 Received: from mail-lj1-f171.google.com ([209.85.208.171]:43227 "EHLO mail-lj1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404074AbfISQFY (ORCPT ); Thu, 19 Sep 2019 12:05:24 -0400 Received: by mail-lj1-f171.google.com with SMTP id d5so4121321lja.10 for ; Thu, 19 Sep 2019 09:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=oWulYD7B080MVQfmnSpp87cWzUMLXTr6wp3qPP73Jlc=; b=Aa3gf0rVn+UXxcLOYGQp70TrEQPIIequrVJ9zMGiCp6udjxIQ8Kazoqh0wDrR1dL3N yqKZoRPPm7sZMHI8bNu37kRoDwIEEEUgxrySM8ACD7NkvswaYk7QwaH4ANDK6MjGFA2B lymG274elFcNkvhcm4UvZELFHgciyvp7B2JANal60jVrLsft5ciknrwg8idEJ7Qnzkgi XaBAcDXAC3wmCBjxZDMvr4RVewwrLrw85eBlc5UrIaRQBR6gfjHLemcDQZ20AYhVDHG3 YfKVexILIlZOhKWWVPl+fuzx2uAYBFDh3pp+tnXPPmTmFkFqgj9L+LyKvHo8b/yyvdMR jJaA== 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=oWulYD7B080MVQfmnSpp87cWzUMLXTr6wp3qPP73Jlc=; b=rVCOkQx+vkOIEbRXuaYE9FdqtuUqJqwCpqrilPDbLzG5ml2XDMMaNdxlsbwvYzrXjv xKk1GNs8FH0QLAcQ2IZ/VXhuIPdbC2JUhxv2qpbVOq5Dq3f1u3k3pW1HhMPrinehtSrx gSgpWgqXFcdXwP28cp0Cmxz8edt/zz/unhoC8dKAc29oflX67eg20SOslr7hhidcjRqO I0Yr09d+yUJFe04iykI3v0Qtw316iYV2PgW9KPcUYW7USZo4MVpUpvXiGA7/bFj0EXdr WgjrKQoK6i+qZpyVGKVGSeUQvMTh2aYtuwENZul80t0IpDpyVyoMsSRCdxLgSLfB/hc6 Ihhw== X-Gm-Message-State: APjAAAWjSvUt8M6pLHm07ZWqD4hNrfF70FE/N9xJXJPLGLJW3XPQ3DvW vLWwVCbxg4qEo+kkckxFHfd9ww== X-Received: by 2002:a05:651c:21b:: with SMTP id y27mr2636904ljn.219.1568909122191; Thu, 19 Sep 2019 09:05:22 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id t6sm1719039ljd.102.2019.09.19.09.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2019 09:05:21 -0700 (PDT) From: Ivan Khoronzhuk To: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, andriin@fb.com Cc: yhs@fb.com, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH bpf] libbpf: fix version identification on busybox Date: Thu, 19 Sep 2019 19:05:18 +0300 Message-Id: <20190919160518.25901-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's very often for embedded to have stripped version of sort in busybox, when no -V option present. It breaks build natively on target board causing recursive loop. BusyBox v1.24.1 (2019-04-06 04:09:16 UTC) multi-call binary. \ Usage: sort [-nrugMcszbdfimSTokt] [-o FILE] [-k \ start[.offset][opts][,end[.offset][opts]] [-t CHAR] [FILE]... Lets modify command a little to avoid -V option. Fixes: dadb81d0afe732 ("libbpf: make libbpf.map source of truth for libbpf version") Signed-off-by: Ivan Khoronzhuk --- Based on bpf/master tools/lib/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index c6f94cffe06e..a12490ad6215 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -3,7 +3,7 @@ LIBBPF_VERSION := $(shell \ grep -oE '^LIBBPF_([0-9.]+)' libbpf.map | \ - sort -rV | head -n1 | cut -d'_' -f2) + cut -d'_' -f2 | sort -r | head -n1) LIBBPF_MAJOR_VERSION := $(firstword $(subst ., ,$(LIBBPF_VERSION))) MAKEFLAGS += --no-print-directory