Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp633722imm; Fri, 8 Jun 2018 02:42:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJU6J6YiIcUNiyKKJksFpok0nE/BefgwKu3cfa3cQFNQGWn5NrNUnYVLelOVIG5VmOu8Dxh X-Received: by 2002:a62:4653:: with SMTP id t80-v6mr5223526pfa.58.1528450937660; Fri, 08 Jun 2018 02:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528450937; cv=none; d=google.com; s=arc-20160816; b=al6+69SWp8kIYvTBfZsNuGx65uhsEZWdnJoKLBTEt+B1OLndNfblAwqOWm9JaVcNQu AOxc4RbJ7AIOGRF7JZGuzjqczDWz4n2RqiWX500EZiGkUTjoiwarGhdlWKuOljtnoZ5D MuOidajAR5uGOCma29mtGJZxnuhnpc2pDTfpw3nRjKvWRqw7/Y49m71TWAcipPMKgL0B IzJdZ6ionoetULPPKaRAYrdNNxiVTiFuCcZKVu4naoP98c6BFwhodf7EcYNVqXytlCcn oFPM2Mp8rC070hdgRX9Zohdl2qqvIxw4W3A/1RJ6OQ7GW/fcirdS8jn1/zNqvKQuSMMs jpbw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=nsL6jM9rnzz3CN/qLMtM2b3bzQjC8AniyX1qowaSuHc=; b=w+YZzpD8WYvyNXjDLmoD+ZzfaQO7Z/sTh4rKF9qEc3BwwoVpCz2CmiHgSWSI9AJjAU GclvTI0IZkGEVnYjVTYr2VWObjSRuYXAiP4TUTeMqrazLLg18PY3vmSC6CcO+zxpwrA0 AREMqhGcoPBopXo42veEXncK5RMq4meT18nQf8a4SrvkLWvLR2KVoCujqxmHnuByhwL8 V8mdzXfhnjymFr8EO2UFLDurZs+a5ctPUyC/m8IXrs98H8nucvK8qWzewH/vPblldYTf r4LlZlnAbnm8edr4+z9UveyrfAVZtyDXzXYbhcEfB4bnbvqSUfW1wTSwUMdk9nnk6gs5 k6ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MFyZAG+f; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o14-v6si43937018pgc.664.2018.06.08.02.42.03; Fri, 08 Jun 2018 02:42:17 -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=fail header.i=@gmail.com header.s=20161025 header.b=MFyZAG+f; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752724AbeFHJk6 (ORCPT + 99 others); Fri, 8 Jun 2018 05:40:58 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:44654 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751523AbeFHJk4 (ORCPT ); Fri, 8 Jun 2018 05:40:56 -0400 Received: by mail-ua0-f196.google.com with SMTP id f30-v6so8465293uab.11; Fri, 08 Jun 2018 02:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=nsL6jM9rnzz3CN/qLMtM2b3bzQjC8AniyX1qowaSuHc=; b=MFyZAG+fkr4311+vEotQNFx9PhOMncA9DFz1q4ZFYoWjvQrgIdScWb2rXvS0+feIdA 4chMbk3ygUb0hkhz3g0Dl94G3MWYxN4MTvJBgsm+BZpKFg70IdVZeYHMNYWHBD3ZdVFD c958U2xjrfZA6PZRjGJTkeiSn27AFnzi4ucuilOW2NqRV55f8ayzQPi2ZtXXAjmS5zSV mSfFCTrIKMQZ4TxB+tjtzPZoHZvjQr9IS9Kn4p+69ZDQDY2VTmEGQ1yaIO2vjW9qVyX/ xFMSdsLt+90mnUFcmERfq+91AhW2ccFIuB049ukPqdqBEguw/DdQPcbZ5aJ8Zrtsd+Ht y9ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=nsL6jM9rnzz3CN/qLMtM2b3bzQjC8AniyX1qowaSuHc=; b=pMuLK/PiJVfZglFGj4XiJ8FmmWllHu0l4Qt8gmNBU9RAp/qa0vdcl+8NhlNWuVvCxP cqF5kU7YtWTfzDdMyBtY5Fkwq9yAaRC4POi/pS44dYsjPxOfBnFrrNS7l80sLSxaJKqB aBsR2S19w4ve2GOgqYW0U+9UF3nk/IyBgXG4MIXyWUg41b3koQSOkIv30103cukwp5MZ MXxmxE8rJikeR2Lt2gy8k3u++jRBnZaIjcWD2oKXKuYtYPF2yn32IDNHlR/VxcLwQb/s jNrc0Yc4yUA61MOXssGMHxNa7TOKg8e2iWERBYaCy6mu4OwrYsnMrEHPWCiq0sCjOQOY eZlg== X-Gm-Message-State: APt69E1Ti/wwHVdmO6vtda1Yla6RxurHhg7hWe5AFGAXJQa8YGi+3Bwf qtKcABeO/orbBgB53OuWcXpp97eXVoWCtuwThmw= X-Received: by 2002:ab0:1446:: with SMTP id c6-v6mr3658820uae.12.1528450855006; Fri, 08 Jun 2018 02:40:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:8596:0:0:0:0:0 with HTTP; Fri, 8 Jun 2018 02:40:54 -0700 (PDT) In-Reply-To: <8c0f8cc4-b919-9b69-4144-fd216253aa24@iogearbox.net> References: <20180528153222.2037158-1-arnd@arndb.de> <8c0f8cc4-b919-9b69-4144-fd216253aa24@iogearbox.net> From: Geert Uytterhoeven Date: Fri, 8 Jun 2018 11:40:54 +0200 X-Google-Sender-Auth: dK16CqOEA1Fc4-ostBUn9mrYwwM Message-ID: Subject: Re: [PATCH] [net-next, wrong] make BPFILTER_UMH depend on X86 To: Daniel Borkmann Cc: Arnd Bergmann , Alexei Starovoitov , "David S. Miller" , Masahiro Yamada , linux-kbuild , netdev , Linux Kernel Mailing List 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 Hi Daniel, On Fri, Jun 8, 2018 at 11:33 AM, Daniel Borkmann wrote: > On 06/08/2018 10:57 AM, Geert Uytterhoeven wrote: >> On Mon, May 28, 2018 at 5:31 PM, Arnd Bergmann wrote: >>> When build testing across architectures, I run into a build error on >>> all targets other than X86: >>> >>> gcc-8.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objdump: net/bpfilter/bpfilter_umh: File format not recognized >>> gcc-8.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy:net/bpfilter/bpfilter_umh.o: Invalid bfd target >>> >>> The problem is that 'hostprogs' get built with 'gcc' rather than >>> '$(CROSS_COMPILE)gcc', and my default gcc (as most people's) targets x86. >>> >>> To work around it, adding an X86 dependency gets randconfigs building >>> again on my box. >>> >>> Clearly, this is not a good solution, since it should actually work fine >>> when building native kernels on other architectures but that is now >>> disabled, while cross building an x86 kernel on another host is still >>> broken after my patch. >>> >>> What we probably want here is to try out if the compiler is able to build >>> executables for the target architecture and not build the helper otherwise, >>> at least when compile-testing. No idea how to do that though. >> >> So that was done in commit 819dd92b9c0bc7bc ("bpfilter: switch to CC >> from HOSTCC"), but it is not sufficient: >> >> GEN net/bpfilter/bpfilter_umh.o >> Usage: m68k-linux-gnu-objcopy [option(s)] in-file [out-file] >> Copies a binary file, possibly transforming it in the process >> The options are: >> [...] >> >> net/bpfilter/Makefile:29: recipe for target 'net/bpfilter/bpfilter_umh.o' failed >> make[5]: *** [net/bpfilter/bpfilter_umh.o] Error 1 >> >>> --- a/net/bpfilter/Kconfig >>> +++ b/net/bpfilter/Kconfig >>> @@ -9,6 +9,7 @@ menuconfig BPFILTER >>> if BPFILTER >>> config BPFILTER_UMH >>> tristate "bpfilter kernel module with user mode helper" >>> + depends on X86 # actually depends on native builds >> >> No, (currently) it does depend on X86, due to its use of: >> >> $(OBJCOPY) -I binary -O $(CONFIG_OUTPUT_FORMAT) >> >> with CONFIG_OUTPUT_FORMAT being defined on X86 only... > > That hard dependency should have been fixed with the following patch in -net tree: > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=8d97ca6b6755bf7ef57d323642ca9ee80d689782 Thanks, confirmed. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds