From patchwork Fri Oct 11 00:27:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 175897 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp42360ill; Thu, 10 Oct 2019 17:29:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxucya4ndG/yzgm9WwpTnIwMV+D5gW0r8d2mR9wBc96u4dcM8vegkIOtf6pCtY55QxobQ06 X-Received: by 2002:a50:9f68:: with SMTP id b95mr10743223edf.301.1570753781979; Thu, 10 Oct 2019 17:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570753781; cv=none; d=google.com; s=arc-20160816; b=gKKeCPHXyXdhEymcbdkSYh4VyVU+6hk5h2SB2ZfAZgmrT8NCpbexs0PuAm4T+vArvx D06HABMoeyegNjvAOp8oFsvXhqXp5sQEA4Mp6V1tIY7JGhZlufB4AToHy2XDXCH919du R8AM7Qut2gjUZ1xuB5bCZmcC332Et/Zko2PJE0k8BxJshrY/L9auE55WHlJBbMH+KRR0 oqWX9rmU7pnE2SV+rc5vYKnHZZynpEqS8l2wt3axDRCeSlqEaR9Zy9AVEoANHRJ5ITOK knISQfNs3j3EhxHS/XuuZiwq/ibmykNBkrDpJUEBIsN6BPsg0hcvBx2ssKtq19nsLxYT ORyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=X+OYdLBkIYv08X2eKXt3TCPXQ11so0VYCO7f1mswfR4=; b=iNphA/B7STRctsNqs+PGzY0pOPes3BkmYd7n0J0SI9Lb8eYcbQKqHjAZKzWT6jNHOr QMe2QpVK+rAV6PKwjzfqwr2kGrD7EWHe1E9r0hLkmBavY793PmCB42MusAENLFDA7XoM 520C5DWWrh64CQkObyDo+TBjxHIAhnGA1k0xphrgde5ng7pg+gsRybaP2eeD1+E7lq79 v7DkDnJjr9LZ6Gln9agWwjN5Lasd7RLGsOGqVqJhnZh4NQDWXC/BLpl3EzJZMwmyAkg8 kDkr4hyFrvebYDXav8AqJKyqmK53JVI/PlYD9erKhivPNA48NfPzT7Hm0TErtY/pmbni pUKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YKc0wBOK; 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 e22si4005608ejx.107.2019.10.10.17.29.41; Thu, 10 Oct 2019 17:29:41 -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=YKc0wBOK; 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 S1727994AbfJKA3l (ORCPT + 22 others); Thu, 10 Oct 2019 20:29:41 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:39235 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727569AbfJKA22 (ORCPT ); Thu, 10 Oct 2019 20:28:28 -0400 Received: by mail-lf1-f65.google.com with SMTP id 72so5725524lfh.6 for ; Thu, 10 Oct 2019 17:28:25 -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:in-reply-to:references; bh=X+OYdLBkIYv08X2eKXt3TCPXQ11so0VYCO7f1mswfR4=; b=YKc0wBOK5kw1DdbXCuiOee6bbytIkRtP7xcVtvuTLj4UdL6r5TUv6DcZgG/ZDsLP69 ulWquw4+7tsUAsKSiFy2Cfty4cW+bXLlKps9odJRuCeWnw/lGdGvLR5rkISefH9Phe91 /CAtfzmy5wtryrSDvREOHdPKvSRLjAPu5s7+k7zxv+jQtm2PN0fja1E8kM5N4INyKxLu /Vf7ncX5Q0YaTUYo17CjLST2nR75D+SCZ8tWLmJkPS9ENAAQArYJ0M+MYo6mSMcqEXu7 Tnhwc+jAV+FrQNEWwOXtNudFWCGl6uLf0ZpPNG8Nqh7N9/l5U6zwHP+DruNqbB9COdF4 akmA== 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; bh=X+OYdLBkIYv08X2eKXt3TCPXQ11so0VYCO7f1mswfR4=; b=a3b1aM3+uhHLMhJbogNVPG5d78SNr/MAl455ONTCsTxYeNczeJ2iXAGPpWuuU6LKfy PQzM/1tUPnUH+KNd1ECMZlmDvop6WPI0P9m2jcsv4xYyhHD8ZAVVicQ0ZsN/DtKabi1X LBYKhURfXj7Pbvt9x2ohryQfk5ul+OmAnLTj9FJTkg0K/XIANvTpkg9pfQ54XG4zkn0M QB6QKZUeRBLWWHq+TOgOtq38177xciyEGoCy1W73LH9g7/RRcb+3Z8grHt67A1RRX92s 4tHUKj+de8Ah/g2Zsgr7MOPqoypDk7rfK/GYQol1gx3Risfli7FPHvDA5Utdn6xNQzKG Ecyg== X-Gm-Message-State: APjAAAW4Y7VTKhFa/7Hhg01/OqparMLzun6k/Z2rQbN1Ug8dPDS1xais bpRsGYgDQbFCcssK8aYS9AVuuQ== X-Received: by 2002:ac2:41d4:: with SMTP id d20mr7390173lfi.24.1570753705056; Thu, 10 Oct 2019 17:28:25 -0700 (PDT) Received: from localhost.localdomain (88-201-94-178.pool.ukrtel.net. [178.94.201.88]) by smtp.gmail.com with ESMTPSA id 126sm2367010lfh.45.2019.10.10.17.28.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 17:28:24 -0700 (PDT) From: Ivan Khoronzhuk To: ast@kernel.org, daniel@iogearbox.net, yhs@fb.com, davem@davemloft.net, jakub.kicinski@netronome.com, hawk@kernel.org, john.fastabend@gmail.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, ilias.apalodimas@linaro.org, sergei.shtylyov@cogentembedded.com, Ivan Khoronzhuk Subject: [PATCH v5 bpf-next 03/15] samples/bpf: use --target from cross-compile Date: Fri, 11 Oct 2019 03:27:56 +0300 Message-Id: <20191011002808.28206-4-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191011002808.28206-1-ivan.khoronzhuk@linaro.org> References: <20191011002808.28206-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For cross compiling the target triple can be inherited from cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile. So copy-paste this decision from kernel Makefile. Acked-by: Andrii Nakryiko Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 045fa43842e6..9c8c9872004d 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -195,7 +195,7 @@ BTF_PAHOLE ?= pahole # Detect that we're cross compiling and use the cross compiler ifdef CROSS_COMPILE HOSTCC = $(CROSS_COMPILE)gcc -CLANG_ARCH_ARGS = -target $(ARCH) +CLANG_ARCH_ARGS = --target=$(notdir $(CROSS_COMPILE:%-=%)) endif # Don't evaluate probes and warnings if we need to run make recursively