Re: aarch64-arm64 fails to build kernel 12-current raspberry pi 3

From: Mark Millard <marklmi_at_yahoo.com>
Date: Thu, 12 Jul 2018 06:23:49 -0700
On 2018-Jul-12, at 2:44 AM, tech-lists <tech-lists at zyxst.net> wrote:

> On 11/07/2018 17:21, Mark Millard wrote:
>> It seems from the quoted material that neither kernel-toolchain nor
>> build world was done before buildkernel . My understanding is that
>> the intent is that one or the other be done first. (But for aarch64
>> currently only buildworld works.)
> 
> Thanks for this. I'm running a buildworld now.
> 
> For how long has it been the case that buildworld is needed for buildkernel? Coming from amd64 and before that, i386, in situations where I've only wanted to install a custom kernel, I was firstly used to making and installing it from /sys/{i386,amd64}/conf. Then that broke a number of years ago. Then got used to making kernel in /usr/src with make buildkernel && make installkernel. And now this is broken, on aarch64-arm64. Nobody knows if it's accidental or policy.

It has been true since clang added use of stdint.h to the kernel build.
Prior to this stdint.h was  not needed to build the kernel for any
architecture (as far as I know).

As I remember, in C99 or later stdint.h is one of the headers
required for a conforming freestanding implementation of C99+.

stdint.h was added to C in C99. It was intended to be the subset
of the older inttypes.h that was suitable for freestanding
environments. inttypes.h is defined to include stdint.h for
C99 and later as I remember (or to behave as-if it had?).

https://www.freebsd.org/cgi/man.cgi?build(7) is very explicit about what
is supposed to be the case relative to kernel-toolchain use:

     kernel-toolchain  Rebuild the tools needed	for kernel compilation.	 Use
		       this if you did not do a	buildworld first.

In other words: buildkernel is not intended to be self-contained/sufficient
according to the build documentation but buildworld should not be required.

Note the difference in the buildkernel and buildworld descriptions, given
the above:

     buildkernel       Rebuild the kernel and the kernel modules.  The object
		       directory can be	changed	from the default /usr/obj by
		       setting the MAKEOBJDIRPREFIX make(1) variable.

vs.

     buildworld	      Build everything but the kernel, configure files in etc,
		      and release.  The	object directory can be	changed	from
		      the default /usr/obj by setting the MAKEOBJDIRPREFIX
		      make(1) variable.	 The actual build location prefix used
		      is ${MAKEOBJDIRPREFIX}${.CURDIR} for native builds, and
		      ${MAKEOBJDIRPREFIX}/${TARGET}${.CURDIR} for cross	builds
		      and native builds	with variable CROSS_BUILD_TESTING set.


Currently, overall, FreeBSD does not meet its own criteria for aarch64 relative
to kernel-toolchain .

As far as I can tell the issue can be summarized relative to kernel-toolchain
by saying that kernel-toolchain does not currently establish a (full)
freestanding C99 environment relative to the headers but clang requires
(at least) one of the missing items ( stdint.h ) for aarch64.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Thu Jul 12 2018 - 11:34:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC