[MacPorts] #48857: gcc ports: support compiling multiple archs (universal)

MacPorts noreply at macports.org
Tue Dec 5 12:23:57 UTC 2017


#48857: gcc ports: support compiling multiple archs (universal)
-------------------------------------------------+-------------------------
  Reporter:  devernay                            |      Owner:  macports-
                                                 |  tickets@…
      Type:  enhancement                         |     Status:  assigned
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  gcc43 gcc44 gcc45 gcc46 gcc47       |
  gcc48 gcc49 gcc5 gcc6                          |
-------------------------------------------------+-------------------------

Comment (by mojca):

 Do you have any references about the new functionality? If I try to build
 a fat binary, it doesn't seem to work:

 {{{
 > g++-mp-6 -arch i386 -arch x86_64 hello.cpp -o hello
 g++-mp-6: warning: x86_64 conflicts with i386 (arch flags ignored)
 }}}

 And since I don't have the compiler built universally, `-arch i386`
 doesn't work either, even though it seems like it could work, but only as
 a synonym for `-m32` rather than allowing fat builds.

 {{{
 > g++-mp-6 -arch i386 hello.cpp -o hello
 ld: warning: ignoring file /opt/local/lib/gcc6/libstdc++.dylib, file was
 built for x86_64 which is not the architecture being linked (i386):
 /opt/local/lib/gcc6/libstdc++.dylib
 ld: warning: ld: warning: ignoring file
 /opt/local/lib/gcc6/libgcc_ext.10.5.dylib, missing required architecture
 i386 in file /opt/local/lib/gcc6/libgcc_ext.10.5.dylib (1 slices)ignoring
 file /opt/local/lib/gcc6/gcc/x86_64-apple-darwin17/6.4.0/libgcc.a, file
 was built for archive which is not the architecture being linked (i386):
 /opt/local/lib/gcc6/gcc/x86_64-apple-darwin17/6.4.0/libgcc.a
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/48857#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list