OpenGamma/OG-Maths — pull request #132 by stuartarchibald (2014-09-25 10:38:52+00:00)
Title: MAT-475 Fix OSX libstdc++ linkage issues

Testing [MAT-474](https://opengamma.atlassian.net/browse/MAT-474) (assemble license docs into jar) highlighted that the OSX build is suffering from a problem where libraries linked with GCC's `-static-libc++` are still being dynamic linked to `libstdc++`. This ended up being a massive trudge through GCC and OSX system internals, the eventual fix is a return to dynamic linking on OSX only.

This changeset:
* Updates the GCC location on the OSX syslib builder as GCC 4.9.1 is now the version unified across the entire build system.
* Fixes up some instances of catching by value opposed to reference.
* Adds a missing `toString()` to `ComplexArrayContainer` that was needed during debugging.
* Switches OSX to use dynamic linking for `libstdc++` and to link using the 2 layer namespace.

A more thorough explanation for the last item is given in the commit message of e2e97ba. Basically, GCC bug, a few possible visibility bugs, a leaky system library and a raft of unknowns makes dynamic linking for `libstdc++` the sensible option on OSX at the present time.

Coverage:
No change worth reporting.