Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#6741 closed Feature Requests (fixed)

Compile with VC11 arm

Reported by: gongminmin@… Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

VC11 supports ARM compiler. However, the <architecture> of msvc toolset contains only x86, x64, and ia64. Could ARM arch be added?

Change History (8)

comment:1 by gongminmin@…, 11 years ago

I tried for a couple times and it works. The patch looks like this. endian.hpp and msvc.jam are modified.

diff -r efe34d4e1051 boost/boost/detail/endian.hpp
--- a/boost/boost/detail/endian.hpp	Thu Mar 29 16:28:11 2012 +0800
+++ b/boost/boost/detail/endian.hpp	Thu Mar 29 19:25:44 2012 +0800
@@ -66,7 +66,7 @@
    || defined(_M_ALPHA) || defined(__amd64) \
    || defined(__amd64__) || defined(_M_AMD64) \
    || defined(__x86_64) || defined(__x86_64__) \
-   || defined(_M_X64) || defined(__bfin__)
+   || defined(_M_X64) || defined(__bfin__) || defined(_M_ARM)
 
 # define BOOST_LITTLE_ENDIAN
 # define BOOST_BYTE_ORDER 1234
diff -r efe34d4e1051 boost/tools/build/v2/tools/msvc.jam
--- a/boost/tools/build/v2/tools/msvc.jam	Thu Mar 29 16:28:11 2012 +0800
+++ b/boost/tools/build/v2/tools/msvc.jam	Thu Mar 29 19:25:44 2012 +0800
@@ -126,6 +126,7 @@
     #   <setup-amd64>
     #   <setup-i386>
     #   <setup-ia64>
+    #   <setup-arm>
     #       Platform specific setup command to invoke before running any of the
     #     msvc tools used when builing a target for a specific platform, e.g.
     #     when building a 32 or 64 bit executable.
@@ -261,7 +262,8 @@
         toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-amd64) : /MACHINE:X64 ;
         toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-i386)  : /MACHINE:X86 ;
         toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-ia64)  : /MACHINE:IA64 ;
-        
+        toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-arm)  : /MACHINE:ARM ;
+
         # Make sure that manifest will be generated even if there is no
         # dependencies to put there.
         toolset.flags $(toolset).link LINKFLAGS $(conditions)/<embed-manifest>off : /MANIFEST ;
@@ -771,7 +773,7 @@
 
         local below-8.0 = [ MATCH ^([67]\\.) : $(version) ] ;
 
