[MacPorts] #30434: Should port select gcc also set /usr/bin/cc?
#30434: Should port select gcc also set /usr/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: macports-tickets@… Type: request | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: select gcc | Port: ----------------------------+----------------------------------------------- Hi, currently port select gcc only changes the binaries in $PREFIX/bin. However, at least some ports use /usr/bin/cc as the default compiler. This ports will likely end up using whatever /usr/bin/cc is set to - for instance llvm-gcc42 if XCode 4 was installed, although the user MAY have selected gcc42 manually and lives under the impression it's used. Then again, I don't know, whether it's a good thing to fiddle outside of $PREFIX, so I'll open this for discussion. I'd vote for yes and moreover possibly also change all other symlinks in /usr/bin as gcc, g++, c++ etc. BUT symlink them to their /opt/local/bin counterparts, so we don't need to keep two places in sync. Best regards, Mihai -- Ticket URL: <https://trac.macports.org/ticket/30434> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set /usr/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: macports-tickets@… Type: request | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: select gcc | Port: ----------------------------+----------------------------------------------- Comment(by dluke@…): ports shouldn't be using the gcc_select'd compiler, see UsingTheRightCompiler -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set /usr/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: macports-tickets@… Type: request | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: select gcc | Port: ----------------------------+----------------------------------------------- Comment(by ionic@…): "Software by default builds using "gcc" (or, equivalently, "cc") and this can be a problem if the user has changed what this is." - and that's what I'm adressing. I think port select gcc should set the default compiler and given that, also at least to some degree make sure it's used. At the very least, it should create $PREFIX/bin/cc too (does not currently). -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set /usr/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: select gcc | Port: ----------------------------+----------------------------------------------- Changes (by macsforever2000@…): * type: request => enhancement -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set /usr/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: select gcc | Port: ----------------------------+----------------------------------------------- Comment(by ryandesign@…): Replying to [comment:2 ionic@…]:
"Software by default builds using "gcc" (or, equivalently, "cc") and this can be a problem if the user has changed what this is." - and that's what I'm adressing.
The correct way to address this issue is for the authors of every port to ensure they're UsingTheRightCompiler. Neither "port select gcc" nor anything else in MacPorts should modify /usr/bin/anything. /usr/bin is for Apple to modify, and nobody else. -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set /usr/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: select gcc | Port: ----------------------------+----------------------------------------------- Comment(by ionic@…): Yes, I see how this is bad. Changed my mind, but we should really link $PREFIX/bin/cc (e.g. /opt/local/bin/cc) to the selected GCC version as well. port select gcc won't do that currently and this triggered my "problems". -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set /usr/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- Changes (by jmr@…): * keywords: select gcc => * owner: macports-tickets@… => mww@… * port: => gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc * cc: jeremyhu@…, krischik@… (added) -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- Comment(by jeremyhu@…): maybe replace gcc_select with compiler_select ... ? -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: base | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- Comment(by ionic@…): If you add support for llvm-clang, maybe... otherwise I don't see any reason, as it literally switched between gcc versions only. :) -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: ports | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- Changes (by jmr@…): * component: base => ports -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: ports | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- Comment(by ionic@…): bump... ${prefix}/bin/cc is still not touched/symlinked. :) -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: ports | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- Comment(by raimue@…): I am thinking about a separate group for `cc`. This would allow to choose between: * clang => /usr/bin/clang * llvm-gcc42 => /usr/bin/llvm-gcc-4.2 * mp-clang => ${prefix}/bin/clang * mp-llvm-gcc42 => ${prefix}/bin/llvm-gcc-4.2 * mp-gcc => ${prefix}/bin/gcc Adding a single symlink for gcc should be flexible enough as the version can be selected with the `gcc` group. -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: ports | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- Changes (by raimue@…): * cc: raimue@… (added) -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? ----------------------------+----------------------------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: ports | Version: 2.0.0 Keywords: | Port: gcc_select apple-gcc42 gcc41 gcc42 gcc43 gcc44 gcc45 gcc46 gnat-gcc ----------------------------+----------------------------------------------- Comment(by ryandesign@…): With Xcode 4.4 on Mountain Lion, /usr/bin/cc is a link to Apple Clang 4.0, while /usr/bin/gcc is a link to llvm-gcc 4.2. This seems designed to guarantee that /usr/bin/gcc actually behaves mostly like the GNU C compiler, whereas /usr/bin/cc is merely a C compiler, that does not necessarily conform to the GNU C compiler's quirks. This distinction seems valuable. -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#30434: Should port select gcc also set ${prefix}/bin/cc? -------------------------------------------------+------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: new Priority: Low | Milestone: Component: ports | Version: 2.0.0 Resolution: | Keywords: Port: gcc_select apple-gcc42 gcc41 gcc42 | gcc43 gcc44 gcc45 gcc46 gnat-gcc | -------------------------------------------------+------------------------- Changes (by ryandesign@…): * cc: ryandesign@…, Peter.Danecek@… (added) Comment: Has duplicate #43734. -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:15> MacPorts <http://www.macports.org/> Ports system for OS X
#30434: Should port select gcc also set ${prefix}/bin/cc? -------------------------------------------------+------------------------- Reporter: ionic@… | Owner: mww@… Type: enhancement | Status: closed Priority: Low | Milestone: Component: ports | Version: 2.0.0 Resolution: wontfix | Keywords: Port: gcc_select apple-gcc42 gcc41 gcc42 | gcc43 gcc44 gcc45 gcc46 gnat-gcc | -------------------------------------------------+------------------------- Changes (by jeremyhu@…): * status: new => closed * resolution: => wontfix Comment: Absolutely not. If you want a new select option (port select cc), that is another story... but I'd also reccomend against that as well. -- Ticket URL: <https://trac.macports.org/ticket/30434#comment:16> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts