From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 63A9682411 for ; Thu, 22 Dec 2016 21:09:52 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP; 22 Dec 2016 21:09:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,391,1477983600"; d="scan'208,217";a="1085801583" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 22 Dec 2016 21:09:48 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 22 Dec 2016 21:09:48 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 22 Dec 2016 21:09:48 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Fri, 23 Dec 2016 13:09:45 +0800 From: "Gao, Liming" To: "afish@apple.com" , wang xiaofeng CC: edk2-devel Thread-Topic: [edk2] How to build commonlib of Basetools in x64 mode Thread-Index: AQHSXM2r2VUU5qZcmkydG/dPlV0v26EUYj4AgAAEggCAAIpGgP//gISAgACHrwA= Date: Fri, 23 Dec 2016 05:09:44 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6C38C1@shsmsx102.ccr.corp.intel.com> References: <20161216182547.616-1-evan.lloyd@arm.com> <734D49CCEBEEF84792F5B80ED585239D5B836C04@SHSMSX103.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5B8371E1@SHSMSX103.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503A8C6C52@shsmsx102.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5B839479@SHSMSX103.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503A8C6CBD@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503A8C7026@shsmsx102.ccr.corp.intel.com> <741a147f.4b30.15929bf7db2.Coremail.winggundum82@163.com> <70539f18.53f1.15929e451fd.Coremail.winggundum82@163.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D6C3866@shsmsx102.ccr.corp.intel.com> <0B268819-E944-4867-97BC-2E763AE1597A@apple.com> In-Reply-To: <0B268819-E944-4867-97BC-2E763AE1597A@apple.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: How to build commonlib of Basetools in x64 mode 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, 23 Dec 2016 05:09:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Andrew: Yes. Linux Makefile supports IA32 and X64 both. Windows Makefile support= s IA32. Low level Makefile does handle IA32 and X64. But, BaseTools C sourc= e codes are not verified. So now, 64bit Windows BaseTools C tools are not e= nabled. Thanks Liming From: afish@apple.com [mailto:afish@apple.com] Sent: Friday, December 23, 2016 12:54 PM To: wang xiaofeng ; Gao, Liming Cc: edk2-devel Subject: Re: [edk2] How to build commonlib of Basetools in x64 mode On Dec 22, 2016, at 8:39 PM, Gao, Liming > wrote: Xiaofeng: BaseTools Windows Makefile (BaseTools\Source\C\Makefile) sets ARCH =3D IA= 32. It means BaseTools C tool passes IA32 arch only in Windows OS. I don't = try building it with X64 arch. You can update ARCH=3DX64, and try building = BaseTools with 64bit VS compiler. If you meet with warning or error, you ca= n try to clean up them. The Unix BaseTools makefile build for multiple architectures based on what= they detect. So the build should generically be clean for X64. https://sourceforge.net/p/edk2/code/HEAD/tree/trunk/edk2/BaseTools/Source/= C/GNUmakefile https://sourceforge.net/p/edk2/code/HEAD/tree/trunk/edk2/BaseTools/Source/= C/Makefiles/header.makefile If Windows is hard coded to IA32 lookout for a hard code include path to = $(MAKEROOT)/Include/Ia32/ as the Unix makes set that dynamically. Actually it looks like the lower level Windows tries to do the right thing= for X64? https://sourceforge.net/p/edk2/code/HEAD/tree/trunk/edk2/BaseTools/Source/= C/Makefiles/ms.common !IF "$(ARCH)"=3D=3D"IA32" ARCH_INCLUDE =3D $(SOURCE_PATH)\Include\Ia32 BIN_PATH =3D $(BASE_TOOLS_PATH)\Bin\Win32 LIB_PATH =3D $(BASE_TOOLS_PATH)\Lib\Win32 SYS_BIN_PATH =3D $(EDK_TOOLS_PATH)\Bin\Win32 SYS_LIB_PATH =3D $(EDK_TOOLS_PATH)\Lib\Win32 !ENDIF !IF "$(ARCH)"=3D=3D"X64" ARCH_INCLUDE =3D $(SOURCE_PATH)\Include\X64 BIN_PATH =3D $(BASE_TOOLS_PATH)\Bin\Win64 LIB_PATH =3D $(BASE_TOOLS_PATH)\Lib\Win64 SYS_BIN_PATH =3D $(EDK_TOOLS_PATH)\Bin\Win64 SYS_LIB_PATH =3D $(EDK_TOOLS_PATH)\Lib\Win64 !ENDIF Thanks, Andrew Fish Thanks Liming -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of wang xiaofeng Sent: Friday, December 23, 2016 12:16 PM To: Andrew Fish > Cc: edk2-devel > Subject: Re: [edk2] How to build commonlib of Basetools in x64 mode HI Fish, Thanks for your answer. Actually I am not trying to build base tools . I= am writing a windows console tool and want to reuse some code of base tools common library, All the changes will be in my platform packages, Due to some history reason , my own tool is treating UINTN as x64 mode, so will i= t possible to build common.lib in X64 mode? Thanks in advance! At 2016-12-23 11:59:38, "Andrew Fish" > wrote: The base tools width could be OS Specific so you should not depend on it. = In other words it has nothing to do with your ROM. You should code tools to exact sizes, and only use UINTN if you don't care about size. On Dec 22, 2016, at 7:35 PM, wang xiaofeng > wrote: Hi Base tool owners, I tried to build commonlib in basetools . And use the library file in my own application tool . I just found the commonlib is build in IA32 mode ,t= his means UINTN is 4 byte in the output lib. I expect to build a X64 mode Common.lib ,can you help me? Or base tools can only run in IA32 mode? _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel