Date: Fri, 28 Aug 2020 17:36:14 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364924 - head/stand Message-ID: <202008281736.07SHaEqE096075@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Aug 28 17:36:14 2020 New Revision: 364924 URL: https://svnweb.freebsd.org/changeset/base/364924 Log: 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. Modified: head/stand/defs.mk Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Fri Aug 28 17:06:35 2020 (r364923) +++ head/stand/defs.mk Fri Aug 28 17:36:14 2020 (r364924) @@ -55,6 +55,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. +CFLAGS+= ${CFLAGS_EARLY} ${CFLAGS_EARLY.${.IMPSRC:T}} ${CFLAGS_EARLY.${.TARGET:T}} .if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 CFLAGS+= -I${BOOTOBJ}/libsa32 .else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008281736.07SHaEqE096075>