Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp656961ybg; Wed, 3 Jun 2020 10:06:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWXX4vsRfUnxjWGBTnBzIYKJDDPKfdzaXB3fs5uMGA1Kwpqpdx7ZFin7NsK/sicQCHoOCZ X-Received: by 2002:a17:906:b89a:: with SMTP id hb26mr255200ejb.137.1591203994981; Wed, 03 Jun 2020 10:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591203994; cv=none; d=google.com; s=arc-20160816; b=IP1CLhLfiI/7QAfwMz2Vvrz7tCAwKXhilEDUlODtj7pxI7WnvAr7DbMkgaKXksHevl nrkqgiA8qVpKytnqdVxNVctT9tv3WzioN4VoCRX+dDqoCh3vj7/RcLiCWh39x1SkCjrC yPHqyM+iK9zOyvI63I9fOUAPclnOFVHT/zI8KoqfjFLstaBXkMqkEUJZhdrWBD6tcbYt i9e7aiPpPnhl94Yf938ZrGtp/R7oHid5ZFZd96gZGEdVuGDMc5OQHnTMk4SftFiFbk9m dTuiJk/IfO3/bAV0Vm8QLX/1rS+EZjfQkk6ZFwrGBSPwhLHdbKlbd3byeUXdwn8pYn8U a1gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Hv8H3/oNKQ2RssBgp03DcUP7sdbkaYOk1dXVNtEfYZk=; b=SWw+fWpdbfJbwp7unZj7K+OH/YOPo0AKDhL1PYMOnUrcqFyRnF0jXZH4t/A8HOLNpi qiEyMJUMO2yzoi0ph72cOIX4WahfSi7p4LMTo+Fh60SyB61RB9YtX6NvBmEWKfVhNIgl bw/z4mtyy8HSsLX6+kOwTsEfQ8EnZFZzkH2zcUc5wGmPheZEd6N2pmn/uBP/OueZpFbd /BA1U0e6qv6do3/SgvHZzUl56clb8v+c1Ix5SEcuZXEABm/lcoPsB8aFeS6hfeAUGDjl sMifWcxwDcVPIOwPOXSEwyZYaz9ZuC/BvAZf3My0QE+zZVoTnQayJBTVX/2yvXjBWhFE 7UFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si73247edo.493.2020.06.03.10.06.11; Wed, 03 Jun 2020 10:06:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726023AbgFCREE (ORCPT + 99 others); Wed, 3 Jun 2020 13:04:04 -0400 Received: from brightrain.aerifal.cx ([216.12.86.13]:38448 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbgFCREE (ORCPT ); Wed, 3 Jun 2020 13:04:04 -0400 Date: Wed, 3 Jun 2020 13:03:57 -0400 From: Rich Felker To: Rob Landley Cc: "linux-kernel@vger.kernel.org" , David Woodhouse , arnd@arndb.de, yamada.masahiro@socionext.com Subject: Re: headers_install builds break on a lot of targets? Message-ID: <20200603170357.GG1079@brightrain.aerifal.cx> References: <4627b565-0a5c-080e-726a-01b773c985e8@landley.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4627b565-0a5c-080e-726a-01b773c985e8@landley.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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