#24194: gcc42, gcc43, gcc44 won't compile with non-default build_arch -------------------------------+-------------------------------------------- Reporter: gvibe06@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: gcc44 gcc43 gcc42 -------------------------------+-------------------------------------------- Comment(by macports@…): The workaround that *does* seem to work is to force your native system compiler to use the desired CFLAGS, since something is wrong with the code/config in the gcc44@4.4.5 port itself: http://stackoverflow.com/questions/4367248/how-to-compile-gcc44-in-i386 -mode-in-macports The explanation in the stackoverflow post is a bit unclear, but here is what I did {{{ cd usr/bin sudo mv gcc-4.2 gcc-4.2-real Create a new file gcc-4.2.sh with content: #!/bin/sh /usr/bin/gcc-4.2-real -m32 "$@" sudo chmod a+x gcc-4.2.sh sudo ln -s gcc-4.2.sh gcc-4.2 }}} This way, when the port tries to call /usr/bin/gcc4.2 without the desired "-m32" flag, the gcc-4.2.sh forcibly re-inserts it. This approach might work for other CFLAGS as well, but I have not tested that. Take this advice with a grain of salt, since my gcc is still compiling. I'll see tomorrow if it succeeded. -- Ticket URL: <https://trac.macports.org/ticket/24194#comment:22> MacPorts <http://www.macports.org/> Ports system for Mac OS