All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Gianluca Guida <gianluca@rivosinc.com>,
	Oleksii Kurochko <oleksii.kurochko@gmail.com>,
	Doug Goldstein <cardoe@cardoe.com>
Subject: [XEN PATCH v1 2/4] automation: add cross-compiler support for the build script
Date: Fri, 23 Dec 2022 13:16:21 +0200	[thread overview]
Message-ID: <3c926f637c4738bd14db10e8fe8f72a6eae2dfd4.1671789736.git.oleksii.kurochko@gmail.com> (raw)
In-Reply-To: <cover.1671789736.git.oleksii.kurochko@gmail.com>

Docker images that are currently available and used for
cross-compilation is additionally installed GCC/Binutils
which is why the build script doesn't crash.

RISC-V docker image doesn't have native GCC only          
cross-compiler which will lead to the fact  that the build
script will fail.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 automation/scripts/build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index a593419063..026f480e76 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -2,12 +2,12 @@
 
 test -f /etc/os-release && cat "$_"
 
-$CC --version
+${CROSS_COMPILE}${CC} --version
 
 # Express the compiler version as an integer.  e.g. GCC 4.9.2 => 0x040902
 cc-ver()
 {
-    $CC -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }'
+    ${CROSS_COMPILE}${CC} -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }'
 }
 
 # random config or default config
@@ -66,7 +66,7 @@ if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); ex
 fi
 
 # SeaBIOS requires GCC 4.6 or later
-if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
+if [[ "${CROSS_COMPILE}${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
     cfgargs+=("--with-system-seabios=/bin/false")
 fi
 
-- 
2.38.1



  parent reply	other threads:[~2022-12-23 11:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23 11:16 [XEN PATCH v1 0/4] Add minimal RISC-V Xen build and build testing Oleksii Kurochko
2022-12-23 11:16 ` [XEN PATCH v1 1/4] arch/riscv: initial RISC-V support to build/run minimal Xen Oleksii Kurochko
2022-12-23 13:50   ` Julien Grall
2022-12-26 11:14     ` Oleksii
2022-12-28  4:51       ` Alistair Francis
2022-12-28 14:33         ` Oleksii
2022-12-28 19:01         ` Andrew Cooper
2022-12-29  8:11           ` Oleksii
2022-12-28 22:22       ` Julien Grall
2022-12-29  8:45         ` Oleksii
2023-01-02 10:58           ` Julien Grall
2022-12-28 18:56   ` Andrew Cooper
2022-12-29  8:49     ` Oleksii
2022-12-23 11:16 ` Oleksii Kurochko [this message]
2022-12-28 23:24   ` [XEN PATCH v1 2/4] automation: add cross-compiler support for the build script Andrew Cooper
2022-12-29  8:13     ` Oleksii
2022-12-29 13:44       ` Oleksii
2022-12-23 11:16 ` [XEN PATCH v1 3/4] automation: add python3 package for riscv64.dockerfile Oleksii Kurochko
2022-12-28 23:26   ` Andrew Cooper
2022-12-29  7:45     ` Oleksii
2022-12-29 13:05       ` Andrew Cooper
2022-12-23 11:16 ` [XEN PATCH v1 4/4] automation: add RISC-V 64 cross-build tests for Xen Oleksii Kurochko
2022-12-28  4:55   ` Alistair Francis

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=3c926f637c4738bd14db10e8fe8f72a6eae2dfd4.1671789736.git.oleksii.kurochko@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=gianluca@rivosinc.com \
    --cc=sstabellini@kernel.org \
    --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.