[MacPorts] #49709: cmake, gnuradio, gr-foo, gr-ieee802-11, gr-ieee802-15-4, volk: just use cxx11 1.0 portgroup
#49709: cmake, gnuradio, gr-foo, gr-ieee802-11, gr-ieee802-15-4, volk: just use cxx11 1.0 portgroup -------------------------+------------------------------------------------- Reporter: | Owner: michaelld@… ryandesign@… | Status: new Type: defect | Milestone: Priority: Normal | Version: 2.3.4 Component: ports | Port: cmake gnuradio gr-foo gr-ieee802-11 Keywords: haspatch | gr-ieee802-15-4 volk -------------------------+------------------------------------------------- The cmake, gnuradio, gr-foo, gr-ieee802-11, gr-ieee802-15-4, and volk ports include a block of code designed to select the correct compilers for code that requires C++11. Large amounts of common code should not be copy/pasted; instead a portgroup should be created. The cxx11 1.0 portgroup already exists to provide this functionality. The gnuradio port was not using it, but the others were, conditionally, if libc++ is used. The portgroup is designed to be included unconditionally, without regard for which C++ library is used, and to provide the user the correct advice or behavior in either case. If this portgroup is not meeting your needs, please enhance the portgroup or discuss the situation on the macports-dev mailing list. Otherwise, just include the portgroup and let it do what it's designed to do; see attached patch. -- Ticket URL: <https://trac.macports.org/ticket/49709> MacPorts <https://www.macports.org/> Ports system for OS X
#49709: cmake, gnuradio, gr-foo, gr-ieee802-11, gr-ieee802-15-4, volk: just use cxx11 1.0 portgroup -------------------------------------------------+------------------------- Reporter: ryandesign@… | Owner: michaelld@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch Port: cmake gnuradio gr-foo gr- | ieee802-11 gr-ieee802-15-4 volk | -------------------------------------------------+------------------------- Comment (by michaelld@…): The cxx11 1.0 port group only handles C++11 for libc++. It does not handle C++11 for libstdc++. From the comment in that PortGroup: {{{ # Compilers supporting C++11 are GCC >= 4.6 and clang >= 3.3. # As we only support libc++, clang is implicitly required. # Blacklist all GCC compilers to not accidentally pull in libstdc++. # We do not know what "cc" is, so blacklist it as well. }}} There have been past discussions on the MP-dev list about this topic, and the conclusion is that there is no generic way to handle libstdc++ and C++11 within the current MP framework. That said, my way here works for the GR ports & is used by some users / customers (per email feedback). Until MP comes up with a good way of handling libstdc++ and C++11, I'm going to leave these in place; maybe update them to use gcc5. There is a lot of redundancy in the GR-related ports, quite true. I will look into creating a GR PortGroup file sooner or later, which incorporates the common parts of the GR Portfiles as well as some optional function to handle C++11 (such that there's just 1 place to make any C++11 changes, assuming MP ever gets to that point). -- Ticket URL: <https://trac.macports.org/ticket/49709#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#49709: cmake, gnuradio, gr-foo, gr-ieee802-11, gr-ieee802-15-4, volk: just use cxx11 1.0 portgroup -------------------------------------------------+------------------------- Reporter: ryandesign@… | Owner: michaelld@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch Port: cmake gnuradio gr-foo gr- | ieee802-11 gr-ieee802-15-4 volk | -------------------------------------------------+------------------------- Comment (by mojca@…): A tiny note about CMake. This change might conflict with {{{ platform darwin { # TODO: Figure out why using libc++ fails on Lion and fix the bootstrap # script to honor CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET. # Since nothing links against cmake and cmake is just using the STL, # we're safe to force libstdc++ # # https://www.cmake.org/Bug/view.php?id=15039&nbn=16 if {${os.major} < 12} { configure.cxx_stdlib libstdc++ } } }}} Note that `libstdc++` is not really needed, but due to a bug in `clang` shipped with Lion one cannot use the system `clang++` with `libc++`. Just make sure that if `libc++` is used, `clang 425` gets blacklisted and replaced by `macports-clang-3.4` or later. -- Ticket URL: <https://trac.macports.org/ticket/49709#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts