On 02/03/2022 13:44, Roger Pau Monne wrote:
> diff --git a/xen/common/Kconfig b/xen/common/Kconfig
> index 6443943889..2423d9f490 100644
> --- a/xen/common/Kconfig
> +++ b/xen/common/Kconfig
> @@ -353,7 +353,9 @@ config CRYPTO
>  config LIVEPATCH
>       bool "Live patching support"
>       default X86
> -     depends on "$(XEN_HAS_BUILD_ID)" = "y"
> +     depends on "$(XEN_HAS_BUILD_ID)" = "y" && \
> +                $(cc-option,-ffunction-sections) && \
> +                $(cc-option,-fdata-sections)

cc-option can take multiple, so just $(cc-option,-ffunction-sections
-fdata-sections)

However, we in practice want these in combination with $(LD)
--gc-sections anyway although that wants to be separately configurable.

Therefore, we probably want something like:

config FUNC_SECTIONS
    bool

config LIVEPATCH
    selects FUNC_SECTIONS

or so, so in the future we can add "config LD_GC_SECTIONS" which also
selects FUNC_SECTIONS.

Thoughts?

~Andrew

Reply via email to