boost: Fix C++11 build.

* Use default darwin toolset.
  - Used to set toolset as clang in C++11 build, which will override
    darwin settings and fail to increase template depth which is
    required for some of the libraries such as Boost.Log.
* Remove unnecessary "-fPIC" build flag.

Closes Homebrew/homebrew#22942.
master
Xiyue Deng 2013-10-01 00:09:38 -07:00
parent 4f83a745ea
commit 3ba45e3827
1 changed files with 1 additions and 4 deletions

View File

@ -95,8 +95,6 @@ class Boost < Formula
# we specify libdir too because the script is apparently broken
bargs = ["--prefix=#{prefix}", "--libdir=#{lib}"]
bargs << "--with-toolset=clang" if build.with? "c++11"
if build.with? 'icu'
icu4c_prefix = Formula.factory('icu4c').opt_prefix
bargs << "--with-icu=#{icu4c_prefix}"
@ -138,8 +136,7 @@ class Boost < Formula
end
if MacOS.version >= :lion and build.with? 'c++11'
args << "toolset=clang" << "cxxflags=-std=c++11"
args << "cxxflags=-stdlib=libc++" << "cxxflags=-fPIC"
args << "cxxflags=-std=c++11" << "cxxflags=-stdlib=libc++"
args << "cxxflags=-arch #{Hardware::CPU.arch_64_bit}" if MacOS.prefer_64_bit? or build.universal?
args << "cxxflags=-arch #{Hardware::CPU.arch_32_bit}" if !MacOS.prefer_64_bit? or build.universal?
args << "linkflags=-stdlib=libc++"