diff options
author | Andrew Morrow <acm@10gen.com> | 2013-06-13 11:07:34 -0400 |
---|---|---|
committer | Andrew Morrow <acm@10gen.com> | 2013-06-14 18:46:22 -0400 |
commit | 5d5116a94ea779c7c4e694bcd74bc5775e98958a (patch) | |
tree | 5ca637428e055d5a934cd2b7b0e3091a97138081 /SConstruct | |
parent | 61a75bebf0c05604e6bc6482833fba1ca68f9384 (diff) | |
download | mongo-5d5116a94ea779c7c4e694bcd74bc5775e98958a.tar.gz |
SERVER-9890 Force the use of gnulink on solaris, since we always link through the compiler
(cherry picked from commit 58f82cf66d180a595c9e6801667c569c6d0eed98)
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 979f9cd47aa..5fb0e83f492 100644 --- a/SConstruct +++ b/SConstruct @@ -311,6 +311,21 @@ env = Environment( BUILD_DIR=variantDir, CONFIGURELOG = '#' + scons_data_dir + '/config.log' ) +# This could be 'if solaris', but unfortuantely that variable hasn't been set yet. +if "sunos5" == os.sys.platform: + # SERVER-9890: On Solaris, SCons preferentially loads the sun linker tool 'sunlink' when + # using the 'default' tools as we do above. The sunlink tool sets -G as the flag for + # creating a shared library. But we don't want that, since we always drive our link step + # through CC or CXX. Instead, we want to let the compiler map GCC's '-shared' flag to the + # appropriate linker specs that it has compiled in. We could (and should in the future) + # select an empty set of tools above and then enable them as appropriate on a per platform + # basis. Until then the simplest solution, as discussed on the scons-users mailing list, + # appears to be to simply explicitly run the 'gnulink' tool to overwrite the Environment + # changes made by 'sunlink'. See the following thread for more detail: + # http://four.pairlist.net/pipermail/scons-users/2013-June/001486.html + env.Tool('gnulink') + + env['_LIBDEPS'] = '$_LIBDEPS_OBJS' if has_option('mute'): |