[MacPorts] #65934: mesa @22.1.7 +tests does not build on PPC Leopard, Mac OS X 10.5.8, because of Undefined symbols for architecture ppc

MacPorts noreply at macports.org
Thu Oct 6 08:56:30 UTC 2022


#65934: mesa @22.1.7 +tests does not build on PPC Leopard, Mac OS X 10.5.8, because
of Undefined symbols for architecture ppc
------------------------+-------------------------
  Reporter:  ballapete  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.7.2
Resolution:             |   Keywords:  leopard ppc
      Port:  mesa       |
------------------------+-------------------------

Comment (by ballapete):

 The `test variant` built, and most tests succeeded (maybe due to my use of
 `Python 3.9`). During build and test phases a lot of complaints about the
 use of `-mtls-dialect=gnu2` appear. Reading the help output of
 `/opt/local/bin/gcc-mp-7` I can see:

 {{{
 Target: ppc-apple-darwin9
 Configured with:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_gcc7/gcc7/work/gcc-7.5.0/configure
 --prefix=/opt/local --build=ppc-apple-darwin9 --enable-
 languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc7
 --includedir=/opt/local/include/gcc7 --infodir=/opt/local/share/info
 --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-7 --with-
 local-prefix=/opt/local --with-system-zlib --disable-nls --program-
 suffix=-mp-7 --with-gxx-include-dir=/opt/local/include/gcc7/c++/ --with-
 gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-
 isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto
 --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-
 as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-
 ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
 --disable-tls --with-pkgversion='MacPorts gcc7 7.5.0_3'
 Thread model: posix
 gcc version 7.5.0 (MacPorts gcc7 7.5.0_3)
 COLLECT_GCC_OPTIONS='-v' '--help' '-mmacosx-version-min=10.5.8'
 '-asm_macosx_version_min=10.5'
 }}}

 Should the option `-disable-tls` be avoided in a new release of `GCC 7`?

 The `mesa` file `meson.build` contains this block:

 {{{
   513   # -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly
 but requires
   514   # full toolchain (including libc) support.
   515   have_mtls_dialect = false
   516   foreach c_arg : get_option('c_args')
   517     if c_arg.startswith('-mtls-dialect=')
   518       have_mtls_dialect = true
   519       break
   520     endif
   521   endforeach
   522   if not have_mtls_dialect
   523     # need .run to check libc support. meson aborts when calling
 .run when
   524     # cross-compiling, but because this is just an optimization we
 can skip it
   525     if meson.is_cross_build() and not meson.has_exe_wrapper()
   526       warning('cannot auto-detect -mtls-dialect when cross-
 compiling, using compiler default')
   527     else
   528       # -fpic to force dynamic tls, otherwise TLS relaxation defeats
 check
   529       gnu2_test = cc.run('int __thread x; int main() { return x; }',
   530                          args: ['-mtls-dialect=gnu2', '-fpic'],
   531                          name: '-mtls-dialect=gnu2')
   532       if gnu2_test.returncode() == 0 and (
   533             # check for lld 13 bug:
 https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665
   534             host_machine.cpu_family() != 'x86_64' or
   535             # get_linker_id misses LDFLAGS=-fuse-ld=lld:
 https://github.com/mesonbuild/meson/issues/6377
   536             #cc.get_linker_id() != 'ld.lld' or
   537             cc.links('''int __thread x; int y; int main() { __asm__(
   538                   "leaq x at TLSDESC(%rip), %rax\n"
   539                   "movq y at GOTPCREL(%rip), %rdx\n"
   540                   "call *x at TLSCALL(%rax)\n"); }''', name: 'split
 TLSDESC')
   541             )
   542         c_args += '-mtls-dialect=gnu2'
   543         cpp_args += '-mtls-dialect=gnu2'
   544       endif
   545     endif
 }}}

 Can it be that it erroneously returns that `MacPorts gcc7 7.5.0_3`
 supports the `-mtls-dialect=gnu2` option?

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


More information about the macports-tickets mailing list