Passing '-arch pcc' to gfortran-mp-4.8: unrecognized command line option

Joshua Root jmr at macports.org
Sun Nov 10 21:09:05 PST 2013


On 2013-11-10 18:00 , Blair Zajac wrote:
> I was thinking that if gfortran doesn't accept -arch for any platform,
> then this looks like a ppc bug because nobody else has reported it for
> x86_64?

Apparently recent FSF GCCs do have limited support for -arch. I think
they only allow one arch to be specified, and I don't know if the
support is limited to the C/C++ front end or particular archs.

> Here's part of the 'port -d -v install octave-devel' output:
> 
> DEBUG: Environment: CPATH='/opt/local/include' CXXFLAGS='-pipe -Os -arch
> ppc' CFLAGS='-pipe -Os -arch ppc' LIBRARY_PATH='/opt/local/lib'
> MACOSX_DEPLOYMENT_TARGET='10.5' PERL='/opt/local/bin/perl'
> CXX='/usr/bin/g++-4.2'
> CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_octave-devel/octave-devel/work/.CC_PRINT_OPTIONS'
> F90FLAGS='-pipe -Os -m32' SED='/opt/local/bin/gsed' LDFLAGS='-arch ppc'
> FCFLAGS='-pipe -Os -m32' TEXI2PDF='/opt/local/bin/texi2pdf'
> OBJC='/usr/bin/gcc-4.2' OBJCXX='/usr/bin/g++-4.2'
> INSTALL='/usr/bin/install -c' F90='/opt/local/bin/gfortran-mp-4.8'
> FC='/opt/local/bin/gfortran-mp-4.8' PYTHON='' ''
> AWK='/opt/local/bin/gawk' FFLAGS='-pipe -Os -m32' OBJCXXFLAGS='-pipe -Os
> -arch ppc' OBJCFLAGS='-pipe -Os -arch ppc'
> F77='/opt/local/bin/gfortran-mp-4.8' CC_PRINT_OPTIONS='YES'
> GREP='/opt/local/bin/grep' CC='/usr/bin/gcc-4.2'
> TEXI2DVI='/opt/local/bin/texi2dvi'

OK, so it's probably using the LDFLAGS. That's the trouble with using
two different compilers, one of them supports this flag when linking and
the other doesn't, and there's not really any way of letting configure
know that.

- Josh


More information about the macports-dev mailing list