title: Setup toolset configuration for building boost libraries on Mac with g++ 4.8
body: <p>I'm trying to build boost libraries on Mac with g++4.8 installed from port.</p>
  
  <p>I made ~/user-config.jam and added one line <code>using gcc : : g++-mp-4.8 ;</code> go use the g++ 4.8 compiler. I have bjam and b2 installed with <code>brew install bjam</code>. </p>
  
  <p>The issue is that when I build boost with <code>b2</code> command, I have this link error:</p>
  
  <pre><code>ld: unknown option: -R
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>It's because g++4.8 can't recognize the -R option as Apple's g++ 4.2 does. </p>
  
  <p>How can I set the build options for g++4.8? This is the command that b2 uses. I have <a href="http://www.boost.org/doc/display_build.php/boost-build/boost-build/doc/html/bbv2/overview/configuration.html" rel="nofollow">this site</a> for configuration information, but I couldn't find useful information for setting up toolset configuration. </p>
  
  <pre><code>"g++-mp-4.8"  -Wl,-R -Wl,"/System/Library/Frameworks/Python.framework/Versions/2.7/lib" 
  -Wl,-R -Wl,"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config"  -o 
  "stage/lib/libboost_system.dylib" -Wl,-h -Wl,libboost_system.dylib -shared -Wl,--start-group 
  "bin.v2/libs/system/build/gcc-4.8.0/release/threading-multi/error_code.o"  -Wl,-Bstatic  -Wl,
  -Bdynamic  -Wl,--end-group  
  </code></pre>