From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4655A1A1E2D for ; Thu, 28 Jul 2016 20:25:56 -0700 (PDT) Received: from GaryWorkstation.apac.novell.com (ip-203-192-156-9.asianetcom.net [203.192.156.9]) by smtp.nue.novell.com with ESMTP (NOT encrypted); Fri, 29 Jul 2016 05:25:52 +0200 From: Gary Lin To: edk2-devel@lists.01.org Cc: David Wei , "Wu, Hao A" , "Lu, ShifeiX A" Date: Fri, 29 Jul 2016 11:25:20 +0800 Message-Id: <20160729032538.17730-2-glin@suse.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160729032538.17730-1-glin@suse.com> References: <20160729032538.17730-1-glin@suse.com> Subject: [PATCH v2 01/19] Vlv2TbltDevicePkg: Amend the build script X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 03:25:56 -0000 Take the gcc version detection from OvmfPkg/build.sh instead of the hardcoded GCC46. Cc: David Wei Cc: "Wu, Hao A" Cc: "Lu, ShifeiX A" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin Reviewed-by: David Wei --- Vlv2TbltDevicePkg/bld_vlv.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Vlv2TbltDevicePkg/bld_vlv.sh b/Vlv2TbltDevicePkg/bld_vlv.sh index 569865f..538b3ef 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 -- 2.9.2