public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "wang xiaofeng" <winggundum82@163.com>
To: "Andrew Fish" <afish@apple.com>
Cc: "Gao, Liming" <liming.gao@intel.com>,
	edk2-devel <edk2-devel@lists.01.org>
Subject: Re: How to build commonlib of Basetools in x64 mode
Date: Fri, 23 Dec 2016 13:02:33 +0800 (CST)	[thread overview]
Message-ID: <439d5ef7.5a1b.1592a0f28f2.Coremail.winggundum82@163.com> (raw)
In-Reply-To: <0B268819-E944-4867-97BC-2E763AE1597A@apple.com>

Thanks Liming And FIsh,
   I will try your suggestion.






&#65533;&#65533; 2016-12-23 12:54:23&#65533;&#65533;"Andrew Fish" <afish@apple.com> д&#65533;&#65533;&#65533;&#65533;


On Dec 22, 2016, at 8:39 PM, Gao, Liming <liming.gao@intel.com> 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:edk2-devel-bounces@lists.01.org] On Behalf Of
wang xiaofeng
Sent: Friday, December 23, 2016 12:16 PM
To: Andrew Fish <afish@apple.com>
Cc: edk2-devel <edk2-devel@lists.01.org>
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" <afish@apple.com> 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 <winggundum82@163.com>
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
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



  reply	other threads:[~2016-12-23  5:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 18:25 [PATCH] ShellPkg: Add acpiview tool to dump ACPI tables evan.lloyd
2016-12-19  9:48 ` Ni, Ruiyu
2016-12-19 15:57   ` Evan Lloyd
2016-12-19 18:01     ` Carsey, Jaben
2016-12-20  2:59       ` Ni, Ruiyu
2016-12-20  3:56         ` Carsey, Jaben
2016-12-20  4:49           ` Yao, Jiewen
2016-12-20  5:18             ` Ni, Ruiyu
2016-12-20  5:54               ` Yao, Jiewen
2016-12-20 13:20                 ` Evan Lloyd
2016-12-20 16:35                   ` Yao, Jiewen
2016-12-22 18:25                     ` Evan Lloyd
2016-12-23  1:31                       ` Yao, Jiewen
2017-01-13  8:10                         ` Bhupesh SHARMA
2017-01-13 13:26                           ` Yao, Jiewen
2016-12-23  3:35                     ` How to build commonlib of Basetools in x64 mode wang xiaofeng
     [not found]                       ` <CE7102C6-78B7-4631-8641-AF27FFAB52FE@apple.com>
2016-12-23  4:15                         ` wang xiaofeng
     [not found]                           ` <4A89E2EF3DFEDB4C8BFDE51014F606A14D6C3866@shsmsx102.ccr.corp.intel.com>
2016-12-23  4:54                             ` Andrew Fish
2016-12-23  5:02                               ` wang xiaofeng [this message]
2016-12-23  5:09                               ` Gao, Liming
2016-12-20 12:22         ` [PATCH] ShellPkg: Add acpiview tool to dump ACPI tables Evan Lloyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=439d5ef7.5a1b.1592a0f28f2.Coremail.winggundum82@163.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox