diff options
author | Gary Lin <glin@suse.com> | 2016-07-29 11:25:20 +0800 |
---|---|---|
committer | david wei <david.wei@intel.com> | 2016-08-03 11:02:11 +0800 |
commit | 69e16a2870cb546249c3c5271ecef36ee9fb7131 (patch) | |
tree | 4916bc060a473c0688813259ba874a0dfb59bc62 /Vlv2TbltDevicePkg | |
parent | 06eb35402e456066c86f621e566160967b7740ad (diff) | |
download | edk2-platforms-69e16a2870cb546249c3c5271ecef36ee9fb7131.tar.xz |
Vlv2TbltDevicePkg: Amend the build script
Take the gcc version detection from OvmfPkg/build.sh instead of the
hardcoded GCC46.
Cc: David Wei <david.wei@intel.com>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>
Cc: "Lu, ShifeiX A" <shifeix.a.lu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: David Wei <david.wei@intel.com>
Diffstat (limited to 'Vlv2TbltDevicePkg')
-rwxr-xr-x | Vlv2TbltDevicePkg/bld_vlv.sh | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Vlv2TbltDevicePkg/bld_vlv.sh b/Vlv2TbltDevicePkg/bld_vlv.sh index 569865fbd9..538b3ef9d7 100755 --- a/Vlv2TbltDevicePkg/bld_vlv.sh +++ b/Vlv2TbltDevicePkg/bld_vlv.sh @@ -177,8 +177,30 @@ sed -i '/^TARGET_ARCH/d' Conf/target.txt sed -i '/^TOOL_CHAIN_TAG/d' Conf/target.txt 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.5.*) + TARGET_TOOLS=GCC45 + ;; + 4.6.*) + TARGET_TOOLS=GCC46 + ;; + 4.7.*) + TARGET_TOOLS=GCC47 + ;; + 4.8.*) + TARGET_TOOLS=GCC48 + ;; + 4.9.*|4.1[0-9].*|5.*.*|6.*.*) + TARGET_TOOLS=GCC49 + ;; + *) + TARGET_TOOLS=GCC44 + ;; +esac + ACTIVE_PLATFORM=$PLATFORM_PACKAGE/PlatformPkgGcc"$Arch".dsc -TOOL_CHAIN_TAG=GCC46 +TOOL_CHAIN_TAG=$TARGET_TOOLS MAX_CONCURRENT_THREAD_NUMBER=1 echo ACTIVE_PLATFORM = $ACTIVE_PLATFORM >> Conf/target.txt echo TARGET = $TARGET >> Conf/target.txt |