Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Statically link in libstdc++ on crays for the compiler and llvm
For crays, and particularly the module release, the compiler (and llvm) could have been built with a newer version of gcc than is being used when a user invokes `chpl`. In the past we set an rpath to /opt/cray/gcc-libs and /opt/cray/pe/gcc-libs, but that only works for non-gnu PrgEnv's. gnu sets an LD_LIBRARY_PATH that takes precedence over our rpath, so if a user is using an older version of gcc than the one the compiler was built with they'll get undefined references to GLIBCXX because the libstdc++ that the compiler was built with won't be found at dynamic load time. To work around this, we now statically link in libstdc++ for the compiler and llvm so that it doesn't matter what libstdc++ is around at `chpl` invocation time. Note that longer term we might want to consider making the chpl binary totally static to avoid similar issues with any other libs. Currently that leads to some issues because we do use some routines in libnss such as geteuid() (libnss can't really be statically linked in)
- Loading branch information