linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* headers_install builds break on a lot of targets?
@ 2020-06-03 13:49 Rob Landley
  2020-06-03 14:05 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rob Landley @ 2020-06-03 13:49 UTC (permalink / raw)
  To: linux-kernel, David Woodhouse, arnd, yamada.masahiro, Rich Felker

The headers_install_all target got removed last year (commit f3c8d4c7a728 and
would someone like to update Documentation/kbuild/headers_install.txt which
still describes it?)

The musl-libc maintainer is using a forked hand-hacked kernel header package in
his toolchain build project (https://github.com/richfelker/musl-cross-make), and
he said the reason for it is:

  http://lists.landley.net/pipermail/toybox-landley.net/2020-March/011536.html

  Because downloading 100 MB of kernel source and extracting it to a far
  larger tree just to get the headers isn't really fun.

And I thought "that's why headers_install_all existed", and noticed the target
being removed, so I tried my hand at a small shell script vesion:

  for i in $(echo arch/*/ | sed 's@arch/\([^/]*\)/@\1@g')
  do
    echo $i
    X="$PWD/fruitbasket/$i"
    mkdir -p "$X"
    make ARCH=$i distclean defconfig headers_install \
      INSTALL_HDR_PATH="$PWD/fruitbasket/$i" > /dev/null
  done

On the bright side, the resulting fruitbasket.tar.xz is 1.5 megabytes. The
downside is I have no idea how broken the resulting header files are after this
error-fest:

alpha
arc
gcc: error: unrecognized command line option ‘-mmedium-calls’
gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean
‘-fno-stats’?
gcc: error: unrecognized command line option ‘-mmedium-calls’
gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean
‘-fno-stats’?
arm
arm64
c6x
csky
h8300
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mint32’; did you mean ‘-fintfc’?
hexagon
gcc: error: unrecognized command line option ‘-G0’
gcc: error: unrecognized command line option ‘-G0’
gcc: error: unrecognized command line option ‘-G0’
ia64
./arch/ia64/scripts/check-segrel.S: Assembler messages:
./arch/ia64/scripts/check-segrel.S:2: Error: unknown pseudo-op: `.rodata'
./arch/ia64/scripts/check-segrel.S:3: Error: no such instruction: `data4
@segrel(start)'
objdump: '/tmp/out17279': No such file
objdump: section '.rodata' mentioned in a -j option, but not found in any input file
./arch/ia64/scripts/toolchain-flags: 20: [: !=: unexpected operator
./arch/ia64/scripts/check-text-align.S: Assembler messages:
./arch/ia64/scripts/check-text-align.S:2: Error: unknown pseudo-op: `.proc'
./arch/ia64/scripts/check-text-align.S:3: Error: unknown pseudo-op: `.prologue'
./arch/ia64/scripts/check-text-align.S:4: Error: unknown pseudo-op: `.save'
./arch/ia64/scripts/check-text-align.S:7: Error: unknown pseudo-op: `.endp'
readelf: Error: '/tmp/out17279': No such file
./arch/ia64/scripts/check-gas-asm.S: Assembler messages:
./arch/ia64/scripts/check-gas-asm.S:1: Error: junk at end of line, first
unrecognized character is `['
./arch/ia64/scripts/check-gas-asm.S:2: Error: unknown pseudo-op: `.xdata4'
objdump: '/tmp/out17306.o': No such file
objdump: section '.data' mentioned in a -j option, but not found in any input file
./arch/ia64/scripts/check-gas: 11: [: !=: unexpected operator
./arch/ia64/scripts/check-segrel.S: Assembler messages:
./arch/ia64/scripts/check-segrel.S:2: Error: unknown pseudo-op: `.rodata'
./arch/ia64/scripts/check-segrel.S:3: Error: no such instruction: `data4
@segrel(start)'
objdump: '/tmp/out19677': No such file
objdump: section '.rodata' mentioned in a -j option, but not found in any input file
./arch/ia64/scripts/toolchain-flags: 20: [: !=: unexpected operator
./arch/ia64/scripts/check-text-align.S: Assembler messages:
./arch/ia64/scripts/check-text-align.S:2: Error: unknown pseudo-op: `.proc'
./arch/ia64/scripts/check-text-align.S:3: Error: unknown pseudo-op: `.prologue'
./arch/ia64/scripts/check-text-align.S:4: Error: unknown pseudo-op: `.save'
./arch/ia64/scripts/check-text-align.S:7: Error: unknown pseudo-op: `.endp'
readelf: Error: '/tmp/out19677': No such file
./arch/ia64/scripts/check-gas-asm.S: Assembler messages:
./arch/ia64/scripts/check-gas-asm.S:1: Error: junk at end of line, first
unrecognized character is `['
./arch/ia64/scripts/check-gas-asm.S:2: Error: unknown pseudo-op: `.xdata4'
objdump: '/tmp/out19705.o': No such file
objdump: section '.data' mentioned in a -j option, but not found in any input file
./arch/ia64/scripts/check-gas: 11: [: !=: unexpected operator
./arch/ia64/scripts/check-segrel.S: Assembler messages:
./arch/ia64/scripts/check-segrel.S:2: Error: unknown pseudo-op: `.rodata'
./arch/ia64/scripts/check-segrel.S:3: Error: no such instruction: `data4
@segrel(start)'
objdump: '/tmp/out19983': No such file
objdump: section '.rodata' mentioned in a -j option, but not found in any input file
./arch/ia64/scripts/toolchain-flags: 20: [: !=: unexpected operator
./arch/ia64/scripts/check-text-align.S: Assembler messages:
./arch/ia64/scripts/check-text-align.S:2: Error: unknown pseudo-op: `.proc'
./arch/ia64/scripts/check-text-align.S:3: Error: unknown pseudo-op: `.prologue'
./arch/ia64/scripts/check-text-align.S:4: Error: unknown pseudo-op: `.save'
./arch/ia64/scripts/check-text-align.S:7: Error: unknown pseudo-op: `.endp'
readelf: Error: '/tmp/out19983': No such file
./arch/ia64/scripts/check-gas-asm.S: Assembler messages:
./arch/ia64/scripts/check-gas-asm.S:1: Error: junk at end of line, first
unrecognized character is `['
./arch/ia64/scripts/check-gas-asm.S:2: Error: unknown pseudo-op: `.xdata4'
objdump: '/tmp/out20014.o': No such file
objdump: section '.data' mentioned in a -j option, but not found in any input file
./arch/ia64/scripts/check-gas: 11: [: !=: unexpected operator
m68k
microblaze
mips
nds32
nios2
openrisc
parisc
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: unrecognized command line option ‘-mno-space-regs’; did you mean
‘-fno-make-deps’?
gcc: error: unrecognized command line option ‘-mfast-indirect-calls’; did you
mean ‘-fno-indirect-classes’?
gcc: error: unrecognized command line option ‘-mdisable-fpregs’; did you mean
‘-fdisable-’?
powerpc
riscv
s390
sh
sparc
um
gcc: error: missing argument to ‘-Wframe-larger-than=’
Makefile:1230: *** Headers not exportable for the um architecture.  Stop.
make: *** [__build_one_by_one] Error 2
unicore32
gcc: error: missing argument to ‘-Wframe-larger-than=’
gcc: error: missing argument to ‘-Wframe-larger-than=’
x86
xtensa
gcc: error: unrecognized command line option ‘-mlongcalls’
gcc: error: unrecognized command line option ‘-mtext-section-literals’; did you
mean ‘-fext-numeric-literals’?
gcc: error: unrecognized command line option ‘-mlongcalls’
gcc: error: unrecognized command line option ‘-mtext-section-literals’; did you
mean ‘-fext-numeric-literals’?
gcc: error: unrecognized command line option ‘-mlongcalls’
gcc: error: unrecognized command line option ‘-mtext-section-literals’; did you
mean ‘-fext-numeric-literals’?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: headers_install builds break on a lot of targets?
  2020-06-03 13:49 headers_install builds break on a lot of targets? Rob Landley
@ 2020-06-03 14:05 ` Arnd Bergmann
  2020-06-03 16:23   ` David Woodhouse
  2020-06-03 14:14 ` Richard Weinberger
  2020-06-03 17:03 ` Rich Felker
  2 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2020-06-03 14:05 UTC (permalink / raw)
  To: Rob Landley; +Cc: linux-kernel, David Woodhouse, Masahiro Yamada, Rich Felker

On Wed, Jun 3, 2020 at 3:49 PM Rob Landley <rob@landley.net> wrote:
>
> The headers_install_all target got removed last year (commit f3c8d4c7a728 and
> would someone like to update Documentation/kbuild/headers_install.txt which
> still describes it?)
>
> The musl-libc maintainer is using a forked hand-hacked kernel header package in
> his toolchain build project (https://github.com/richfelker/musl-cross-make), and
> he said the reason for it is:
>
>   http://lists.landley.net/pipermail/toybox-landley.net/2020-March/011536.html
>
>   Because downloading 100 MB of kernel source and extracting it to a far
>   larger tree just to get the headers isn't really fun.
>
> And I thought "that's why headers_install_all existed", and noticed the target
> being removed, so I tried my hand at a small shell script vesion:
>
>   for i in $(echo arch/*/ | sed 's@arch/\([^/]*\)/@\1@g')
>   do
>     echo $i
>     X="$PWD/fruitbasket/$i"
>     mkdir -p "$X"
>     make ARCH=$i distclean defconfig headers_install \
>       INSTALL_HDR_PATH="$PWD/fruitbasket/$i" > /dev/null
>   done
>
> On the bright side, the resulting fruitbasket.tar.xz is 1.5 megabytes. The
> downside is I have no idea how broken the resulting header files are after this
> error-fest:

I think the problem is that you can no longer run 'make defconfig ARCH=foo'
without passing  a CROSS_COMPILE=${ARCH}-linux-gnu- argument pointing
to a valid toolchain target triple.

You can use the cross-compilers from
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/
to do this if you need kernel headers for an architecture that you have no
cross-compilers for, but they are build against glibc and won't run on
a musl based host, or anything other than x86-64, arm64 or ppc64le
that I built for.

I don't know if you can just run 'make headers_install' without configuring
first, or if that is something that can be easily changed if it doesn't already
work.

       Arnd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: headers_install builds break on a lot of targets?
  2020-06-03 13:49 headers_install builds break on a lot of targets? Rob Landley
  2020-06-03 14:05 ` Arnd Bergmann
@ 2020-06-03 14:14 ` Richard Weinberger
  2020-06-03 17:03 ` Rich Felker
  2 siblings, 0 replies; 7+ messages in thread
From: Richard Weinberger @ 2020-06-03 14:14 UTC (permalink / raw)
  To: Rob Landley
  Cc: linux-kernel, David Woodhouse, Arnd Bergmann, Masahiro Yamada,
	Rich Felker

On Wed, Jun 3, 2020 at 3:51 PM Rob Landley <rob@landley.net> wrote:
> um
> gcc: error: missing argument to ‘-Wframe-larger-than=’
> Makefile:1230: *** Headers not exportable for the um architecture.  Stop.
> make: *** [__build_one_by_one] Error 2

Exporting headers of UML makes not much sense.

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: headers_install builds break on a lot of targets?
  2020-06-03 14:05 ` Arnd Bergmann
@ 2020-06-03 16:23   ` David Woodhouse
  0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2020-06-03 16:23 UTC (permalink / raw)
  To: Arnd Bergmann, Rob Landley; +Cc: linux-kernel, Masahiro Yamada, Rich Felker

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

On Wed, 2020-06-03 at 16:05 +0200, Arnd Bergmann wrote:
> I don't know if you can just run 'make headers_install' without configuring
> first, or if that is something that can be easily changed if it doesn't already
> work.

It would be kind of wrong for the exported ABI headers to depend on
today's build configuration of the kernel, surely?


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: headers_install builds break on a lot of targets?
  2020-06-03 13:49 headers_install builds break on a lot of targets? Rob Landley
  2020-06-03 14:05 ` Arnd Bergmann
  2020-06-03 14:14 ` Richard Weinberger
@ 2020-06-03 17:03 ` Rich Felker
  2020-06-03 17:59   ` Arnd Bergmann
  2 siblings, 1 reply; 7+ messages in thread
From: Rich Felker @ 2020-06-03 17:03 UTC (permalink / raw)
  To: Rob Landley; +Cc: linux-kernel, David Woodhouse, arnd, yamada.masahiro

On Wed, Jun 03, 2020 at 08:49:54AM -0500, Rob Landley wrote:
> The headers_install_all target got removed last year (commit f3c8d4c7a728 and
> would someone like to update Documentation/kbuild/headers_install.txt which
> still describes it?)
> 
> The musl-libc maintainer is using a forked hand-hacked kernel header package in
> his toolchain build project (https://github.com/richfelker/musl-cross-make), and
> he said the reason for it is:

These are provided by sabotage-linux, and are not entirely hand-hacked
but have a documented and at least partly scripted process by which
they're built:

https://github.com/sabotage-linux/kernel-headers

There's no obligation to use them, but using them makes things easier.

Note that, at the time the default was switched, there were no
upstream kernel headers compatible with a time64 userspace yet, so
whichever source you wanted to use required patching anyway.

As of 5.6 I believe everything is upstream and we could add stock 5.6
(or later) headers as a supported choice.

>   http://lists.landley.net/pipermail/toybox-landley.net/2020-March/011536.html
> 
>   Because downloading 100 MB of kernel source and extracting it to a far
>   larger tree just to get the headers isn't really fun.
> 
> And I thought "that's why headers_install_all existed", and noticed the target
> being removed, so I tried my hand at a small shell script vesion:
> 
>   for i in $(echo arch/*/ | sed 's@arch/\([^/]*\)/@\1@g')
>   do
>     echo $i
>     X="$PWD/fruitbasket/$i"
>     mkdir -p "$X"
>     make ARCH=$i distclean defconfig headers_install \
>       INSTALL_HDR_PATH="$PWD/fruitbasket/$i" > /dev/null
>   done
> 
> On the bright side, the resulting fruitbasket.tar.xz is 1.5 megabytes. The
> downside is I have no idea how broken the resulting header files are after this
> error-fest:
> 
> alpha
> arc
> gcc: error: unrecognized command line option ‘-mmedium-calls’
> gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean
> ‘-fno-stats’?
> gcc: error: unrecognized command line option ‘-mmedium-calls’
> gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean
> ‘-fno-stats’?
> [...]

Uhg. Surely there should be some fix for whatever mistaken dep is
behind this? Headers shouldn't actually depend on any config/compiler
output, should they?? Or is that machinery somehow involved in
generating the syscall lists and similar?

Rich



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: headers_install builds break on a lot of targets?
  2020-06-03 17:03 ` Rich Felker
@ 2020-06-03 17:59   ` Arnd Bergmann
  2020-06-04  1:07     ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2020-06-03 17:59 UTC (permalink / raw)
  To: Rich Felker; +Cc: Rob Landley, linux-kernel, David Woodhouse, Masahiro Yamada

On Wed, Jun 3, 2020 at 7:04 PM Rich Felker <dalias@libc.org> wrote:
> On Wed, Jun 03, 2020 at 08:49:54AM -0500, Rob Landley wrote:
> >     make ARCH=$i distclean defconfig headers_install \
> >
> > On the bright side, the resulting fruitbasket.tar.xz is 1.5 megabytes. The
> > downside is I have no idea how broken the resulting header files are after this
> > error-fest:
> >
> > alpha
> > arc
> > gcc: error: unrecognized command line option ‘-mmedium-calls’
> > gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean
> > ‘-fno-stats’?
> > gcc: error: unrecognized command line option ‘-mmedium-calls’
> > gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean
> > ‘-fno-stats’?
> > [...]
>
> Uhg. Surely there should be some fix for whatever mistaken dep is
> behind this? Headers shouldn't actually depend on any config/compiler
> output, should they??

The first one of the two comes from "make defconfig", which definitely needs
a working $TARGET compiler, but isn't actually needed before
"make headers_install" as I just checked.

> Or is that machinery somehow involved in
> generating the syscall lists and similar?

The syscall list for ARC is still not generated (that's on my todo list), but
something does call it even for "make headers_install".

What it does is to set Makefile variables such as

CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1)
and trying out all kinds of gcc options that may or may not be supported
such as  "$(call cc-option,-fno-tree-loop-im)".

Setting CC=: avoids this, like

make -s CC=: ARCH=$i headers_install  INSTALL_HDR_PATH="$PWD/fruitbasket/$i"

      Arnd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: headers_install builds break on a lot of targets?
  2020-06-03 17:59   ` Arnd Bergmann
@ 2020-06-04  1:07     ` Masahiro Yamada
  0 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2020-06-04  1:07 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Rich Felker, Rob Landley, linux-kernel, David Woodhouse

On Thu, Jun 4, 2020 at 2:59 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, Jun 3, 2020 at 7:04 PM Rich Felker <dalias@libc.org> wrote:
> > On Wed, Jun 03, 2020 at 08:49:54AM -0500, Rob Landley wrote:
> > >     make ARCH=$i distclean defconfig headers_install \
> > >
> > > On the bright side, the resulting fruitbasket.tar.xz is 1.5 megabytes. The
> > > downside is I have no idea how broken the resulting header files are after this
> > > error-fest:
> > >
> > > alpha
> > > arc
> > > gcc: error: unrecognized command line option ‘-mmedium-calls’
> > > gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean
> > > ‘-fno-stats’?
> > > gcc: error: unrecognized command line option ‘-mmedium-calls’
> > > gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean
> > > ‘-fno-stats’?
> > > [...]
> >
> > Uhg. Surely there should be some fix for whatever mistaken dep is
> > behind this? Headers shouldn't actually depend on any config/compiler
> > output, should they??
>
> The first one of the two comes from "make defconfig", which definitely needs
> a working $TARGET compiler, but isn't actually needed before
> "make headers_install" as I just checked.
>
> > Or is that machinery somehow involved in
> > generating the syscall lists and similar?
>
> The syscall list for ARC is still not generated (that's on my todo list), but
> something does call it even for "make headers_install".
>
> What it does is to set Makefile variables such as
>
> CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1)
> and trying out all kinds of gcc options that may or may not be supported
> such as  "$(call cc-option,-fno-tree-loop-im)".
>
> Setting CC=: avoids this, like
>
> make -s CC=: ARCH=$i headers_install  INSTALL_HDR_PATH="$PWD/fruitbasket/$i"
>
>       Arnd



You can do headers_install without the .config file.
'make defconfig' is unneeded.

headers_install should be independent of $(CC) too.


linux-next has some progress about this.

You can get clean headers_install without CROSS_COMPILE
for parisc, h8300, hexagon.


You still get warnings for ia64 and arc.
Our goal is to not require $(CC) for non-dot-config target
like 'make headers_install', 'make help', etc.


--
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-04  1:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 13:49 headers_install builds break on a lot of targets? Rob Landley
2020-06-03 14:05 ` Arnd Bergmann
2020-06-03 16:23   ` David Woodhouse
2020-06-03 14:14 ` Richard Weinberger
2020-06-03 17:03 ` Rich Felker
2020-06-03 17:59   ` Arnd Bergmann
2020-06-04  1:07     ` Masahiro Yamada

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).