diff --git a/v2/bootstrap.sh b/v2/bootstrap.sh index ddc2c0217..3b681004c 100755 --- a/v2/bootstrap.sh +++ b/v2/bootstrap.sh @@ -1,6 +1,7 @@ #!/bin/sh # Copyright (C) 2005, 2006 Douglas Gregor. # Copyright (C) 2006 The Trustees of Indiana University +# Copyright (C) 2010 Bryce Lelbach # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) @@ -68,6 +69,10 @@ if test "x$TOOLSET" = x; then TOOLSET=gcc ;; + clang* ) + TOOLSET=clang + ;; + sun* ) TOOLSET=sun ;; @@ -78,6 +83,13 @@ if test "x$TOOLSET" = x; then esac fi +case $TOOLSET in + clang*) + TOOLSET=clang + ;; +esac + + rm -f config.log # Build bjam @@ -104,4 +116,4 @@ Bootstrapping is done. To build and install, run: ./bjam install --prefix= -EOF \ No newline at end of file +EOF diff --git a/v2/engine/src/build.jam b/v2/engine/src/build.jam index d53b4928f..f6a2e9c89 100644 --- a/v2/engine/src/build.jam +++ b/v2/engine/src/build.jam @@ -193,6 +193,14 @@ toolset como como : "-o " : -D [ opt --debug : --no_inlining ] -I$(--python-include) -I$(--extra-include) : -L$(--python-lib[1]) -l$(--python-lib[2]) ; +## Clang Linux 2.8+ +toolset clang clang : "-o " : -D + : -Wno-unused -Wno-format + [ opt --release : -Os ] + [ opt --debug : -g -O0 -fno-inline ] + [ opt --profile : -finline-functions -g ] + -I$(--python-include) -I$(--extra-include) + : -L$(--python-lib[1]) -l$(--python-lib[2]) ; ## MacOSX Darwin, using GCC 2.9.x, 3.x toolset darwin cc : "-o " : -D : diff --git a/v2/engine/src/build.sh b/v2/engine/src/build.sh index 3f23fc683..f1fb806d3 100755 --- a/v2/engine/src/build.sh +++ b/v2/engine/src/build.sh @@ -208,6 +208,11 @@ case $BOOST_JAM_TOOLSET in BOOST_JAM_CC=cc ;; + clang*) + BOOST_JAM_CC="clang -Wno-unused -Wno-format" + BOOST_JAM_TOOLSET=clang + ;; + tru64cxx) BOOST_JAM_CC=cc ;; diff --git a/v2/engine/src/modules/order.c b/v2/engine/src/modules/order.c index 54b58cd54..c06f6713b 100644 --- a/v2/engine/src/modules/order.c +++ b/v2/engine/src/modules/order.c @@ -50,8 +50,8 @@ void do_ts(int** graph, int current_vertex, int* colors, int** result_ptr) if (colors[adjacent_vertex] == white) do_ts(graph, adjacent_vertex, colors, result_ptr); - else if (colors[adjacent_vertex] == gray) - ; /* This is loop. Not sure what to do... */ + //else if (colors[adjacent_vertex] == gray) + //; /* This is loop. Not sure what to do... */ } colors[current_vertex] = black; **result_ptr = current_vertex; diff --git a/v2/tools/clang-linux.jam b/v2/tools/clang-linux.jam index 2ab4db559..00ebd1c27 100644 --- a/v2/tools/clang-linux.jam +++ b/v2/tools/clang-linux.jam @@ -71,7 +71,7 @@ rule init ( version ? : command * : options * ) SPACE = " " ; # Declare flags and action for compilation. -toolset.flags clang-linux.compile OPTIONS off : -O0 ; +toolset.flags clang-linux.compile OPTIONS off : ; toolset.flags clang-linux.compile OPTIONS speed : -O3 ; toolset.flags clang-linux.compile OPTIONS space : -Os ; @@ -85,7 +85,7 @@ toolset.flags clang-linux.compile OPTIONS all : -Wall -pedantic ; toolset.flags clang-linux.compile OPTIONS on : -Werror ; toolset.flags clang-linux.compile OPTIONS on : -g ; -toolset.flags clang-linux.compile OPTIONS on : -pg ; +toolset.flags clang-linux.compile OPTIONS on : ; toolset.flags clang-linux.compile OPTIONS off : -fno-rtti ; rule compile.c++ ( targets * : sources * : properties * )