diff options
-rwxr-xr-x | acprep | 10 | ||||
-rw-r--r-- | lib/Makefile | 1 | ||||
-rwxr-xr-x | lib/build.sh | 17 |
3 files changed, 26 insertions, 2 deletions
@@ -1016,8 +1016,14 @@ class PrepareBuild(CommandLineApp): self.envvars['PYTHON_HOME'] = '/opt/local' if self.options.use_clang: - self.boost_inc_ident = "clang" - self.boost_lib_ident = "clang-darwin28" + self.log.info('Setting up for using Clang') + + self.boost_inc_ident = "clang31" + self.boost_lib_ident = "clang-darwin42" + + #self.CXXFLAGS.append('-std=c++11') + #self.CXXFLAGS.append('-stdlib=libc++') + #self.LDFLAGS.append('-stdlib=libc++') global search_prefixes search_prefixes = [ '/opt/local', '/usr/local', '/sw', '/usr' ] diff --git a/lib/Makefile b/lib/Makefile index 0f740996..ba7f5ffa 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -49,6 +49,7 @@ all: boost-build #icu-build boost-icu-build prepare-boost: perl -i -pe 's/local command = \[ common\.get-invocation-command darwin : g\+\+ : .*/local command = [ common.get-invocation-command darwin : g++ : $(CXX) ] ;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam perl -i -pe 's/flags darwin\.compile OPTIONS : -no-cpp-precomp -gdwarf-2 (-fexceptions )?;/flags darwin\.compile OPTIONS : -gdwarf-2 \1;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam + perl -i -pe 's/command = \[ common\.get-invocation-command clang-darwin : clang\+\+ $$/command = [ common.get-invocation-command clang-darwin : clang++-mp-3.1/;' $(BOOST_SOURCE)/tools/build/v2/tools/clang-darwin.jam boost-build: prepare-boost (cd $(BOOST_SOURCE) && \ diff --git a/lib/build.sh b/lib/build.sh new file mode 100755 index 00000000..2d18dc58 --- /dev/null +++ b/lib/build.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# This build script is for OS X Lion users who have compiled openmpi and +# clang-3.1 from MacPorts. I build my own Boost instead of using MacPorts' +# Boost in order to get better debugging support, and to link with libc++. + +export PATH=$PATH:/opt/local/lib/openmpi/bin + +cat > ~/user-config.jam <<EOF +using clang-darwin : : "/opt/local/bin/clang++-mp-3.1" : <cxxflags>-std=c++11 ; +EOF + +make CXX=clang++-mp-3.1 LD=clang++-mp-3.1 CC=clang-mp-3.1 OPTJ=-j16 \ + CXXFLAGS="-g -std=c++11 -stdlib=libc++" \ + LDFLAGS="-g -stdlib=libc++" \ + BOOST_TOOLSET=clang DIR_SUFFIX=clang31 \ + BOOST_DEFINES="include=/opt/local/include -sICU_PATH=/opt/local -sICONV_PATH=/opt/local cxxflags=\"-g -std=c++11 -stdlib=libc++\" linkflags=\"-g -stdlib=libc++\""
\ No newline at end of file |