gcc 4.8 on MacOS fails depending on -arch order

Andrew Jaffe a.h.jaffe at gmail.com
Fri Apr 11 09:53:09 PDT 2014


I am trying to get a recent version of gcc 4.8.2 up on my machine.

For a minimal source file, I get errors depending on the order of the 
-arch flags. (I have used +universal, although in fact some of these 
same errors occur even without that, strangely)

Specifically,  `-arch x86_64 -arch i386` (or either of them alone) works:

     % /opt/local/bin/gcc-mp-4.8 -arch x86_64 -arch i386 conftest.c
     % /opt/local/bin/gcc-mp-4.8 -arch x86_64 -arch i386 -O3 conftest.c

But `-arch i386 -arch x86_64` fails:

     % /opt/local/bin/gcc-mp-4.8 -arch i386 -arch x86_64 conftest.c
     /var/folders/6l/7gzvw1zs42sbhj7_hlrpykfm0000gv/T//cc6JCBdP.s:5:bad 
register name `%rbp'
     /var/folders/6l/7gzvw1zs42sbhj7_hlrpykfm0000gv/T//cc6JCBdP.s:7:bad 
register name `%rsp'
     /var/folders/6l/7gzvw1zs42sbhj7_hlrpykfm0000gv/T//cc6JCBdP.s:10:bad 
register name `%rbp'

     % /opt/local/bin/gcc-mp-4.8 -arch i386 -arch x86_64 -O3 conftest.c
 
/var/folders/6l/7gzvw1zs42sbhj7_hlrpykfm0000gv/T//ccs67E0q.s:34:FATAL:Bad fx_size 
(0x8) in fix_to_relocation_info()

Help! (Disclosure: I don't think this is strictly a macports problem: I 
get the same issue using the gcc that comes with a /usr/local binary 
install of gfortran.)

The minimal source:

      int main ()
      {
       return 0;
      }

For info:

     % /opt/local/bin/gcc-mp-4.8 --version
     gcc-mp-4.8 (MacPorts gcc48 4.8.2_0+universal) 4.8.2
     Copyright (C) 2013 Free Software Foundation, Inc.





More information about the macports-users mailing list