From owner-freebsd-toolchain@freebsd.org Thu Jul 12 13:34:07 2018 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82C9D1039D73 for ; Thu, 12 Jul 2018 13:34:07 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-21.consmr.mail.gq1.yahoo.com (sonic301-21.consmr.mail.gq1.yahoo.com [98.137.64.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 075F3917BD for ; Thu, 12 Jul 2018 13:34:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: OEY7IvoVM1le6b8GP7GhYjAG4CyYHT3qP1VlNmQ3sxV8jd3Ezvfrj7rHc0guaFk pLHrvaOTp.YOJ8ohWiphXmu0Hr.4bNMRJ6k8aAC1JYdNtiBAsspnuBkxDv4IzrZso.d9NVXhUJLe G15UtsLMRBfn6bWmGMaOfHguahm0KKKHc2PSLSYSU9ku9nXR92cBWhv2hrA3WL_CR4X22PIjIQUz KUOBlA2rGiYqDkHeMOHm.b3IUa42oDH3H2xQSyQ5WxfzW7IQjOPiy0FpxYmsJ6tQFadllm8nVHlo edC6Oa95qGHwLirSwXEaWkHUQCHgTqbaaU0DFRgUWiWdjsD9bq86Ajzj22.0J2YG0gObRdAFTWPT RLTeXwO.SMttMBpCU918G0pQGGDofqOcete.G0yTlijtbKKZqYnUaqiI3j4gkiNnOUF4IxHaIxYt yq3_b5dffO2bSakQSUJAz10kT9GkTrP_vJaM9jimb5R7AcKaHFB5jWoNfj53Zv58q_RAfZNVkLhZ esBBnG0XU0OcX7FXbqybiwoOU1VOzfYxiqI7uuA2Fuuw6SGrN5DY5HXaAEld3U9xaCSpsy_SGr5g qQGV2eeKXTfwtsLITZ3mUMvyHIbOlnc0cWriwkZgPB38L02zx.xImrPYPXrLCaO.9bSgd9e8qY8K s2xzGkZxIiRnjuhuXAMhCHX2bokDkNl75R4fL1qOAeq1F66hDlGMkQ.B9os3N5w.zipnaaIxKLGN IvO9ZmSfgclVmhuuPAlGcSi7TBRa0fOLGGaeCEVl6yia4dOwXubr3S5.FdaPZs1hdoF007yoTMk5 psY6qtTFy6Fys7XbElqT9gKcinjibJ6LHP9rLKuUsynmlRHgdcOv7OfSddJMc9oocYqo4zQHnSCH hgniFp.bCIWPwPm7G_qTG.25M_UIraMHAmeL89CD01sjuaJTpdMxbaM74QogvvWudQUu3RkAGuHu afA0gItpgfkW9NGotujA9S9WHwox_zlvEqRQu3x.dyE._VGf3WtRTW7xnszN33NrMhTdi Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Thu, 12 Jul 2018 13:34:00 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp422.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID a5dfb848dc8c05f45d2906755df2006c; Thu, 12 Jul 2018 13:23:51 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: aarch64-arm64 fails to build kernel 12-current raspberry pi 3 From: Mark Millard In-Reply-To: Date: Thu, 12 Jul 2018 06:23:49 -0700 Cc: FreeBSD Current , freebsd-arm , FreeBSD Toolchain Content-Transfer-Encoding: quoted-printable Message-Id: <2F72F7DB-F5DD-471A-B644-9CDE3FABFAC1@yahoo.com> References: To: tech-lists X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2018 13:34:07 -0000 On 2018-Jul-12, at 2:44 AM, tech-lists 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.) >=20 > Thanks for this. I'm running a buildworld now. >=20 > 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. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)