All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	 Doug Goldstein <cardoe@cardoe.com>,
	 Stefano Stabellini <sstabellini@kernel.org>,
	 Anthony PERARD <anthony.perard@citrix.com>,
	 Michal Orzel <michal.orzel@amd.com>,
	 Oleksii Kurochko <oleksii.kurochko@gmail.com>
Subject: Re: [PATCH 3/6] CI: Only calculate ./configure args if needed
Date: Tue, 3 Jan 2023 17:12:33 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2301031712270.4079@ubuntu-linux-20-04-desktop> (raw)
In-Reply-To: <20221230003848.3241-4-andrew.cooper3@citrix.com>

On Fri, 30 Dec 2022, Andrew Cooper wrote:
> This is purely code motion of the cfgargs construction, into the case where it
> is used.
> 
> No practical change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
> CC: Doug Goldstein <cardoe@cardoe.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony PERARD <anthony.perard@citrix.com>
> CC: Michal Orzel <michal.orzel@amd.com>
> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
>  automation/scripts/build | 63 ++++++++++++++++++++++++------------------------
>  1 file changed, 31 insertions(+), 32 deletions(-)
> 
> diff --git a/automation/scripts/build b/automation/scripts/build
> index 8dee1cbbc251..f2301d08789d 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -39,37 +39,6 @@ if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
>      hypervisor_only="y"
>  fi
>  
> -# build up our configure options
> -cfgargs=()
> -cfgargs+=("--enable-docs")
> -
> -if [[ "${CC}" == "clang"* ]]; then
> -    # SeaBIOS cannot be built with clang
> -    cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
> -    # iPXE cannot be built with clang
> -    cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe")
> -    # newlib cannot be built with clang so we cannot build stubdoms
> -    cfgargs+=("--disable-stubdom")
> -fi
> -
> -if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
> -    # disable --disable-werror for QEMUU when building with MUSL
> -    cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
> -    # SeaBIOS doesn't build on MUSL systems
> -    cfgargs+=("--with-system-seabios=/bin/false")
> -fi
> -
> -# Qemu requires Python 3.5 or later, and ninja
> -if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))" \
> -        || ! type ninja; then
> -    cfgargs+=("--with-system-qemu=/bin/false")
> -fi
> -
> -# SeaBIOS requires GCC 4.6 or later
> -if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
> -    cfgargs+=("--with-system-seabios=/bin/false")
> -fi
> -
>  # Directory for the artefacts to be dumped into
>  mkdir binaries
>  
> @@ -80,7 +49,37 @@ if [[ "${hypervisor_only}" == "y" ]]; then
>      # Preserve artefacts
>      cp xen/xen binaries/xen
>  else
> -    # Full build
> +    # Full build.  Figure out our ./configure options
> +    cfgargs=()
> +    cfgargs+=("--enable-docs")
> +
> +    if [[ "${CC}" == "clang"* ]]; then
> +        # SeaBIOS cannot be built with clang
> +        cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
> +        # iPXE cannot be built with clang
> +        cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe")
> +        # newlib cannot be built with clang so we cannot build stubdoms
> +        cfgargs+=("--disable-stubdom")
> +    fi
> +
> +    if  ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
> +        # disable --disable-werror for QEMUU when building with MUSL
> +        cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
> +        # SeaBIOS doesn't build on MUSL systems
> +        cfgargs+=("--with-system-seabios=/bin/false")
> +    fi
> +
> +    # Qemu requires Python 3.5 or later, and ninja
> +    if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))" \
> +            || ! type ninja; then
> +        cfgargs+=("--with-system-qemu=/bin/false")
> +    fi
> +
> +    # SeaBIOS requires GCC 4.6 or later
> +    if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
> +        cfgargs+=("--with-system-seabios=/bin/false")
> +    fi
> +
>      ./configure "${cfgargs[@]}"
>      make -j$(nproc) dist
>  
> -- 
> 2.11.0
> 


  parent reply	other threads:[~2023-01-04  1:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-30  0:38 [PATCH 0/6] CI: Fixes/cleanup in preparation for RISCV Andrew Cooper
2022-12-30  0:38 ` [PATCH 1/6] CI: Drop automation/configs/ Andrew Cooper
2023-01-02 13:57   ` Michal Orzel
2023-01-04  1:08   ` Stefano Stabellini
2022-12-30  0:38 ` [PATCH 2/6] CI: Remove guesswork about which artefacts to preserve Andrew Cooper
2023-01-02 14:00   ` Michal Orzel
2023-01-04 12:12     ` Andrew Cooper
2023-01-04 12:18       ` Michal Orzel
2023-01-04  1:10   ` Stefano Stabellini
2023-01-04  1:18     ` Andrew Cooper
2023-01-04  1:22       ` Stefano Stabellini
2022-12-30  0:38 ` [PATCH 3/6] CI: Only calculate ./configure args if needed Andrew Cooper
2023-01-02 14:01   ` Michal Orzel
2023-01-04  1:12   ` Stefano Stabellini [this message]
2022-12-30  0:38 ` [PATCH 4/6] CI: Express HYPERVISOR_ONLY in build.yml Andrew Cooper
2022-12-30 10:04   ` Oleksii
2023-01-02 14:05   ` Michal Orzel
2023-01-04  1:15   ` Stefano Stabellini
2023-01-04  1:27     ` Andrew Cooper
2023-01-04  1:36       ` Stefano Stabellini
2023-01-04  1:41         ` Andrew Cooper
2023-01-04  1:48           ` Stefano Stabellini
2023-01-04  1:51             ` Andrew Cooper
2023-01-04  1:55               ` Stefano Stabellini
2022-12-30  0:38 ` [PATCH 5/6] CI: Fix build script when CROSS_COMPILE is in use Andrew Cooper
2023-01-04  1:20   ` Stefano Stabellini
2022-12-30  0:38 ` [PATCH 6/6] CI: Simplify the MUSL check Andrew Cooper
2023-01-04  1:22   ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2301031712270.4079@ubuntu-linux-20-04-desktop \
    --to=sstabellini@kernel.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.