From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8135581D3E for ; Thu, 3 Nov 2016 03:32:17 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 03 Nov 2016 03:32:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,438,1473145200"; d="scan'208";a="1063335310" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.144]) by fmsmga001.fm.intel.com with ESMTP; 03 Nov 2016 03:32:18 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao Date: Thu, 3 Nov 2016 18:32:13 +0800 Message-Id: <1478169133-20012-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: Fix the Windows GCC Build Failure with too long path 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: Thu, 03 Nov 2016 10:32:17 -0000 When path is too long, build tool will wrap them into resp.txt, then call gcc @resp.txt. It will cause windows GCC build failure, because resp.txt still uses windows directory separator \. This patch change the \ to /. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/GenMake.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index c8c5fc5..51c5238 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -766,11 +766,15 @@ cleanlib: if (Value.find(MacroName) != -1): Value = Value.replace(MacroName, self._AutoGenObject.Macros[macro]) break else: break - RespDict[Key] = Value + + if self._AutoGenObject.ToolChainFamily == 'GCC': + RespDict[Key] = Value.replace('\\', '/') + else: + RespDict[Key] = Value for Target in BuildTargets: for i, SingleCommand in enumerate(BuildTargets[Target].Commands): if FlagDict[Flag]['Macro'] in SingleCommand: BuildTargets[Target].Commands[i] = SingleCommand.replace('$(INC)','').replace(FlagDict[Flag]['Macro'], RespMacro) return RespDict -- 2.6.1.windows.1