qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/8] configure: add --without-default-features


From: Thomas Huth
Subject: Re: [PATCH v2 4/8] configure: add --without-default-features
Date: Fri, 11 Dec 2020 08:53:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 10/12/2020 20.04, Alex Bennée wrote:
> By default QEMU enables a lot of features if it can probe and find the
> support libraries. It also enables a bunch of features by default.
> This patch adds the ability to build --without-default-features which
> can be paired with a --without-default-devices for a barely functional
> build.
> 
> The main use case for this is testing our build assumptions and for
> minimising the amount of stuff you build if you just want to test a
> particular feature on your relatively slow emulated test system.

This will likely also be very helpful for downstream distros like RHEL where
we also only want to enable a well-known set of supported features and
disable everything else by default. Thanks for tackling this!

...
> diff --git a/configure b/configure
> index 46fdea88c7..11f5878a59 100755
> --- a/configure
> +++ b/configure
> @@ -291,10 +291,22 @@ unset target_list_exclude
>  #
>  # Always add --enable-foo and --disable-foo command line args.
>  # Distributions want to ensure that several features are compiled in, and it
> -# is impossible without a --enable-foo that exits if a feature is not found.
> +# is impossible without a --enable-foo that exits if a feature is not
> +# found.

Why did you wrap the second long line, but not the first one?

> -brlapi=""
> -curl=""
> +default_feature=""
> +# parse CC options second
> +for opt do
> +  optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)')
> +  case "$opt" in
> +      --without-default-features)
> +          default_feature="no"
> +  ;;
> +  esac
> +done
> +
> +brlapi="$default_feature"
> +curl="$default_feature"
>  iconv="auto"
>  curses="auto"
>  docs="auto"
> @@ -303,52 +315,52 @@ netmap="no"
>  sdl="auto"
>  sdl_image="auto"
>  virtiofsd="auto"
> -virtfs=""
> +virtfs="$default_feature"

So this currently only deals with the variables that are pre-initialized to
"" ... but what about those that are initialized to "auto" ? I think they
should be handled, too? Well, it can still be done in a later patch, I guess.

Acked-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]