From: Bram R. <bra...@nx...> - 2009-10-30 16:37:43
|
Hi all, Done in MTK development repository: support for 64 bit using "make ARCH=64" Added support for 64 bit Linux as Linux64 target. This also implies explicit 32 bit for our long-existing "Linux" target. Consequently, compiler versions 4.x.x can be used on the NXP engineering environment that is running 64 bit Linux machines. Further, support for win64 using "make COMP=msvc ARCH=64". More details in this excerpt of the Readme.txt file 64 bit code generation ---------------------- Some of the compilers support compilation of 64 bit code (whereas 32 bit code is the default). Note that 32 bits code runs without any problem on a 64 bits machine architecture (with or without a 64 bits OS). On the other hand, 64 bits code runs only on a 64 bits machine with a 64 bits OS. In praktice, 64 bit code is only usefull if an application requires a huge amount of memory (> 2 Gbyte). gcc Supports generation of 32 or 64 bits with the option -m32 or -m64 respectively. Default depends on the platform, e.g. on a 64 bits Linux machine, the default is typically 64 bits codegenerations. Support for cross compilation to 32 bits (or vv. on a 32 bits machine) depends on build options when compiling gcc itself. Check your compiler version whether cross compilation is supported. msvc 64 bit code generation is supported starting with version 8.0 "Microsoft Visual Studio 2005/.Net Framework 2.0". Size of standard C types is as follows: int long pointer size_t time_t gcc 32 32 32 32 32 32 gcc 64 32 64 64 64 64 msvc 32 32 32 32 32 32/64 *) msvc 64 32 32 64 64 64 *) 32 bits for msvc older than version 2005; 64 bits othwise For correct behavior of the application, it must be robust against these variations. E.g. storing a pointer value in an int works correctly in gcc 32 bits application, but will fail in a gcc 64 bit application. The msvc compiler uses environment variables INCLUDE for the list of standard include directories, and LIB for the list of standard library directories. Since the msvc compiler requires a different set of libraries for the 64 bit build, an extra environment variable is used by MTK as substitute for the normal LIB value: LIB64. Changes: - A new build option ARCH is added. Default: ARCH=32, which is compatible with all previous behaviour. It is available for a limited number of compilers: + COMP=gcc ARCH=64: generation of 64 bits code as platform "Linux64" + COMP=msvc ARCH=64: generation of 64 bits code as platform "win64" MTK help text and dump output is adapted accordingly. Note that the souce code must be suitable for 64 bits compilation in order to behave "polite" - see section "64 bit code generation" above. Further, 64 bits code for msvc is implemented and tested on "Microsoft(r) Windows(r) Software Development Kit Update for Windows Vista" (containing the same compiler version as "Microsoft Visual Studio 2005") - The msvc compiler uses an environment variable LIB containing a list of standard library directories. For 64 bit compilation, MTK requires an environment variable LIB64 containing equivalent list for 64 bit libraries. This must be defined by the user. PS: for your information, win32/win64 is tested on Microsoft(r) Windows(r) Software Development Kit Update for Windows Vista Download available from: http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en This includes the same compiler as visual studio version 2005. Setup information: - ~/.bash_profile # This script will be executed each time you login to the system and # you are in the bourne ( sh ) or korn ( ksh ) shell. # Cygwin execution only! # Windows SDK Settings version vista/v6.0 - same compiler as visual studio version 2005 MSVC1=`cygpath "C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\Bin"` PATH=$MSVC1:$PATH Note that this also adds the MS visual studio commands in front of the unix commands. In older MTK version, this was required to use the "link" command to build an executable. Now you may choose differently. - C:\cygwin\cygwin.bat REM Windows SDK settings version vista/v6.0 - same compiler as visual studio version 2005 set INCLUDE=C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0\Include set LIB=C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\LIB;C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib set LIB64=C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\LIB\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib\x64 REM PATH setting is adapted in ~/.bash_profile Tot ziens / Kind regards, Bram -- Bram Riemens Senior Principal, Corporate I&T / Research NXP Semiconductors High Tech Campus 32 (floor 1, office 138), 5656 AE Eindhoven, The Netherlands Tel: +31 40 27 25910; Fax: +31 40 27 28504 Email: bra...@nx... The information contained in this message is confidential and may be legally privileged. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. Unless otherwise recorded in a written agreement, all sales transactions by NXP Semiconductors are subject to our general terms and conditions of commercial sale. These are published at www.nxp.com/profile/terms/index.html<http://www.nxp.com/profile/terms/index.html> |