LKML Archive on
help / color / mirror / Atom feed
From: Geert Uytterhoeven <>
To: Arnd Bergmann <>, Alexei Starovoitov <>
Cc: "David S. Miller" <>,
	Masahiro Yamada <>,
	linux-kbuild <>,
	netdev <>,
	Linux Kernel Mailing List <>
Subject: Re: [PATCH] [net-next, wrong] make BPFILTER_UMH depend on X86
Date: Fri, 8 Jun 2018 10:57:07 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hi Arnd, Alexei,

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
>  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:


with CONFIG_OUTPUT_FORMAT being defined on X86 only...

>         default m
>         help
>           This builds bpfilter kernel module with embedded user mode helper



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

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

  parent reply	other threads:[~2018-06-08  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28 15:31 Arnd Bergmann
2018-05-30 15:17 ` Alexei Starovoitov
2018-05-31  1:42   ` Masahiro Yamada
2018-06-01 15:20     ` Arnd Bergmann
2018-06-04 23:51       ` Alexei Starovoitov
2018-06-08  8:57 ` Geert Uytterhoeven [this message]
2018-06-08  9:33   ` Daniel Borkmann
2018-06-08  9:40     ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] [net-next, wrong] make BPFILTER_UMH depend on X86' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).