Andrew: Yes. Linux Makefile supports IA32 and X64 both. Windows Makefile supports IA32. Low level Makefile does handle IA32 and X64. But, BaseTools C source codes are not verified. So now, 64bit Windows BaseTools C tools are not enabled.
Thanks Liming From: [email protected] [mailto:[email protected]] Sent: Friday, December 23, 2016 12:54 PM To: wang xiaofeng <[email protected]>; Gao, Liming <[email protected]> Cc: edk2-devel <[email protected]> Subject: Re: [edk2] How to build commonlib of Basetools in x64 mode On Dec 22, 2016, at 8:39 PM, Gao, Liming <[email protected]<mailto:[email protected]>> wrote: Xiaofeng: BaseTools Windows Makefile (BaseTools\Source\C\Makefile) sets ARCH = IA32. 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=X64, and try building BaseTools with 64bit VS compiler. If you meet with warning or error, you can 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)"=="IA32" ARCH_INCLUDE = $(SOURCE_PATH)\Include\Ia32 BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win32 LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win32 SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win32 SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win32 !ENDIF !IF "$(ARCH)"=="X64" ARCH_INCLUDE = $(SOURCE_PATH)\Include\X64 BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win64 LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win64 SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win64 SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win64 !ENDIF Thanks, Andrew Fish Thanks Liming -----Original Message----- From: edk2-devel [mailto:[email protected]] On Behalf Of wang xiaofeng Sent: Friday, December 23, 2016 12:16 PM To: Andrew Fish <[email protected]<mailto:[email protected]>> Cc: edk2-devel <[email protected]<mailto:[email protected]>> 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 it possible to build common.lib in X64 mode? Thanks in advance! At 2016-12-23 11:59:38, "Andrew Fish" <[email protected]<mailto:[email protected]>> 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. Sent from my iPhone On Dec 22, 2016, at 7:35 PM, wang xiaofeng <[email protected]<mailto:[email protected]>> 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 ,this 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 [email protected]<mailto:[email protected]> https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected]<mailto:[email protected]> https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected]<mailto:[email protected]> https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

