[Boost-bugs] [Boost C++ Libraries] #8928: Build failed boost 1.54 on Mac with zlib source (-sZLIB_SOURCE) with clang and c++11

Subject: [Boost-bugs] [Boost C++ Libraries] #8928: Build failed boost 1.54 on Mac with zlib source (-sZLIB_SOURCE) with clang and c++11
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-25 15:21:28


#8928: Build failed boost 1.54 on Mac with zlib source (-sZLIB_SOURCE) with clang
and c++11
-----------------------------------------+------------------------------
 Reporter: Tetsuya Hayashi <tetsu.h@…> | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: Building Boost | Version: Boost 1.54.0
 Severity: Problem | Keywords:
-----------------------------------------+------------------------------
 build fail where compile zlib source in build.v2/standalone/zlib.
 It is because cxxflags are provided even if compile c source code by
 clang++ -x c.

 {{{
     "clang++" -x c -O3 -fPIC -std=c++11 -stdlib=libc++ -O3 -finline-
 functions -Wno-inline -Wall -DNDEBUG -I"/opt/work/zlib-1.2.8" -c -o
 "bin.v2/standalone/zlib/clang-darwin-4.2.1/release/link-static/threading-
 multi/adler32.o" "/opt/work/zlib-1.2.8/adler32.c"

 error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
 }}}

 {{{
 ./b2 -d2 -sZLIB_SOURCE=/opt/work/zlib-1.2.8 link=shared,static
 toolset=clang cxxflags=-std=c++11 cxxflags=-stdlib=libc++ cxxflags=-fPIC
 cxxflags="-arch x86_64" linkflags=-stdlib=libc++
 linkflags=-headerpad_max_install_names linkflags="-arch x86_64"
 }}}

 {{{
 Mac OS X 10.8.4
 % clang --version
 Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
 Target: x86_64-apple-darwin12.4.0
 Thread model: posix
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8928>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC