linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rich Felker <dalias@libc.org>
To: Rob Landley <rob@landley.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	arnd@arndb.de, yamada.masahiro@socionext.com
Subject: Re: headers_install builds break on a lot of targets?
Date: Wed, 3 Jun 2020 13:03:57 -0400	[thread overview]
Message-ID: <20200603170357.GG1079@brightrain.aerifal.cx> (raw)
In-Reply-To: <4627b565-0a5c-080e-726a-01b773c985e8@landley.net>

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



  parent reply	other threads:[~2020-06-03 17:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-06-03 17:59   ` Arnd Bergmann
2020-06-04  1:07     ` Masahiro Yamada

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20200603170357.GG1079@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=arnd@arndb.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob@landley.net \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).