if test -e "$source_path/.git"
then
git_submodules_action="update"
- git_submodules="ui/keycodemapdb"
- git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
- git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
else
git_submodules_action="ignore"
- git_submodules=""
-
- if ! test -f "$source_path/ui/keycodemapdb/README"
- then
- echo
- echo "ERROR: missing file $source_path/ui/keycodemapdb/README"
- echo
- echo "This is not a GIT checkout but module content appears to"
- echo "be missing. Do not use 'git archive' or GitHub download links"
- echo "to acquire QEMU source archives. Non-GIT builds are only"
- echo "supported with source archives linked from:"
- echo
- echo " https://www.qemu.org/download/#source"
- echo
- echo "Developers working with GIT can use scripts/archive-source.sh"
- echo "if they need to create valid source archives."
- echo
- exit 1
- fi
fi
+
+git_submodules="ui/keycodemapdb"
git="git"
# Don't accept a target_list environment variable.
hax="auto"
hvf="auto"
whpx="auto"
+nvmm="auto"
rdma="$default_feature"
pvrdma="$default_feature"
gprof="no"
trace_backends="log"
trace_file="trace"
spice="$default_feature"
+spice_protocol="auto"
rbd="auto"
smartcard="$default_feature"
u2f="auto"
nettle="$default_feature"
nettle_xts="no"
gcrypt="$default_feature"
-gcrypt_hmac="no"
gcrypt_xts="no"
qemu_private_xts="yes"
auth_pam="$default_feature"
vvfat=${default_feature:-yes}
qed=${default_feature:-yes}
parallels=${default_feature:-yes}
-sheepdog="no"
libxml2="$default_feature"
debug_mutex="no"
libpmem="$default_feature"
fuse="auto"
fuse_lseek="auto"
multiprocess="auto"
+slirp_smbd="$default_feature"
malloc_trim="auto"
gio="$default_feature"
fi
done
-: ${smbd=${SMBD-/usr/sbin/smbd}}
-
# Default objcc to clang if available, otherwise use CC
if has clang; then
objcc=clang
;;
--enable-hvf) hvf="enabled"
;;
+ --disable-nvmm) nvmm="disabled"
+ ;;
+ --enable-nvmm) nvmm="enabled"
+ ;;
--disable-whpx) whpx="disabled"
;;
--enable-whpx) whpx="enabled"
;;
--disable-spice) spice="no"
;;
- --enable-spice) spice="yes"
+ --enable-spice)
+ spice_protocol="yes"
+ spice="yes"
+ ;;
+ --disable-spice-protocol)
+ spice_protocol="no"
+ spice="no"
+ ;;
+ --enable-spice-protocol) spice_protocol="yes"
;;
--disable-libiscsi) libiscsi="disabled"
;;
;;
--enable-parallels) parallels="yes"
;;
- --disable-sheepdog) sheepdog="no"
- ;;
- --enable-sheepdog) sheepdog="yes"
- ;;
--disable-vhost-user) vhost_user="no"
;;
--enable-vhost-user) vhost_user="yes"
;;
--disable-gio) gio=no
;;
+ --enable-slirp-smbd) slirp_smbd=yes
+ ;;
+ --disable-slirp-smbd) slirp_smbd=no
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
fi
;;
ignore)
+ if ! test -f "$source_path/ui/keycodemapdb/README"
+ then
+ echo
+ echo "ERROR: missing GIT submodules"
+ echo
+ if test -e "$source_path/.git"; then
+ echo "--with-git-submodules=ignore specified but submodules were not"
+ echo "checked out. Please initialize and update submodules."
+ else
+ echo "This is not a GIT checkout but module content appears to"
+ echo "be missing. Do not use 'git archive' or GitHub download links"
+ echo "to acquire QEMU source archives. Non-GIT builds are only"
+ echo "supported with source archives linked from:"
+ echo
+ echo " https://www.qemu.org/download/#source"
+ echo
+ echo "Developers working with GIT can use scripts/archive-source.sh"
+ echo "if they need to create valid source archives."
+ fi
+ echo
+ exit 1
+ fi
;;
*)
echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'"
# No special flags required for other host CPUs
esac
-eval "cross_cc_${cpu}=\$host_cc"
+eval "cross_cc_${cpu}=\$cc"
cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"
fi
default_target_list=""
-deprecated_targets_list=ppc64abi32-linux-user,lm32-softmmu,unicore32-softmmu
+deprecated_targets_list=ppc64abi32-linux-user
deprecated_features=""
mak_wilds=""
kvm KVM acceleration support
hax HAX acceleration support
hvf Hypervisor.framework acceleration support
+ nvmm NVMM acceleration support
whpx Windows Hypervisor Platform acceleration support
rdma Enable RDMA-based migration
pvrdma Enable PVRDMA support
vhost-user-blk-server vhost-user-blk server support
vhost-vdpa vhost-vdpa kernel backend support
spice spice
+ spice-protocol spice-protocol
rbd rados block device (rbd)
libiscsi iscsi support
libnfs nfs support
vvfat vvfat image format support
qed qed image format support
parallels parallels image format support
- sheepdog sheepdog block driver support (deprecated)
crypto-afalg Linux AF_ALG crypto backend driver
capstone capstone disassembler support
debug-mutex mutex debugging support
fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports
multiprocess Out of process device emulation support
gio libgio support
+ slirp-smbd use smbd (at path --smbd=*) in slirp networking
NOTE: The object files are built at the place where configure is launched
EOF
cat > $TMPC << EOF
#if defined(__clang_major__) && defined(__clang_minor__)
# ifdef __apple_build_version__
-# if __clang_major__ < 5 || (__clang_major__ == 5 && __clang_minor__ < 1)
-# error You need at least XCode Clang v5.1 to compile QEMU
+# if __clang_major__ < 10 || (__clang_major__ == 10 && __clang_minor__ < 0)
+# error You need at least XCode Clang v10.0 to compile QEMU
# endif
# else
-# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)
-# error You need at least Clang v3.4 to compile QEMU
+# if __clang_major__ < 6 || (__clang_major__ == 6 && __clang_minor__ < 0)
+# error You need at least Clang v6.0 to compile QEMU
# endif
# endif
#elif defined(__GNUC__) && defined(__GNUC_MINOR__)
-# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
-# error You need at least GCC v4.8 to compile QEMU
+# if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 5)
+# error You need at least GCC v7.5.0 to compile QEMU
# endif
#else
# error You either need GCC or Clang to compiler QEMU
int main (void) { return 0; }
EOF
if ! compile_prog "" "" ; then
- error_exit "You need at least GCC v4.8 or Clang v3.4 (or XCode Clang v5.1)"
+ error_exit "You need at least GCC v7.5 or Clang v6.0 (or XCode Clang v10.0)"
fi
# Accumulate -Wfoo and -Wno-bar separately.
fi
fi
+if test "$tcg" = "enabled"; then
+ git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
+ git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
+fi
+
if test -z "${target_list+xxx}" ; then
default_targets=yes
for target in $default_target_list; do
if test "$gnutls" != "no"; then
pass="no"
- if $pkg_config --exists "gnutls >= 3.1.18"; then
+ if $pkg_config --exists "gnutls >= 3.5.18"; then
gnutls_cflags=$($pkg_config --cflags gnutls)
gnutls_libs=$($pkg_config --libs gnutls)
# Packaging for the static libraries is not always correct.
maj=`libgcrypt-config --version | awk -F . '{print $1}'`
min=`libgcrypt-config --version | awk -F . '{print $2}'`
- if test $maj != 1 || test $min -lt 5
+ if test $maj != 1 || test $min -lt 8
then
return 1
fi
if test "$nettle" != "no"; then
pass="no"
- if $pkg_config --exists "nettle >= 2.7.1"; then
+ if $pkg_config --exists "nettle >= 3.4"; then
nettle_cflags=$($pkg_config --cflags nettle)
nettle_libs=$($pkg_config --libs nettle)
- nettle_version=$($pkg_config --modversion nettle)
# Link test to make sure the given libraries work (e.g for static).
write_c_skeleton
if compile_prog "" "$nettle_libs" ; then
gcrypt="yes"
cat > $TMPC << EOF
#include <gcrypt.h>
-int main(void) {
- gcry_mac_hd_t handle;
- gcry_mac_open(&handle, GCRY_MAC_HMAC_MD5,
- GCRY_MAC_FLAG_SECURE, NULL);
- return 0;
-}
-EOF
- if compile_prog "$gcrypt_cflags" "$gcrypt_libs" ; then
- gcrypt_hmac=yes
- fi
- cat > $TMPC << EOF
-#include <gcrypt.h>
int main(void) {
gcry_cipher_hd_t handle;
gcry_cipher_open(&handle, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_XTS, 0);
##########################################
# glib support probe
-glib_req_ver=2.48
+glib_req_ver=2.56
glib_modules=gthread-2.0
if test "$modules" = yes; then
glib_modules="$glib_modules gmodule-export-2.0"
gio_cflags=$($pkg_config --cflags gio-2.0)
gio_libs=$($pkg_config --libs gio-2.0)
gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
- if [ ! -x "$gdbus_codegen" ]; then
+ if ! has "$gdbus_codegen"; then
gdbus_codegen=
fi
# Check that the libraries actually work -- Ubuntu 18.04 ships
##########################################
# libssh probe
if test "$libssh" != "no" ; then
- if $pkg_config --exists libssh; then
+ if $pkg_config --exists "libssh >= 0.8.7"; then
libssh_cflags=$($pkg_config libssh --cflags)
libssh_libs=$($pkg_config libssh --libs)
libssh=yes
fi
fi
-##########################################
-# Check for libssh 0.8
-# This is done like this instead of using the LIBSSH_VERSION_* and
-# SSH_VERSION_* macros because some distributions in the past shipped
-# snapshots of the future 0.8 from Git, and those snapshots did not
-# have updated version numbers (still referring to 0.7.0).
-
-if test "$libssh" = "yes"; then
- cat > $TMPC <<EOF
-#include <libssh/libssh.h>
-int main(void) { return ssh_get_server_publickey(NULL, NULL); }
-EOF
- if compile_prog "$libssh_cflags" "$libssh_libs"; then
- libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
- fi
-fi
-
##########################################
# linux-aio probe
case "$fdt" in
auto | enabled | internal)
# Simpler to always update submodule, even if not needed.
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} dtc"
- fi
+ git_submodules="${git_submodules} dtc"
;;
esac
##########################################
-# opengl probe (for sdl2, gtk, milkymist-tmu2)
+# opengl probe (for sdl2, gtk)
gbm="no"
if $pkg_config gbm; then
##########################################
# spice probe
+if test "$spice_protocol" != "no" ; then
+ spice_protocol_cflags=$($pkg_config --cflags spice-protocol 2>/dev/null)
+ if $pkg_config --atleast-version=0.12.3 spice-protocol; then
+ spice_protocol="yes"
+ else
+ if test "$spice_protocol" = "yes" ; then
+ feature_not_found "spice_protocol" \
+ "Install spice-protocol(>=0.12.3) devel"
+ fi
+ spice_protocol="no"
+ fi
+fi
+
if test "$spice" != "no" ; then
cat > $TMPC << EOF
#include <spice.h>
spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null)
spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
if $pkg_config --atleast-version=0.12.5 spice-server && \
- $pkg_config --atleast-version=0.12.3 spice-protocol && \
+ test "$spice_protocol" = "yes" && \
compile_prog "$spice_cflags" "$spice_libs" ; then
spice="yes"
else
if test "$spice" = "yes" ; then
feature_not_found "spice" \
- "Install spice-server(>=0.12.5) and spice-protocol(>=0.12.3) devel"
+ "Install spice-server(>=0.12.5) devel"
fi
spice="no"
fi
case "$capstone" in
auto | enabled | internal)
# Simpler to always update submodule, even if not needed.
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} capstone"
- fi
+ git_submodules="${git_submodules} capstone"
;;
esac
case "$slirp" in
auto | enabled | internal)
# Simpler to always update submodule, even if not needed.
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} slirp"
- fi
+ git_submodules="${git_submodules} slirp"
;;
esac
+# Check for slirp smbd dupport
+: ${smbd=${SMBD-/usr/sbin/smbd}}
+if test "$slirp_smbd" != "no" ; then
+ if test "$mingw32" = "yes" ; then
+ if test "$slirp_smbd" = "yes" ; then
+ error_exit "Host smbd not supported on this platform."
+ fi
+ slirp_smbd=no
+ else
+ slirp_smbd=yes
+ fi
+fi
+
##########################################
# check for usable __NR_keyctl syscall
roms="$roms s390-ccw"
# SLOF is required for building the s390-ccw firmware on s390x,
# since it is using the libnet code from SLOF for network booting.
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} roms/SLOF"
- fi
+ git_submodules="${git_submodules} roms/SLOF"
fi
fi
if test "$guest_agent" = "yes" ; then
echo "CONFIG_GUEST_AGENT=y" >> $config_host_mak
fi
-echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
+if test "$slirp_smbd" = "yes" ; then
+ echo "CONFIG_SLIRP_SMBD=y" >> $config_host_mak
+ echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
+fi
if test "$vde" = "yes" ; then
echo "CONFIG_VDE=y" >> $config_host_mak
echo "VDE_LIBS=$vde_libs" >> $config_host_mak
echo "CONFIG_GIO=y" >> $config_host_mak
echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
echo "GIO_LIBS=$gio_libs" >> $config_host_mak
+fi
+if test "$gdbus_codegen" != "" ; then
echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
fi
echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
fi
if test "$gcrypt" = "yes" ; then
echo "CONFIG_GCRYPT=y" >> $config_host_mak
- if test "$gcrypt_hmac" = "yes" ; then
- echo "CONFIG_GCRYPT_HMAC=y" >> $config_host_mak
- fi
echo "GCRYPT_CFLAGS=$gcrypt_cflags" >> $config_host_mak
echo "GCRYPT_LIBS=$gcrypt_libs" >> $config_host_mak
fi
if test "$nettle" = "yes" ; then
echo "CONFIG_NETTLE=y" >> $config_host_mak
- echo "CONFIG_NETTLE_VERSION_MAJOR=${nettle_version%%.*}" >> $config_host_mak
echo "NETTLE_CFLAGS=$nettle_cflags" >> $config_host_mak
echo "NETTLE_LIBS=$nettle_libs" >> $config_host_mak
fi
if test "$posix_memalign" = "yes" ; then
echo "CONFIG_POSIX_MEMALIGN=y" >> $config_host_mak
fi
+
+if test "$spice_protocol" = "yes" ; then
+ echo "CONFIG_SPICE_PROTOCOL=y" >> $config_host_mak
+ echo "SPICE_PROTOCOL_CFLAGS=$spice_protocol_cflags" >> $config_host_mak
+fi
if test "$spice" = "yes" ; then
echo "CONFIG_SPICE=y" >> $config_host_mak
- echo "SPICE_CFLAGS=$spice_cflags" >> $config_host_mak
+ echo "SPICE_CFLAGS=$spice_cflags $spice_protocol_cflags" >> $config_host_mak
echo "SPICE_LIBS=$spice_libs" >> $config_host_mak
fi
if test "$parallels" = "yes" ; then
echo "CONFIG_PARALLELS=y" >> $config_host_mak
fi
-if test "$sheepdog" = "yes" ; then
- add_to deprecated_features "sheepdog"
- echo "CONFIG_SHEEPDOG=y" >> $config_host_mak
-fi
if test "$have_mlockall" = "yes" ; then
echo "HAVE_MLOCKALL=y" >> $config_host_mak
fi
echo "MESON=$meson" >> $config_host_mak
echo "NINJA=$ninja" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
+echo "HOST_CC=$host_cc" >> $config_host_mak
if $iasl -h > /dev/null 2>&1; then
echo "CONFIG_IASL=$iasl" >> $config_host_mak
fi
# UNLINK is used to remove symlinks from older development versions
# that might get into the way when doing "git update" without doing
# a "make distclean" in between.
-DIRS="tests tests/tcg tests/tcg/lm32 tests/qapi-schema tests/qtest/libqos"
+DIRS="tests tests/tcg tests/qapi-schema tests/qtest/libqos"
DIRS="$DIRS tests/qtest tests/qemu-iotests tests/vm tests/fp tests/qgraph"
DIRS="$DIRS docs docs/interop fsdev scsi"
DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
DIRS="$DIRS roms/seabios"
DIRS="$DIRS contrib/plugins/"
LINKS="Makefile"
-LINKS="$LINKS tests/tcg/lm32/Makefile"
LINKS="$LINKS tests/tcg/Makefile.target"
LINKS="$LINKS pc-bios/optionrom/Makefile"
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
done
if test "$skip_meson" = no; then
-cross="config-meson.cross.new"
-meson_quote() {
+ cross="config-meson.cross.new"
+ meson_quote() {
echo "'$(echo $* | sed "s/ /','/g")'"
-}
-
-echo "# Automatically generated by configure - do not modify" > $cross
-echo "[properties]" >> $cross
-test -z "$cxx" && echo "link_language = 'c'" >> $cross
-echo "[built-in options]" >> $cross
-echo "c_args = [${CFLAGS:+$(meson_quote $CFLAGS)}]" >> $cross
-echo "cpp_args = [${CXXFLAGS:+$(meson_quote $CXXFLAGS)}]" >> $cross
-echo "c_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross
-echo "cpp_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross
-echo "[binaries]" >> $cross
-echo "c = [$(meson_quote $cc)]" >> $cross
-test -n "$cxx" && echo "cpp = [$(meson_quote $cxx)]" >> $cross
-test -n "$objcc" && echo "objc = [$(meson_quote $objcc)]" >> $cross
-echo "ar = [$(meson_quote $ar)]" >> $cross
-echo "nm = [$(meson_quote $nm)]" >> $cross
-echo "pkgconfig = [$(meson_quote $pkg_config_exe)]" >> $cross
-echo "ranlib = [$(meson_quote $ranlib)]" >> $cross
-if has $sdl2_config; then
- echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
-fi
-echo "strip = [$(meson_quote $strip)]" >> $cross
-echo "windres = [$(meson_quote $windres)]" >> $cross
-if test "$cross_compile" = "yes"; then
+ }
+
+ echo "# Automatically generated by configure - do not modify" > $cross
+ echo "[properties]" >> $cross
+ test -z "$cxx" && echo "link_language = 'c'" >> $cross
+ echo "[built-in options]" >> $cross
+ echo "c_args = [${CFLAGS:+$(meson_quote $CFLAGS)}]" >> $cross
+ echo "cpp_args = [${CXXFLAGS:+$(meson_quote $CXXFLAGS)}]" >> $cross
+ echo "c_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross
+ echo "cpp_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross
+ echo "[binaries]" >> $cross
+ echo "c = [$(meson_quote $cc)]" >> $cross
+ test -n "$cxx" && echo "cpp = [$(meson_quote $cxx)]" >> $cross
+ test -n "$objcc" && echo "objc = [$(meson_quote $objcc)]" >> $cross
+ echo "ar = [$(meson_quote $ar)]" >> $cross
+ echo "nm = [$(meson_quote $nm)]" >> $cross
+ echo "pkgconfig = [$(meson_quote $pkg_config_exe)]" >> $cross
+ echo "ranlib = [$(meson_quote $ranlib)]" >> $cross
+ if has $sdl2_config; then
+ echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
+ fi
+ echo "strip = [$(meson_quote $strip)]" >> $cross
+ echo "windres = [$(meson_quote $windres)]" >> $cross
+ if test "$cross_compile" = "yes"; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
if test "$mingw32" = "yes" ; then
else
echo "endian = 'little'" >> $cross
fi
-else
+ else
cross_arg="--native-file config-meson.cross"
-fi
-mv $cross config-meson.cross
+ fi
+ mv $cross config-meson.cross
-rm -rf meson-private meson-info meson-logs
-unset staticpic
-if ! version_ge "$($meson --version)" 0.56.0; then
- staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi)
-fi
-NINJA=$ninja $meson setup \
+ rm -rf meson-private meson-info meson-logs
+ unset staticpic
+ if ! version_ge "$($meson --version)" 0.56.0; then
+ staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi)
+ fi
+ NINJA=$ninja $meson setup \
--prefix "$prefix" \
--libdir "$libdir" \
--libexecdir "$libexecdir" \
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
-Db_lto=$lto -Dcfi=$cfi -Dcfi_debug=$cfi_debug \
-Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
- -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \
+ -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf -Dnvmm=$nvmm \
-Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \
-Dcocoa=$cocoa -Dgtk=$gtk -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
$cross_arg \
"$PWD" "$source_path"
-if test "$?" -ne 0 ; then
- error_exit "meson setup failed"
-fi
+ if test "$?" -ne 0 ; then
+ error_exit "meson setup failed"
+ fi
+else
+ if test -f meson-private/cmd_line.txt; then
+ # Adjust old command line options whose type was changed
+ # Avoids having to use "setup --wipe" when Meson is upgraded
+ perl -i -ne '
+ s/^gettext = true$/gettext = auto/;
+ s/^gettext = false$/gettext = disabled/;
+ print;' meson-private/cmd_line.txt
+ fi
fi
if test -n "${deprecated_features}"; then
echo " features: ${deprecated_features}"
fi
+# Create list of config switches that should be poisoned in common code...
+# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special.
+target_configs_h=$(ls *-config-devices.h *-config-target.h 2>/dev/null)
+if test -n "$target_configs_h" ; then
+ sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \
+ -e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \
+ $target_configs_h | sort -u > config-poison.h
+else
+ :> config-poison.h
+fi
+
# Save the configure command line for later reuse.
cat <<EOD >config.status
#!/bin/sh