-        local cpu = i386 amd64 ia64 ;
+        local cpu = i386 amd64 ia64 arm ;
         if $(below-8.0)
         {
             cpu = i386 ;
@@ -780,6 +782,7 @@
         local setup-amd64 ;
         local setup-i386 ;
         local setup-ia64 ;
+        local setup-arm ;
 
         if $(command)
         {
@@ -833,6 +836,7 @@
             local default-setup-amd64 = vcvarsx86_amd64.bat ;
             local default-setup-i386  = vcvars32.bat ;
             local default-setup-ia64  = vcvarsx86_ia64.bat ;
+            local default-setup-arm   = vcvarsx86_arm.bat ;
 
             # http://msdn2.microsoft.com/en-us/library/x4d2c09s(VS.80).aspx and
             # http://msdn2.microsoft.com/en-us/library/x4d2c09s(vs.90).aspx
@@ -841,6 +845,7 @@
             local default-global-setup-options-amd64 = x86_amd64 ;
             local default-global-setup-options-i386  = x86 ;
             local default-global-setup-options-ia64  = x86_ia64 ;
+            local default-global-setup-options-arm   = x86_arm ;
 
             # When using 64-bit Windows, and targeting 64-bit, it is possible to
             # use a native 64-bit compiler, selected by the "amd64" & "ia64"
@@ -922,6 +927,7 @@
         local default-assembler-amd64 = ml64 ;
         local default-assembler-i386  = "ml -coff" ;
         local default-assembler-ia64  = ias ;
+        local default-assembler-ia64  = armasm ;
 
         assembler = [ feature.get-values <assembler> : $(options) ] ;
 
@@ -1332,6 +1338,9 @@
     <architecture>ia64/<address-model>
     <architecture>ia64/<address-model>64 ;
 
+.cpu-arch-arm =
+    <architecture>arm/<address-model>32 ;
+
 
 # Supported CPU types (only Itanium optimization options are supported from
 # VC++ 2005 on). See
@@ -1351,7 +1360,7 @@
 
 
 # Known toolset versions, in order of preference.
-.known-versions = 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;
+.known-versions = 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;
 
 # Version aliases.
 .version-alias-6 = 6.0 ;
@@ -1360,6 +1369,7 @@
 .version-alias-8 = 8.0 ;
 .version-alias-9 = 9.0 ;
 .version-alias-10 = 10.0 ;
+.version-alias-11 = 11.0 ;
 
 # Names of registry keys containing the Visual C++ installation path (relative
 # to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
@@ -1372,6 +1382,7 @@
 .version-9.0express-reg = "VCExpress\\9.0\\Setup\\VC" ;
 .version-10.0-reg = "VisualStudio\\10.0\\Setup\\VC" ;
 .version-10.0express-reg = "VCExpress\\10.0\\Setup\\VC" ;
+.version-11.0-reg = "VisualStudio\\11.0\\Setup\\VC" ;
 
 # Visual C++ Toolkit 2003 does not store its installation path in the registry.
 # The environment variable 'VCToolkitInstallDir' and the default installation

comment:2 by gongminmin@…, 11 years ago

Also, boost/boost/intrusive/detail/mpl.hpp needs to be patched

diff -r 8cbd36d620d8 boost/boost/intrusive/detail/mpl.hpp --- a/boost/boost/intrusive/detail/mpl.hpp Thu Mar 29 19:35:34 2012 +0800 +++ b/boost/boost/intrusive/detail/mpl.hpp Fri Mar 30 14:30:47 2012 +0800 @@ -130,7 +130,7 @@

#define BOOST_INTRUSIVE_TT_DECL #endif

-#if defined(_MSC_EXTENSIONS) && !defined(BORLAND) && !defined(_WIN64) +#if defined(_MSC_EXTENSIONS) && !defined(BORLAND) && !defined(_WIN64) && !defined(_M_ARM)

#define BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS #endif

comment:3 by viboes, 10 years ago

Component: Building Boostbuild
Owner: set to Vladimir Prus

comment:4 by Steven Watanabe, 10 years ago

(In [83489]) Add support for architecture=arm. Refs #6741.

comment:5 by Steven Watanabe, 10 years ago

Resolution: fixed
Status: newclosed

boost/detail/endian.hpp and boost/intrusive/detail/mpl.hpp have been fixed already.

comment:6 by anonymous, 10 years ago

after applying patches over 1.53 release we see some linkage problems

msvc.archive bin.v2\libs\date_time\build\msvc-11.0\debug\architecture-arm\link-static\runtime-link-static\threading-multi\libboost_date_time-vc110-mt-sgd-1_53.lib The filename, directory name, or volume label syntax is incorrect.

procmon shows that during the build some names are indeed invalid, for example:

5:33:12.8545613 PM cmd.exe 8796 CreateFile D:\out:bin.v2\libs\date_time\build\msvc-11.0\release\architecture-arm\link-static\runtime-link-static\threading-multi\ NAME INVALID Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

comment:7 by Steven Watanabe, 10 years ago

I'm guessing that the path is too long. Try building with --hash.

in reply to:  7 comment:8 by anonymous, 10 years ago

Replying to steven_watanabe:

I'm guessing that the path is too long. Try building with --hash.

--hash did not fix that

"D:\out:bin.v2\..." is incorrect path Under Win32 ':' symbol is reserved and used to reference file streams (AFAIK)..

Another example \"\ in the middle of the path:

5:33:12.6374709 PM cmd.exe 9000 QueryOpen D:\Code\3rdParty\boost_1_53_0\"bin.v2\libs\date_time\build\msvc-11.0\release\architecture-arm\link-static\runtime-link-static\threading-multi\gregorian\greg_weekday.obj.rsp" NAME INVALID

Note: See TracTickets for help on using tickets.