From patchwork Wed Sep 4 21:22:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 173071 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp454687ilq; Wed, 4 Sep 2019 14:23:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjaISFDg80n8K607uoNSirYzwaaX0YagKGZLf4SwiM222PCYczrBD9H8lgy1vghRVLeSnb X-Received: by 2002:a17:90a:33e7:: with SMTP id n94mr309733pjb.15.1567632185039; 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=kDkubzr3SD0M6zKmmbflIt0P8WoSkQvsAtkZ5VYlamWZMJ44iuF70P0xCqcDd3Tan6 bpnSoY6dNxoS7VVjBQ82k0Bi7c89sowj29FZYo54Wcv1cLdSQKGcIalN4q+qEE4zix5M 2vZMefhO00RNn1FUmmhYgVGqNdKTcSdoWrMrRQJNB01R32RuKePotZN9L+ZULT7W8/rK 07L+zJDJL4x3u8BTm7X0kh0b5TS5EXA+DrjQEZdmpplZDjHL05AgfOza2Z5ewvItYXlJ Cv12UUnlBjpcC+F3HJIjfNeydLHjSME3uvw7c5OGDiwt9ET+Dk9+k06oT0Zfz0FvEhWB 098Q== 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=y0/K/3NHW2BoW66hjF3E64lXnccuPIx+Txfbqzf3jL0=; b=L1p1LAAjg1OULFIfYuzvMhGeY0hGbY3BjG4NgkcxbGIyf06pujMKA4y7m/Vt95zG7n 9wdZJIsuYx0yJGrT+9IL849KTZTJ8CaFHYQ7qU4tHAcNTZVxs9OqaMLIpx2YF6eCDvDp /LFnEaXw0iyBLR0oVJhjXo6iDAJi29Z6TTiZo8xzdIE8hcWextjsj4Jb6F2SrZsLj+wf 4s4RftBUaymwgPk9coRs4Qd/orvWigp7PokFABVl7Ha1PU0E2OpRc0kLnIM6jWt0zZxM H1/rO3Vh2SIGETkPykvqyDN1S/TXrDwUEEJk8bpdF7PRlYDRx8S0D2hd7iI4umngiRxb /G2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e4KCsujI; 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 j192si17833211pge.393.2019.09.04.14.23.04; Wed, 04 Sep 2019 14:23:05 -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=e4KCsujI; 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 S1730195AbfIDVXD (ORCPT + 28 others); Wed, 4 Sep 2019 17:23:03 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45640 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727809AbfIDVXD (ORCPT ); Wed, 4 Sep 2019 17:23:03 -0400 Received: by mail-lj1-f193.google.com with SMTP id l1so152812lji.12 for ; Wed, 04 Sep 2019 14:23:02 -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=y0/K/3NHW2BoW66hjF3E64lXnccuPIx+Txfbqzf3jL0=; b=e4KCsujIe59XNJPsOgxhHEmYvS6Ir/WAdxo1GJhGHE/R3+AjBK2RgqtyTX3IZyINrf SRreCzQZEnn0Yq8Wtj1O65F1SFMziACSlVSQCqda7Bh2FAcpMMUbrNGrjCaBJj9Zs4Ib OuBXJPEFa3+9pMFMo7zbfu76utYP3aIKNBrbRWQ6M+zBO7HmbHg4RrESIbDQapxTQ+c1 hLH3lRY0zxCVAUmNOE73sfln/v46G/JKY5aY8q8Ida9BNUwgRAlBkTpd99zCRrZURLSt 00nL2H4XqV0cpyNBcr7DamsSvkZTS5zQmVLP7Iqc+4QDVhEp+crY/7PKZWNKycVzq0V2 fkow== 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=y0/K/3NHW2BoW66hjF3E64lXnccuPIx+Txfbqzf3jL0=; b=DgMv7dSDSWvYP7TiUZWas/s47qKsaurYrixvUd3XABqyWhH+j2whidjtvb9ADI2qli Ura/iqSiHGifS2ra3oHs1iOE3fyStTDIlB9cUSePIFMnkUprc2buzilA0MwXZNEGNMwd RWYF9aQXMvPQ/NpuAZtTfhv+PKT9g+nHz2diLdZF2gMDtYWTBnjt8sdYc2WbntvilEKN QG+5zKkKm4ae+mrIGr+bKojH/DMEHi1Ll4/wKvmHqrWJQmCMizXLuk3Puo6fvIS0uzP/ fvCIw0DsU7AnPi0fg+EWSoyY+evAwJE3REL4lgySjszDZbM6At+Ofu2mnkC/5TrDlyXM xH2Q== X-Gm-Message-State: APjAAAVfKLQGtgrlgSCdH3h3AaWo7IBuu/NyZioIyjoLsWBxr61ebdy+ HeAb0oceanXrQ/xOrBcKTnm//g== X-Received: by 2002:a2e:9882:: with SMTP id b2mr3706041ljj.225.1567632181203; Wed, 04 Sep 2019 14:23:01 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 14:23:00 -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 0/8] samples: bpf: improve/fix cross-compilation Date: Thu, 5 Sep 2019 00:22:04 +0300 Message-Id: <20190904212212.13052-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 This series contains mainly fixes/improvements for cross-compilation (also verified on native platform build), tested on arm, but intended for any arch. Initial RFC link: https://lkml.org/lkml/2019/8/29/1665 Besides the pathces given here, the RFC also contains couple patches related to llvm clang arm: include: asm: swab: mask rev16 instruction for clang arm: include: asm: unified: mask .syntax unified for clang The change touches not only cross-compilation and can have impact on other archs and build environments, so might be good idea to verify it in order to add appropriate changes, some warn options could be tuned also. Ivan Khoronzhuk (8): samples: bpf: Makefile: use --target from cross-compile samples: bpf: Makefile: remove target for native build libbpf: Makefile: add C/CXX/LDFLAGS to libbpf.so and test_libpf targets samples: bpf: use own EXTRA_CFLAGS for clang commands samples: bpf: Makefile: use vars from KBUILD_CFLAGS to handle linux headers samples: bpf: makefile: fix HDR_PROBE "echo" samples: bpf: add makefile.prog for separate CC build samples: bpf: Makefile: base progs build on Makefile.progs samples/bpf/Makefile | 177 ++++++++++++++++++++++---------------- samples/bpf/Makefile.prog | 77 +++++++++++++++++ samples/bpf/README.rst | 7 ++ tools/lib/bpf/Makefile | 11 ++- 4 files changed, 197 insertions(+), 75 deletions(-) create mode 100644 samples/bpf/Makefile.prog -- 2.17.1