[edk2-devel] [edk2-platforms Patch 04/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the gcc version detection

Michael D Kinney posted 28 patches 6 years, 7 months ago
[edk2-devel] [edk2-platforms Patch 04/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the gcc version detection
Posted by Michael D Kinney 6 years, 7 months ago
From: Gary Lin <glin@suse.com>

Borrow the logic from OvmfPkg/build.sh

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index bca112db2b..d312063428 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -170,12 +170,19 @@ sed -i '/^MAX_CONCURRENT_THREAD_NUMBER/d' Conf/target.txt
 
 gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
 case $gcc_version in
-    4.9.*|4.1[0-9].*|5.*.*|6.*.*)
-      TARGET_TOOLS=GCC49
-      ;;
-    *)
-      TARGET_TOOLS=GCC48
-      ;;
+      [1-3].*|4.[0-7].*)
+        echo MNW2 requires GCC4.8 or later
+        exit 1
+        ;;
+      4.8.*)
+        TARGET_TOOLS=GCC48
+        ;;
+      4.9.*|6.[0-2].*)
+        TARGET_TOOLS=GCC49
+        ;;
+      *)
+        TARGET_TOOLS=GCC5
+        ;;
 esac
 
 ACTIVE_PLATFORM=$PLATFORM_PACKAGE/PlatformPkgGcc"$Arch".dsc
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43498): https://edk2.groups.io/g/devel/message/43498
Mute This Topic: https://groups.io/mt/32419731/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms Patch 04/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the gcc version detection
Posted by Sun, Zailiang 6 years, 7 months ago
Reviewed-By: Zailiang Sun <zailiang.sun@intel.com>

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin <glin@suse.com>; Sun, Zailiang <zailiang.sun@intel.com>; Qian,
> Yi <yi.qian@intel.com>
> Subject: [edk2-platforms Patch 04/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update
> the gcc version detection
> 
> From: Gary Lin <glin@suse.com>
> 
> Borrow the logic from OvmfPkg/build.sh
> 
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Gary Lin <glin@suse.com>
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index bca112db2b..d312063428 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -170,12 +170,19 @@ sed -i '/^MAX_CONCURRENT_THREAD_NUMBER/d'
> Conf/target.txt
> 
>  gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')  case $gcc_version in
> -    4.9.*|4.1[0-9].*|5.*.*|6.*.*)
> -      TARGET_TOOLS=GCC49
> -      ;;
> -    *)
> -      TARGET_TOOLS=GCC48
> -      ;;
> +      [1-3].*|4.[0-7].*)
> +        echo MNW2 requires GCC4.8 or later
> +        exit 1
> +        ;;
> +      4.8.*)
> +        TARGET_TOOLS=GCC48
> +        ;;
> +      4.9.*|6.[0-2].*)
> +        TARGET_TOOLS=GCC49
> +        ;;
> +      *)
> +        TARGET_TOOLS=GCC5
> +        ;;
>  esac
> 
>  ACTIVE_PLATFORM=$PLATFORM_PACKAGE/PlatformPkgGcc"$Arch".dsc
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43559): https://edk2.groups.io/g/devel/message/43559
Mute This Topic: https://groups.io/mt/32419731/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-