[MacPorts] #64932: libcxx for PowerPC

MacPorts noreply at macports.org
Sun Apr 3 07:53:21 UTC 2022


#64932: libcxx for PowerPC
-------------------------------------+----------------------
 Reporter:  barracuda156             |      Owner:  jeremyhu
     Type:  enhancement              |     Status:  assigned
 Priority:  Normal                   |  Milestone:
Component:  ports                    |    Version:  2.7.2
 Keywords:  powerpc, leopard, ppc64  |       Port:  libcxx
-------------------------------------+----------------------
 I have built `libcxx` for PowerPC now. All it took is remove three flags
 which gcc does not support and changing archs in `lib/buildit`. However I
 need to check somehow if it is usable after all.

 gcc11 complained about 2 flags: `-Wshorten-64-to-32` and `-Wnewline-eof`.
 gcc7 in addition didn't like `-Wmismatched-tags`.
 Then obviously for both `buildit` I changed:

 {{{
 -      RC_CFLAGS="-arch i386 -arch x86_64"
 +      RC_CFLAGS="-arch ppc -arch ppc64"
 }}}

 A couple of problems:

 1. Despite building on 10.5.8 and 10.6, dylib got placed into
 `/opt/local/var/system_roots` as an archive. From what I understand this
 should happen on 10.7+.
 2. While on Leopard I asked for `+universal`, unpacked dylib is
 ppc32-only:

 {{{
 36-109:libcxx svacchanda$ lipo -info
 /Users/svacchanda/Dev/libcxx/usr/lib/libc++abi.dylib
 Non-fat file: /Users/svacchanda/Dev/libcxx/usr/lib/libc++abi.dylib is
 architecture: ppc7400
 36-109:libcxx svacchanda$ lipo -info
 /Users/svacchanda/Dev/libcxx/usr/lib/libc++.1.dylib
 Non-fat file: /Users/svacchanda/Dev/libcxx/usr/lib/libc++.1.dylib is
 architecture: ppc7400
 }}}

 Port claims to be universal though:

 {{{
 36-109:libcxx svacchanda$ port -v installed libcxx
 The following ports are currently installed:
   libcxx @5.0.1_4+universal (active) requested_variants='+universal'
 platform='darwin 9' archs='ppc ppc64' date='2022-04-03T15:30:57+0800'
 }}}

 During compilation gcc complained about archs:

 {{{
 g++-mp-7: warning: ppc64 conflicts with ppc (arch flags ignored)
 }}}

 Which is perhaps the cause of the problem. (Maybe missing `muniversal 1.0`
 in Portfile is to blame.)

 How can I check if resulting dylib is practically usable?

-- 
Ticket URL: <https://trac.macports.org/ticket/64932>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list