compile_external_dtc: Disallow pkg-config usage

DTC build system uses pkg-config to determine whether libyaml and
libpython are available. If they are, then yaml and python support is
built. We want a hermetic build that doesn't rely on host tools, so make
dtc build think none of these libraries are installed.

Change-Id: Ibda2ab501e73b21c77107c5207872acfb94fc57e
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
Elliot Berman 2021-04-29 08:49:10 -07:00
parent b2365fcbd8
commit 5157ca4138

View File

@ -23,10 +23,13 @@ function compile_external_dtc() {
DTC_MAKE_ARGS=("CC=${HOSTCC}" "AR=${AR}")
DTC_MAKE_ARGS+=("LDFLAGS=${HOSTLDFLAGS} -fuse-ld=${LD##*.} --rtlib=compiler-rt")
DTC_MAKE_ARGS+=("EXTRA_CFLAGS=${HOSTCFLAGS}")
# PKG_CONFIG would pull from host environment to determine if libyaml and libpython are
# available. We want a hermetic build that doesn't rely on host tools, so make dtc build think
# none of these libraries are installed.
DTC_MAKE_ARGS+=("PKG_CONFIG=false")
make all install "${DTC_MAKE_ARGS[@]}" NO_PYTHON=1 PREFIX=${COMMON_OUT_DIR}/host
)
}
ADDITIONAL_HOST_TOOLS=pkg-config
append_cmd PRE_DEFCONFIG_CMDS 'compile_external_dtc'
################################################################################