git: 19a32560ab25 - stable/12 - Create CFLAGS_EARLY.file for boot loader.

From: Kyle Evans <>
Date: Fri, 08 Oct 2021 06:11:07 UTC
The branch stable/12 has been updated by kevans:


commit 19a32560ab25624d9a31c674d07edb2e6b8f8992
Author:     Warner Losh <>
AuthorDate: 2020-08-28 17:36:14 +0000
Commit:     Kyle Evans <>
CommitDate: 2021-10-08 05:24:27 +0000

    Create CFLAGS_EARLY.file for boot loader.
    Some external code requires a specific set of include paths to work
    properly since it emulates the typical environment the code is used
    in. Enable this by creating a CFLAGS_EARLY.file variable that can be
    used to build this stack. Otherwise the include stack we build for
    stand programs may get in the way. Code that uses this feature has to
    tolerate the normal stack of inclues being last on the list (and
    presumably unused), though.
    Generally, it it should only be used for the specific include
    directories. Defines and that sort of thing should be done in the
    normal CFLAGS variable. There is a global CFLAGS_EARY hook as well for
    everything in a Makefile.
    (cherry picked from commit f9553770c03e82abcae07397025797ef346fbdab)
 stand/ | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/stand/ b/stand/
index 6fba2051301b..431b629939d8 100644
--- a/stand/
+++ b/stand/
@@ -63,6 +63,11 @@ LIBSA32=	${BOOTOBJ}/libsa32/libsa32.a
 # Standard options:
 CFLAGS+=	-nostdinc
+# Allow CFLAGS_EARLY.file/target so that code that needs specific stack
+# of include paths can set them up before our include paths. Normally
+# the only thing that should be there are -I directives, and as few of
+# those as possible.
 .if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1
 CFLAGS+=	-I${BOOTOBJ}/libsa32