From patchwork Mon Sep 16 10:54:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 173835 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp3338590ilq; Mon, 16 Sep 2019 03:56:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/uD6FhpDds8ZRwvFJF4jLRXwTijV6YSVpOmmiZ8ZGePlCvuSOy9PgwFJLsXDMvESuIQsC X-Received: by 2002:aa7:d414:: with SMTP id z20mr34719038edq.208.1568631360029; Mon, 16 Sep 2019 03:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568631360; cv=none; d=google.com; s=arc-20160816; b=dMc30ikULBi3ybCsMcswVFZK3jlYwRjWfS7Bwh3ExBDNW18b7pHhRL2ynQcPaeYRfM pukCKJkX7CMz06zg8as3kB8B/KJxaQgBGHTJhOLUNVPRwpF3qvFMC29+Lh43MP1Ch0Xv CJW1wnGUVm7Nks5iySZa4SvsyqSK7hp+eSIWVIdG6Ne3YMHMEyEiplkq2a4TRvyUXOMJ vSNoVWD+/dcdTDKWtmhyNBW3NAGhlSXphPi6waETmKOcQ0nwBZnieevkGI/3Ztv/LOXh +i4ULBhx18/Lujck7wNWlgxPjyIGaPChTtfFToUktbzhqJS2HNpkz0wYIeF9QkrAuGvh x5AA== 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=HSB3pC6OCIzwVYGBAJ0R7QI4CKajD+8ovp0KUKhem8g=; b=DysIAs53ek8AhkVSUcZE7Fh/vL5LyTzq1rSlebwGa3NTA3KzwB2MORoGrK2uTq3beQ 77ZKB8wmZwf0r2OsEOT1edjy93e5xAMgdYonKRE+t8bXALS/iX+vRn2Ji2cxupaHeZK2 RslCXy6XEKNAjIGUGJ0qAdXVNKHHAeNXHgRd2jlSS+Ji6yZYGowrxGtI0QgOnAFwnajW UWDIzUFEFd22ezwaQ8JwMgxfnBnngcmVCgAxkPZbG1BoEVTRsLPr+cvo8nTCSiTRyx9w A+qujJM/xjBfri9OHWd8PEISOVnN5jt+2SUVXRIO3UirB68LMe3D3KSy3r8vcgHYkFfr 2SfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pNYUSbIS; 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 j5si12386162ejm.8.2019.09.16.03.55.59; Mon, 16 Sep 2019 03:56:00 -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=pNYUSbIS; 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 S1732710AbfIPKz6 (ORCPT + 8 others); Mon, 16 Sep 2019 06:55:58 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34045 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732449AbfIPKyq (ORCPT ); Mon, 16 Sep 2019 06:54:46 -0400 Received: by mail-lj1-f196.google.com with SMTP id h2so26755908ljk.1 for ; Mon, 16 Sep 2019 03:54:45 -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=HSB3pC6OCIzwVYGBAJ0R7QI4CKajD+8ovp0KUKhem8g=; b=pNYUSbISKlAVLelxCU1TU78GP/FlR+e7TlMVVNr+WQfkvrUyOQytDZ1zL1iVg/OgZe 6p6VltOKoWLDC/bPlR07+PqlPVKShLC8jd3pdogkkTiie7b6Q6qbewuXTyHcmiDnXpI9 nexFhZb6QkDjPMIgqjqoAenm82Eo5FSyqbzu2mVY2gkxjWC6rA3RJouf7eW9/956lUwo n3ujW3x/Y0Utc6zd+V/GzPWYnPD5jAs+aoniDRHjpYyQyNDBZcy8WMo8xx8v4czDr4/y wSRreUWlENL/nESYpqKX4+K4UeYnvtu6ZqfqWthcs5MXxnIME71OVkCZMJ/i342wY9xE /9Qw== 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=HSB3pC6OCIzwVYGBAJ0R7QI4CKajD+8ovp0KUKhem8g=; b=f4t8VYLLQdRJRnfuUE0AYR0gIzTJ90nyvKsAkjEHADeE125V16gWRhkbuYPlx+mjIb HoSNrwRpJBg017ckLMPeqfTjszRskrFYoYhAB2/zCDd4Z9psZcCSTe+82L6YTebkvScD iMjfiwqSTYCYrBbf5vI9UsVtt4w327sX2X9sDQ92tTCLCfYYyWeD9aYe7AYXTxb8B9t7 GhIWlgfrTn882F4p9rAL0nW1ET0s0Sif6UqjY7+c2EuWPRk+39DTNh/vhOsdS8LN1ejY zbUcvPMxZOuNa43ZUSJhCyYXyb7MG4fZilN8JXwOd28OwQEuVXGPCCAPsz4nyqxts9kc 3Y7w== X-Gm-Message-State: APjAAAX4cPBkak1S1Nan5pB0nM2bVIk+TigbFnvlvzukehMxjYu97b3U WzrqNQ7fVH/SwFBGbrWol4XNFA== X-Received: by 2002:a2e:9b43:: with SMTP id o3mr13477947ljj.214.1568631284266; Mon, 16 Sep 2019 03:54:44 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id v1sm8987737lfq.89.2019.09.16.03.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 03:54:43 -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, sergei.shtylyov@cogentembedded.com, Ivan Khoronzhuk Subject: [PATCH v3 bpf-next 03/14] samples: bpf: makefile: use --target from cross-compile Date: Mon, 16 Sep 2019 13:54:22 +0300 Message-Id: <20190916105433.11404-4-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> References: <20190916105433.11404-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, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 43dee90dffa4..b59e77e2250e 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