Problems cross-compiling with clang 3.7 & 3.9 on 10.6

Ken Cunningham ken.cunningham.webuse at gmail.com
Tue Mar 28 03:07:56 UTC 2017


It's been a few months since I went down this rabbit hole, but IIRC,
it worked a little better to build clang on ppc directly. 10.5 intel
fails to build PPC correctly due to the runtime library issues you
stumbled across. The highest i have been able to go is clang-3.6 on
ppc so far (building it on PPC, using clang-3.4). clang-3.7+ will not
build successfully, although llvm-3.7+ does build (wouldn't trust the
code it produces on PPC, though).

Libc++ works, but the exceptions don't work correctly still. But clang
> 3.4 works in a spotty fashion, and the produced binaries have
errors. llvm > 3.4 produces buggy ppc code that crashes easily.

I might hope to find a way to get clang-3.7 to output intermediate
code that gcc5 or gcc6 might further process (AKA llvm-4.2), but I
guess that seems pretty unlikely these days.

here's what I have working on 10.5 ppc at present:

LeopardG5:MacPorts-2.4.1 macportsdev$ port -v installed | grep clang
  clang-3.4 @3.4.2_12+analyzer platform='darwin 9' archs='ppc'
date='2016-11-08T21:25:19-0800'
  clang-3.6 @3.6.2_5+analyzer platform='darwin 9' archs='ppc'
date='2016-12-29T22:18:32-0800'
  clang_select @2_0 (active) platform='darwin 9' archs='noarch'
date='2016-10-02T00:17:54-0700'
LeopardG5:MacPorts-2.4.1 macportsdev$ port -v installed | grep llvm
  cctools @886_6+llvm33 (active) platform='darwin 9' archs='ppc'
date='2016-10-22T10:49:21-0700'
  ld64-127 @127.2_8+llvm33 (active) platform='darwin 9' archs='ppc'
date='2016-11-08T21:00:26-0800'
  llvm-3.3 @3.3_10 (active) platform='darwin 9' archs='ppc'
date='2016-10-02T17:27:59-0700'
  llvm-3.4 @3.4.2_11 (active) platform='darwin 9' archs='ppc'
date='2016-10-02T17:32:34-0700'
  llvm-3.6 @3.6.2_4 (active) platform='darwin 9' archs='ppc'
date='2016-12-29T19:47:09-0800'
  llvm-3.8 @3.8.1_0 (active) platform='darwin 9' archs='ppc'
date='2017-01-06T17:43:28-0800'
  llvm_select @2_0 (active) platform='darwin 9' archs='noarch'
date='2016-10-02T00:18:02-0700'
LeopardG5:MacPorts-2.4.1 macportsdev$ port -v installed | grep libc
  libcxx @3.9.0_0+universal (active) platform='darwin 9' archs='i386
ppc x86_64' date='2016-12-11T15:19:16-0800'
  libcxxabi @3.9.0_0+universal (active) platform='darwin 9'
archs='i386 ppc x86_64' date='2016-12-11T15:17:25-0800'


More information about the macports-dev mailing list