diff mbox

[v3] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier

Message ID 20161124011523.18281-2-konrad@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Konrad Rzeszutek Wilk Nov. 24, 2016, 1:15 a.m. UTC
v2:
 * Changes suggested by Laszlo:
   - change the catch-all (*) to GCC5, from GCC44
   - remove the (5.*.*) pattern from GCC49
   - generate error for GCC < 4.4

In v3, also generate error for really GCC < 4.4, like GCC 1.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
---
v1: Initial
v2: Redo it per Laszlo suggestions
v3: Fix up commit message per Jordan
    Also generate error for prehistoric versions of GCC, like 1.
---
 OvmfPkg/build.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Laszlo Ersek Nov. 24, 2016, 8:51 a.m. UTC | #1
On 11/24/16 02:15, Konrad Rzeszutek Wilk wrote:
> v2:
>  * Changes suggested by Laszlo:
>    - change the catch-all (*) to GCC5, from GCC44
>    - remove the (5.*.*) pattern from GCC49
>    - generate error for GCC < 4.4
> 
> In v3, also generate error for really GCC < 4.4, like GCC 1.
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
> ---
> v1: Initial
> v2: Redo it per Laszlo suggestions
> v3: Fix up commit message per Jordan
>     Also generate error for prehistoric versions of GCC, like 1.
> ---
>  OvmfPkg/build.sh | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index eb5eb73..95fe8fb 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -83,6 +83,13 @@ case `uname` in
>    Linux*)
>      gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
>      case $gcc_version in
> +      [1-3].*|4.[0-3].*)
> +        echo OvmfPkg requires GCC4.4 or later
> +        exit 1
> +        ;;
> +      4.4.*)
> +        TARGET_TOOLS=GCC44
> +        ;;
>        4.5.*)
>          TARGET_TOOLS=GCC45
>          ;;
> @@ -95,11 +102,11 @@ case `uname` in
>        4.8.*)
>          TARGET_TOOLS=GCC48
>          ;;
> -      4.9.*|4.1[0-9].*|5.*.*)
> +      4.9.*)
>          TARGET_TOOLS=GCC49
>          ;;
>        *)
> -        TARGET_TOOLS=GCC44
> +        TARGET_TOOLS=GCC5
>          ;;
>      esac
>  esac
> 

Tested-by: Laszlo Ersek <lersek@redhat.com>

(With gcc-4.8.)

Pushed as commit 2667ad40919a.

Thank you!
Laszlo
diff mbox

Patch

diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index eb5eb73..95fe8fb 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -83,6 +83,13 @@  case `uname` in
   Linux*)
     gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
     case $gcc_version in
+      [1-3].*|4.[0-3].*)
+        echo OvmfPkg requires GCC4.4 or later
+        exit 1
+        ;;
+      4.4.*)
+        TARGET_TOOLS=GCC44
+        ;;
       4.5.*)
         TARGET_TOOLS=GCC45
         ;;
@@ -95,11 +102,11 @@  case `uname` in
       4.8.*)
         TARGET_TOOLS=GCC48
         ;;
-      4.9.*|4.1[0-9].*|5.*.*)
+      4.9.*)
         TARGET_TOOLS=GCC49
         ;;
       *)
-        TARGET_TOOLS=GCC44
+        TARGET_TOOLS=GCC5
         ;;
     esac
 esac