From patchwork Wed Sep 4 21:22:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 173072 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp454704ilq; Wed, 4 Sep 2019 14:23:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqywBTKkwwi6xcyfeWh8+dDuKzxNmBpKGymLJCWf768szjsb0bWBLQr54OA7y6bwClQ92gir X-Received: by 2002:a62:383:: with SMTP id 125mr48283886pfd.248.1567632185722; Wed, 04 Sep 2019 14:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567632185; cv=none; d=google.com; s=arc-20160816; b=hTXLLdTHpghbfxw9C7Lz/bQfDAmQqMTINDi9G7tM+O0rhxjtfNtb0k1pHskAFTD661 WAFXyQ64YiDuqgGjyy5zlJfHbtzS9T2uQfuFwsrNVR6UrDg+5Vv055nqLLI3HZQBaeBr bdwXc8WsnaPxrR8dgDmh6JVKWCS4m2MulympnGxA7iDMZNTL9G2I8pQFBiuHVGyCosCs OWzo9z+Byb6CTAlNmUSqeuNfWmoFLbaRfuF+vqlQj77emF9Bv4ZVsVexk2BQ3XVDQsTF tkcf61GbB4BFb5Be4JdkbIOXAXh33Lz1Vu2Yl2HEQpMZdPIUZ1uhMZ0o0+0A1XRhF0aj 2SXA== 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=Uyna4IYOJol121SLmRwAZvx/NaOoPDVjYK6GTYbGUpc=; b=hYefES79fuQnPkx61wFFepmzZCgVd+Pp6d9fThvfargT4bVQW/oJP0PARCxgay+fiY agDBY/Dp5oNaclmHjB+EwSihMaDCLxNdK6Gh8jzrLq4pMpRtwnKV+WuSFsKABCNTjUcv SEXy252enoDtfizd/YjGjoWsDAGG5F3UvbkbUSNl9HiyhjAWWJDfCvnaxfxAiNAfQ9Ob kquSU2IRsiCDSXIJjBbPTmfNUsoml8ab3xOM+HoYC96r1+D5cB+Oy26NqMa9dafl7t03 ntfn/miidtBw+rngvB9ZeQgJeh8X4C9xV7N+r5dmmVPYPd1SrE2SjdMsCpnNtEhRhkgT 0WzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HEvKyf6h; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 r9si84420plo.104.2019.09.04.14.23.05; Wed, 04 Sep 2019 14:23:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=HEvKyf6h; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 S1730214AbfIDVXE (ORCPT + 8 others); Wed, 4 Sep 2019 17:23:04 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:47001 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728072AbfIDVXE (ORCPT ); Wed, 4 Sep 2019 17:23:04 -0400 Received: by mail-lj1-f194.google.com with SMTP id e17so147531ljf.13 for ; Wed, 04 Sep 2019 14:23:03 -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=Uyna4IYOJol121SLmRwAZvx/NaOoPDVjYK6GTYbGUpc=; b=HEvKyf6hs2+1i0SgpYXPM43WRe6XRXXEvFQ0JmJsaAzI+5Kzq7PFffuX1Jzl6+iI+6 ZOS2jHoERLTa7KDEHqUkRHkic/Ja7Ek8udlefSiSVCiZJiE73g8B+EpMrCGc2t5YWh2/ SGTuU7MjjoW3hBkpywZ1if3F4MaZDV3thVqrdaS7K7dnboqNTOKkoxEZTmAPH5EfMJuD 6ylzq81lX5Z/QbVObOZN8N60eGDSFjTidvDL4wbEm3aYKxAhfyU4EGV87B+QV1iOn1Mx 0YQawwISYg8nsmINmbUc4RpqXkqqAl9xBmACJepPDHfZFjxAPRxR7riT3rJe9uEQiNTd Ad2A== 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=Uyna4IYOJol121SLmRwAZvx/NaOoPDVjYK6GTYbGUpc=; b=Q1E1nErGkuVyTWkT3sX4OV301LO3/Obojj2tr8TMsilX2Jkhyriuj1RpCY9gJmo/D+ vBn50IsnOFqasN1UovJXYuWziqxNqn3u4cWhhsqbR0Ln+CF7FC+4JkeTrpMuxDxHuUOw LfT2VL+uoW1h32clGA6JUulg5Y+S3hg2ZQ4lskXRTeZFZJ6MGQONfhQagMb/mrrLJy10 VVkwZ0mOyYbSD+gqnsL/1FWXkt4jn7sVwj+UKjBMRhRGh/Oc43d7uma9fPdIv5RO4Wct se0q+EFlwXNXYuMM6MtgArwlAd6DsRv8XW4JhUWXuFb0tPLv10ZAu39g1tFQXfyez32+ uSTw== X-Gm-Message-State: APjAAAWENsWI/KgP3eWfAS/tof7a9SlIV/2ZWp2Z20xNW6pyxxuYrGxQ mo9seFFJ6LKsuUL/ic8Qx02QUQ== X-Received: by 2002:a2e:93d7:: with SMTP id p23mr3270338ljh.100.1567632182383; Wed, 04 Sep 2019 14:23:02 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id s8sm3540836ljd.94.2019.09.04.14.23.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 14:23:01 -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, Ivan Khoronzhuk Subject: [PATCH bpf-next 1/8] samples: bpf: Makefile: use --target from cross-compile Date: Thu, 5 Sep 2019 00:22:05 +0300 Message-Id: <20190904212212.13052-2-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190904212212.13052-1-ivan.khoronzhuk@linaro.org> References: <20190904212212.13052-1-ivan.khoronzhuk@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 1d9be26b4edd..61b7394b811e 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -196,6 +196,8 @@ 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=$(notdir $(CROSS_COMPILE:%-=%)) +else CLANG_ARCH_ARGS = -target $(ARCH) endif