[MacPorts] #59694: libgcc7 fails to compile (ld: illegal text-relocation to ___cpu_indicator_init)

MacPorts noreply at macports.org
Wed Dec 4 05:04:25 UTC 2019

#59694: libgcc7 fails to compile (ld: illegal text-relocation to
  Reporter:  rmottola  |      Owner:  (none)
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:            |

Comment (by kencu):

 It is looking like the one key part of this is just this:
 and that needs to be this
 to ensure that the older `gas` assembler is used, and not clang.

 My impression is that during the build, testing for assembler features at
 a certain point finds `clang` and runs tests on that.

 Those tests indicate certain i386 text relocation features are supported
 by the assembler, so gcc uses them.

 But darwin's i386 linker doesn't know what to do with them, ergo the

 So in the portfile, it's easy enough to place this:

 configure.args-replace --with-as=${prefix}/bin/as --with-as=/usr/bin/as
 but now we just have to figure out when that is needed. All i386 builds?
 Just go for darwin < 11 say?

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

More information about the macports-tickets mailing list