From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>
Subject: [PATCH-for-5.0] roms/edk2-funcs.sh: Use available GCC for ARM/Aarch64 targets
Date: Wed, 4 Dec 2019 23:12:29 +0100 [thread overview]
Message-ID: <20191204221229.30612-1-philmd@redhat.com> (raw)
Centos 7.7 only provides cross GCC 4.8.5, but the script forces
us to use GCC5. Since the same machinery is valid to check the
GCC version, remove the $emulation_target check.
$ cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
$ aarch64-linux-gnu-gcc -v 2>&1 | tail -1
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Patch to review with --ignore-all-space
---
roms/edk2-funcs.sh | 48 +++++++++++++++++++---------------------------
1 file changed, 20 insertions(+), 28 deletions(-)
diff --git a/roms/edk2-funcs.sh b/roms/edk2-funcs.sh
index 3f4485b201..a455611c0d 100644
--- a/roms/edk2-funcs.sh
+++ b/roms/edk2-funcs.sh
@@ -135,35 +135,27 @@ qemu_edk2_get_toolchain()
return 1
fi
- case "$emulation_target" in
- (arm|aarch64)
- printf 'GCC5\n'
+ if ! cross_prefix=$(qemu_edk2_get_cross_prefix "$emulation_target"); then
+ return 1
+ fi
+
+ gcc_version=$("${cross_prefix}gcc" -v 2>&1 | tail -1 | awk '{print $3}')
+ # Run "git-blame" on "OvmfPkg/build.sh" in edk2 for more information on
+ # the mapping below.
+ case "$gcc_version" in
+ ([1-3].*|4.[0-7].*)
+ printf '%s: unsupported gcc version "%s"\n' \
+ "$program_name" "$gcc_version" >&2
+ return 1
;;
-
- (i386|x86_64)
- if ! cross_prefix=$(qemu_edk2_get_cross_prefix "$emulation_target"); then
- return 1
- fi
-
- gcc_version=$("${cross_prefix}gcc" -v 2>&1 | tail -1 | awk '{print $3}')
- # Run "git-blame" on "OvmfPkg/build.sh" in edk2 for more information on
- # the mapping below.
- case "$gcc_version" in
- ([1-3].*|4.[0-7].*)
- printf '%s: unsupported gcc version "%s"\n' \
- "$program_name" "$gcc_version" >&2
- return 1
- ;;
- (4.8.*)
- printf 'GCC48\n'
- ;;
- (4.9.*|6.[0-2].*)
- printf 'GCC49\n'
- ;;
- (*)
- printf 'GCC5\n'
- ;;
- esac
+ (4.8.*)
+ printf 'GCC48\n'
+ ;;
+ (4.9.*|6.[0-2].*)
+ printf 'GCC49\n'
+ ;;
+ (*)
+ printf 'GCC5\n'
;;
esac
}
--
2.21.0
next reply other threads:[~2019-12-04 22:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 22:12 Philippe Mathieu-Daudé [this message]
2019-12-05 16:13 ` [PATCH-for-5.0] roms/edk2-funcs.sh: Use available GCC for ARM/Aarch64 targets Laszlo Ersek
2019-12-05 16:27 ` Philippe Mathieu-Daudé
2019-12-05 16:47 ` Andrea Bolognani
2019-12-05 17:04 ` Philippe Mathieu-Daudé
2019-12-05 16:50 ` Ard Biesheuvel
2019-12-05 19:35 ` Laszlo Ersek
2019-12-06 5:07 ` Philippe Mathieu-Daudé
2019-12-08 17:44 ` dann frazier
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=20191204221229.30612-1-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).