Makefile.libcompat: Move the compat world make flags to LIB*WMAKEFLAGS
LIB${_LIBCOMPAT}WMAKE passes the object directory settings and some
MK_* overrides to make(1) after LIB${_LIBCOMPAT}WMAKEFLAGS. Append them
to LIB${_LIBCOMPAT}WMAKEFLAGS instead, so that the variable holds all
make flags of the compat world stage, for use by the buildenv32 target.
The expansion of LIB${_LIBCOMPAT}WMAKE does not change.
build: Add the buildenv32 target
buildenv spawns a shell with the environment of the world build stage,
where a single program or library can be rebuilt. The 32-bit
compatibility libraries are built with different compiler flags,
MACHINE, object directory and LIBDIR, which only the build32 stage of
buildworld sets up, so there was no such shell for them.
Add buildenv32, which spawns a shell with the environment and the make
flags of the build32 stage. The make flags are passed as environment
variables, and DESTDIR is not set, as for buildenv. Like buildenv, the
target refuses -j and can be run from a subdirectory of the source
tree. It is generated as buildenv${libcompat} for each compat world,
and fails with a message when that world is not built, instead of
letting the subdirectory shortcut in src.init.mk recurse into the
top-level directory.
build.7: document buildenv32
build: Add the buildenvvars32 target
buildenvvars prints the variables of the buildenv environment. Add the
same for buildenv32: move the environment of the buildenv32 shell into
LIB${_LIBCOMPAT}BUILDENVVARS, and print it after the exported variables,
so that it overrides OBJROOT, which is exported when Makefile.inc1 is
run directly.
The buildenv32 shell gets TARGET and TARGET_ARCH from MAKEFLAGS, and
src.opts.mk selects the default options by them, so add them to the
variables. Without them, make run with the printed variables would
select the options of i386 when the compat world is built for amd64.
As with buildenvvars, the other command line variables that make passes
in MAKEFLAGS, like MK_CLANG_BOOTSTRAP=no for an external compiler, are
not printed.
build.7: document buildenvvars32Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped