On Dec 17, 2011, at 00:30, Peng Yu wrote: >> -arch is part of Apple's private patches to support multiple-architecture >> objects and binaries, and is only supported by Apple's Xcode compilers. > > Whenever, I try to install a number of third packages, -arch is > somehow supplied to gcc/g++ (I have to going back to the original mac > compiler, which is inconvenient). I'm wondering whether there is a > walkaround to change -arch to the GCC equivalent? I checked my env, > but I don't see how -arch is passed to gcc/g++. Is there a > configuration file that I can change?
Outside of MacPorts (and even within MacPorts, when you've selected a non-Apple compiler using `configure.compiler`), `-arch` is not passed to the compiler by default. Either the specific third-party software you're trying to build is doing so deliberately (if this is the case, patch that software to not do that); or it's making use of dependencies whose *-config scripts or pkg-config *.pc files inadvertently contain `-arch` flags (if this is the case, and those dependencies were installed with MacPorts, please file a bug report with us and reference wiki:PortfileRecipes#archflags); or you're specifying the `-arch` flags yourself in CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS, or similar. If you still cannot figure out where the `-arch` flags are coming from, show us a complete log of the output of running `configure` and `make`. The config.log may be helpful too. _______________________________________________ macports-users mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
