[MacPorts] #57486: ace, tao @6.5.2: cc1plus: error: unrecognized command line option "-stdlib=libstdc++"

MacPorts noreply at macports.org
Thu Nov 1 04:39:34 UTC 2018


#57486: ace, tao @6.5.2: cc1plus: error: unrecognized command line option
"-stdlib=libstdc++"
-------------------------+----------------------
 Reporter:  ryandesign   |      Owner:  lockhart
     Type:  defect       |     Status:  assigned
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:
 Keywords:  snowleopard  |       Port:  ace, tao
-------------------------+----------------------
 [https://build.macports.org/builders/ports-10.6_x86_64_legacy-
 builder/builds/84271/steps/install-port/logs/stdio ace] and
 [https://build.macports.org/builders/ports-10.6_x86_64_legacy-
 builder/builds/84272/steps/install-port/logs/stdio tao] @6.5.2 fail to
 build on Snow Leopard because that OS uses gcc/g++ by default which don't
 support the `-stdlib` flag:

 {{{
 cc1plus: error: unrecognized command line option "-stdlib=libstdc++"
 }}}

 If you want to manually add the `-stdlib` flag as the portfile currently
 does, you must only do so if `${configure.cxx}` contains the string
 `clang`.

 Instead, you could use `${configure.cxxflags}` which will contain the
 `-stdlib` flag  if the compiler is clang and otherwise will not. I guess
 this is probably the way we should go.

 We should also consider adding `${configure.cflags}` where we reinplace
 `@@CFLAGS@@` and adding `${configure.ldflags}` where we reinplace
 `@@LDFLAGS@@`.

 Finally, `get_canonical_archflags cc` should be `get_canonical_archflags
 cxx` since they're replacing `@@CXXFLAGS@@`.

 Sorry, I had made a review of the PR with these comments, but I forgot to
 submit the review.

-- 
Ticket URL: <https://trac.macports.org/ticket/57486>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list