From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80C11C63777 for ; Thu, 19 Nov 2020 21:14:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1ADA522254 for ; Thu, 19 Nov 2020 21:14:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mswBFci1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbgKSVOO (ORCPT ); Thu, 19 Nov 2020 16:14:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbgKSVOO (ORCPT ); Thu, 19 Nov 2020 16:14:14 -0500 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01E89C0617A7 for ; Thu, 19 Nov 2020 13:14:14 -0800 (PST) Received: by mail-pl1-x641.google.com with SMTP id k7so3670976plk.3 for ; Thu, 19 Nov 2020 13:14:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tZGj0oIna+UduCQLR0+PjVPjVl9hL9hj6VDeUHmIQpA=; b=mswBFci17dGbCtf84CRFOcgst+BzEvYcSvutJupIJsxPzrnAaZM58FBbcME4BQOd3I WX4GKvP31SkrTbEIk+/yGrSQLDEdsRJnR9Kdauz2KbGlpOT4MRbqxZsGeRFblBKz83vU IkuFiuB97Xx4I6/2zcoZU1431r2zCJeJsfXcsZZhi0T8RyYO4ydPGiECVbpNlk8i2OQx yCdMfrMhX0GWQSfEO7IEK8vN5UivuFmllua/U5sUbGXMMya+3naXZ5kCxelw1ZnNqtGC O+GagxXO6Uur8HF5Y6oi+1cp00ppga2qZaOizSy8dYbqs/Cax63LxvD6kyZv/ACf51R2 grLg== 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=tZGj0oIna+UduCQLR0+PjVPjVl9hL9hj6VDeUHmIQpA=; b=ixNthrm0WmmTOxcXAdQjG56oEe1/ISQx0ud1HOdh/teAHjyG9CDfl4pualbG9Jqtv+ VZ2kkEmd174rL3pwFj1q5bOvrbAIEtAZU2nmPY6c8VGiJEuQiQ4sAmVV8s7PIBkC7JgQ 2E59RUwQ3z4a/y+P8DOkkpYN75z6IEVCc/9h6//Pykxu+8D3ZYYMZ7bOrUNd1k/D3a6w ZhWloWnQdK/fmSpBDsXy0MzJ5Lpf+Oy1QH5OwMtQC6uFVwPFuMurxXUBiJYYlvX7/sfv s0hR9YoCY3XJrKmo7pjlUF72utoao1NojAgZYkVD8U09l+UYpTldIaB2gII0qdMm0vjx Ni4g== X-Gm-Message-State: AOAM530+RbEe5gmmQ7IIZw9FLqQNacUOfOH79ipPG9s++ZOETPZswktY QxKNJcRueh52uFmxvTB8UAeudqbwHsHU6/rVCJG0Pw== X-Google-Smtp-Source: ABdhPJzLoefWxNuolViSU2dd6TqJGgosXjrWgwaTjJFj+EN5lBIGqVWU4UsWIXZu0IVhHR3wbrC9hahuKnGZLmqWIPY= X-Received: by 2002:a17:902:b28a:b029:d5:f36b:44af with SMTP id u10-20020a170902b28ab02900d5f36b44afmr9918635plr.51.1605820453161; Thu, 19 Nov 2020 13:14:13 -0800 (PST) MIME-Version: 1.0 References: <20201119085022.3606135-1-davidgow@google.com> In-Reply-To: <20201119085022.3606135-1-davidgow@google.com> From: Brendan Higgins Date: Thu, 19 Nov 2020 13:14:02 -0800 Message-ID: Subject: Re: [RFC PATCH] bpf: preload: Fix build error when O= is set To: David Gow Cc: Alexei Starovoitov , Daniel Borkmann , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , netdev@vger.kernel.org, bpf@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2020 at 12:50 AM David Gow wrote: > > If BPF_PRELOAD is enabled, and an out-of-tree build is requested with > make O=, compilation seems to fail with: > > tools/scripts/Makefile.include:4: *** O=.kunit does not exist. Stop. > make[4]: *** [../kernel/bpf/preload/Makefile:8: kernel/bpf/preload/libbpf.a] Error 2 > make[3]: *** [../scripts/Makefile.build:500: kernel/bpf/preload] Error 2 > make[2]: *** [../scripts/Makefile.build:500: kernel/bpf] Error 2 > make[2]: *** Waiting for unfinished jobs.... > make[1]: *** [.../Makefile:1799: kernel] Error 2 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:185: __sub-make] Error 2 > > By the looks of things, this is because the (relative path) O= passed on > the command line is being passed to the libbpf Makefile, which then > can't find the directory. Given OUTPUT= is being passed anyway, we can > work around this by explicitly setting an empty O=, which will be > ignored in favour of OUTPUT= in tools/scripts/Makefile.include. > > Signed-off-by: David Gow Seems sensible to me. I have no strong feeling as to whether we just turn this off on UML or whether we do the fix you proposed here though. Nevertheless, I would like to see *some* fix go in before v5.10 is released. Reviewed-by: Brendan Higgins