diff options
author | Kenneth Heafield <github@kheafield.com> | 2014-03-11 22:29:40 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2014-03-11 22:29:40 +0400 |
commit | 8ae4d153c89f11e422efd9effa5f422ff141c3c7 (patch) | |
tree | f536b98791e4a418e4dd1b88eb304cd9dc035587 /util/Jamfile | |
parent | e1d8f5c2aed59a9155eeeb3fb3429f7569ca679e (diff) |
Consolidated, consistent rt target fixes single-threaded build
Diffstat (limited to 'util/Jamfile')
-rw-r--r-- | util/Jamfile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/util/Jamfile b/util/Jamfile index c292e0da3..d4996e483 100644 --- a/util/Jamfile +++ b/util/Jamfile @@ -11,8 +11,13 @@ if [ test_library "lzma" ] && [ test_header "lzma.h" ] { compressed_deps += lzma ; } -#rt is needed for clock_gettime on linux. But it's already included with threading=multi -lib rt ; +local have-clock = [ SHELL "bash -c \"g++ -dM -x c++ -E /dev/null -include time.h 2>/dev/null |grep CLOCK_MONOTONIC\"" : exit-status ] ; +if $(have-clock[2]) = 0 { + #required for clock_gettime. Threads already have rt. + lib rt : : <runtime-link>static:<link>static <runtime-link>shared:<link>shared ; +} else { + alias rt ; +} obj read_compressed.o : read_compressed.cc : $(compressed_flags) ; alias read_compressed : read_compressed.o $(compressed_deps) ; |