Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3916513ybc; Thu, 21 Nov 2019 16:13:18 -0800 (PST) X-Google-Smtp-Source: APXvYqyy1MVxM9pa4xDx/do5EZGDOBTtfHn2RXr/qyutpBJeSa/nXK6AT8TX6Ho7q/qvFrync47j X-Received: by 2002:a17:906:8305:: with SMTP id j5mr17968654ejx.48.1574381598255; Thu, 21 Nov 2019 16:13:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574381598; cv=none; d=google.com; s=arc-20160816; b=SvxR1RD+JVSSWEnXAUV68Ppk0f0rtO47Xjmm25495M3Vfa3UVUcMDCYcPmLKSx8TG2 eBwq/nBHfuGSgyGSY4Lzw8jFu+1xsAvH4eM4dLqDJzx+WZbqxLwWsG6a+TlWlSo/cpeK uISqxhhodfKmxY71Y/AMzGGkyaFHEcEPvOIV7x0tTlVr3Hh76+TIuEce8J8yT8g3wsqH IRT2t11Jcl135kfDc5QF8UUUJFeDjcnEt7glVlGFrnYW1vRVo2bLd1nCCrNleBgI1pnN LvD1LIkN4hl+I/fSeaf6cUSoGFslHAKhIpUVarwW3+w0JUw2npSGgm7D2Q6vua9o2dyX XH6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Rvf6GdcZqxgDiIyBJHEmvdw8Sb4QOPMzejK6SiW3zro=; b=dS0tNr+g5VpZB7cVFdyTk7BFYifaDcux/g04TAtbE9Wx+VESmaS/PukxUGzSPiBJTg z8MhwVTqTCXdSkZBjptnC686ZGgtVQzyRLysojfVGwnO48xQM5lswd3tbdfyNMxlfnej 1MBm/KKzU/oC+5zj/lP1zu+ut4ogWUsIbdvvggeS9YZwpnSiJ3kKnvxSu8/oqRiw0ApH J2yh2LI5GjvKES5XUw9jIM8TgVY8oXB2y41OGrYllV4JsoYDSgbzavIPrXmf/PpNOD6N aKtKAgSQm9lsoexgTr52fpYgb7gySI8RJZI5/zk6pBUKk9/wdFFdXkvdxGiPOsa+SuU4 9Z1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ww8mlpop; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hh22si2856901ejb.275.2019.11.21.16.12.54; Thu, 21 Nov 2019 16:13:18 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=Ww8mlpop; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726634AbfKVALr (ORCPT + 99 others); Thu, 21 Nov 2019 19:11:47 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:40476 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfKVALq (ORCPT ); Thu, 21 Nov 2019 19:11:46 -0500 Received: by mail-qv1-f65.google.com with SMTP id i3so2198644qvv.7; Thu, 21 Nov 2019 16:11:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Rvf6GdcZqxgDiIyBJHEmvdw8Sb4QOPMzejK6SiW3zro=; b=Ww8mlpopRe/tyjTPSAizu4hUP4ovvMsqCVr74foZV05BdV/yA/9j2QCMm8PJPjztel btkaaL3S9vq4mRTKl1c7mC8p6O2I1k8gAvp5NrvwrpoxckZYsC96PNuNpPajo7qmc5h1 HOBh9uO0wcH6wDAtX0Yj1bVUmliv99P3lL0agbDfBMef+LbFKfCyOGh3EKIFsWecchXv KNA8AWYZ7UV4DJMex5SqYdmQ4DNIm0yd0KV6binOPA7niRZQjLbMroQfTzjBJj8pbwUW 2oHAoLAo8/iy226ncwMNQOSr0WBG7j1nLuwa5vsMqo+tMLtwkeufu0XGKs/1v9GK1OuI MrBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rvf6GdcZqxgDiIyBJHEmvdw8Sb4QOPMzejK6SiW3zro=; b=RxkuLlhkM9yWZdT0MVFvNYU+YGgUd5OkvnNBvr2GXTzmy/RUSWK29RyWkYWKUsArTb RWEgYrupfMiYTfT0SyFmgdaTg4p6x0y17jGU1PWUZrzLVjco+74smxCgKptWQxSe4HP5 j49koDhrvKLJZTaJTIx1AvPlpjbrrYMrw/v+tDpCiT9b36OxEu87lNfcMI6LBhzE5UJo T/P6i4HpNa8ecvusO9nukmnOkiaYd7vtvEdEz899Uayq7ZTlXJBly3CC6nYH2/Q6gCjt VDIk84/kQlbUEjVduwOd77MCQaXUCrYkKQqSaEXL9E6Z4c/y9mb5tVZt/rN7hO1ipr4y xCbQ== X-Gm-Message-State: APjAAAW9hqUZD7IFGqdszijsEX1m1HZgHd0nS/sMIoEVQURFdZlXwUJX kdeiZaSYe6l9R6KEIMpLa+mc0HJEZW1PcY5b5iA= X-Received: by 2002:a05:6214:90f:: with SMTP id dj15mr11147691qvb.224.1574381505270; Thu, 21 Nov 2019 16:11:45 -0800 (PST) MIME-Version: 1.0 References: <20191011002808.28206-1-ivan.khoronzhuk@linaro.org> <20191011002808.28206-12-ivan.khoronzhuk@linaro.org> <20191121214225.GA3145429@mini-arch.hsd1.ca.comcast.net> In-Reply-To: <20191121214225.GA3145429@mini-arch.hsd1.ca.comcast.net> From: Andrii Nakryiko Date: Thu, 21 Nov 2019 16:11:34 -0800 Message-ID: Subject: Re: [PATCH v5 bpf-next 11/15] libbpf: don't use cxx to test_libpf target To: Stanislav Fomichev Cc: Ivan Khoronzhuk , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , john fastabend , open list , Networking , bpf , clang-built-linux@googlegroups.com, ilias.apalodimas@linaro.org, sergei.shtylyov@cogentembedded.com, Andrii Nakryiko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 21, 2019 at 1:42 PM Stanislav Fomichev wrote: > > On 10/11, Ivan Khoronzhuk wrote: > > No need to use C++ for test_libbpf target when libbpf is on C and it > > can be tested with C, after this change the CXXFLAGS in makefiles can > > be avoided, at least in bpf samples, when sysroot is used, passing > > same C/LDFLAGS as for lib. > > > > Add "return 0" in test_libbpf to avoid warn, but also remove spaces at > > start of the lines to keep same style and avoid warns while apply. > Hey, just spotted this patch, not sure how it slipped through. > The c++ test was there to make sure libbpf can be included and > linked against c++ code (i.e. libbpf headers don't have some c++ > keywords/etc). > > Any particular reason you were not happy with it? Can we revert it > back to c++ and fix your use-case instead? Alternatively, we can just > remove this test if we don't really care about c++. > No one seemed to know why we have C++ pieces in pure C library and its Makefile, so we decide to "fix" this. :) But I do understand your concern. Would it be possible to instead do this as a proper selftests test? Do you mind taking a look at that? Thanks! (please trim irrelevant parts) [...]