title: How can I compile Boost 1.54.0 (1.54) for the iOS simulator (6.1) on OS X 10.8.4?
body: <p>I have successfully managed to compile several of the Boost libraries and create a framework for use with OS X, iOS, and the iOS simulator using this script: <a href="https://github.com/wuhao5/boost/blob/188e905626dbd522f65950102ed0c8ce77cb28e8/boost.sh">https://github.com/wuhao5/boost/blob/188e905626dbd522f65950102ed0c8ce77cb28e8/boost.sh</a> based on Peter Goodliffe's work here: <a href="http://goodliffe.blogspot.com/2010/09/building-boost-framework-for-ios-iphone.html">http://goodliffe.blogspot.com/2010/09/building-boost-framework-for-ios-iphone.html</a> with Boost <strong>1.53.0</strong> using clang and linking against libc++.</p>
  
  <p>The script fails when compiling for the iOS simulator with Boost <strong>1.54.0</strong> with the following error:<code>/bin/sh: line 1: -ftemplate-depth-128: command not found</code>.</p>
  
  <p>I did quite a bit of digging and here is what I know:</p>
  
  <ul>
  <li>In boost.sh, the iOS simulator bjam and compiler options include "-arch i386"</li>
  <li>The release notes for Boost 1.54.0 state that "Boost no longer supports the 80386 target CPU"</li>
  <li>Boost 1.53.0 appears to compile fine for OS X, iOS, and the iOS simulator using the same script</li>
  <li>Boost 1.54.0 appears to compile fine for OS X and iOS itself using the same script</li>
  </ul>
  
  <p>Here is what I think I know:</p>
  
  <ul>
  <li>When passing "-d13" to bjam (to generate debug information), it appears that the variable "CONFIG_COMMAND" is not being set when building for the iOS simulator.  For the other configurations, this variable is set to the path to clang and includes the compiler options.  For the simulator, it is empty which I believe leads to the error above as when bjam attempts to run the compiler using this variable, it instead runs some appended options which begin with the template depth.  Therefore, the CONFIG_COMMAND variable does not appear to be being set properly causing the failure.</li>
  </ul>
  
  <p>I have no idea why it's not being set as I don't know enough about the Boost build system to sift through the rest of the 100+MB output it generated with the "-d13" flag.  I suspect an incompatibility with the "-arch i386" option was introduced with 1.54.0.  I've tried changing this to "-arch i486" and "-arch x86_32" but the same problem occurs.</p>
  
  <p>Has anyone else had success with this?  I'd like to use Boost.Log which is why I'm even attempting this.</p>