[MacPorts] #38374: boost: stdlibc++ linkage prevents dependencies from using libc++

MacPorts noreply at macports.org
Sat Mar 16 13:01:59 PDT 2013


#38374: boost: stdlibc++ linkage prevents dependencies from using libc++
----------------------------+---------------------------
  Reporter:  macportbugs@…  |      Owner:  adfernandes@…
      Type:  defect         |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.1.3
Resolution:                 |   Keywords:
      Port:  boost          |
----------------------------+---------------------------

Comment (by adfernandes@…):

 Okay - here is my (trivial) portfile patch.
 {{{

 --- Portfile    (revision 104122)
 +++ Portfile    (working copy)
 @@ -89,12 +89,11 @@
      reinplace -E "s|-install_name \"|&${prefix}/lib/|" \
          ${worksrcpath}/tools/build/v2/tools/darwin.jam

 -    if {[string length ${configure.sdkroot}] == 0} {
 -        write_jam "using darwin : : ${configure.cxx} : : ;"
 -    } else {
 -        write_jam "using darwin : : ${configure.cxx} :
 <compileflags>\"-isysroot ${configure.sdkroot}\" : ;"
 -    }
 +    set compileflags ""
 +    if {[string length ${configure.sdkroot}] != 0} { set compileflags
 "<compileflags>\"-isysroot ${configure.sdkroot}\"" }

 +    write_jam "using darwin : : ${configure.cxx} :
 <cxxflags>\"${configure.cxxflags}\" ${compileflags}
 <linkflags>\"${configure.ldflags}\" : ;"
 +
  }
 }}}

 The problem with it is that it replaces the `boost`-default `-O3`
 optimization level with `-O2`.  No big deal, really... except one never
 really knows what they've assumed (in the threading libraries, etc etc
 etc) about optimization levels.

 You get libraries built with
 {{{
 "/usr/bin/clang++"  -ftemplate-depth-128 -O2 -O3 -finline-functions -Wno-
 inline [...]
 }}}

 So if we assume that the last-most specified `-O3` flag is the one in
 effect, which it should be, then this is just fine.

 Comments, anyone?

-- 
Ticket URL: <https://trac.macports.org/ticket/38374#comment:9>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list