2020-03-20 12:35:53 +00:00
|
|
|
# Apple cctools and ld64 port for Linux, *BSD and macOS #
|
2013-11-14 19:54:29 +00:00
|
|
|
|
2020-03-20 12:35:53 +00:00
|
|
|
Current Version: cctools: 949.0.1, ld64: 512.4.
|
2014-10-14 21:07:31 +00:00
|
|
|
Originally ported by [cjacker](http://ios-toolchain-based-on-clang-for-linux.googlecode.com).
|
2013-11-14 19:54:29 +00:00
|
|
|
|
2014-10-14 21:07:31 +00:00
|
|
|
## SUPPORTED HOSTS ##
|
|
|
|
|
2015-03-15 21:43:36 +00:00
|
|
|
**SUPPORTED OPERATING SYSTEMS:**
|
2015-03-15 21:21:16 +00:00
|
|
|
|
2019-11-06 16:54:58 +00:00
|
|
|
Linux, Android (Termux), FreeBSD,
|
|
|
|
Mac OS X, iOS, OpenBSD and NetBSD
|
2015-03-15 21:21:16 +00:00
|
|
|
|
2015-03-15 21:43:36 +00:00
|
|
|
**SUPPORTED HOST ARCHITECTURES:**
|
2015-03-15 21:21:16 +00:00
|
|
|
|
2019-10-31 19:06:41 +00:00
|
|
|
x86, x86_64, arm, arm64/aarch64
|
2014-10-14 21:07:31 +00:00
|
|
|
|
2015-10-23 17:07:14 +00:00
|
|
|
## SUPPORTED TARGET ARCHITECTURES ##
|
2014-10-14 21:07:31 +00:00
|
|
|
|
2020-01-07 15:24:49 +00:00
|
|
|
armv6, armv7, armv7s, arm64, arm64e,
|
2020-03-20 12:35:53 +00:00
|
|
|
arm64_32 (untested), i386, x86_64, x86_64h,
|
2019-10-31 19:06:41 +00:00
|
|
|
armv6m, armv7k, armv7m and armv7em
|
2014-10-14 21:07:31 +00:00
|
|
|
|
2020-01-07 15:26:07 +00:00
|
|
|
arm64e requires [Apple LLVM/Clang](https://github.com/apple/llvm-project).
|
2020-01-07 15:24:49 +00:00
|
|
|
|
2015-10-23 17:07:14 +00:00
|
|
|
## SUPPORTED TARGET OPERATING SYSTEMS ##
|
|
|
|
|
2020-03-20 12:35:53 +00:00
|
|
|
macOS, iOS, tvOS, watchOS, bridgeOS, Mac Catalyst,
|
|
|
|
iOS Simluator, watchOS Simulator, DriverKit
|
|
|
|
|
|
|
|
Not all of the targets have been tested.
|
2015-10-23 17:07:14 +00:00
|
|
|
|
2014-10-14 21:07:31 +00:00
|
|
|
## DEPENDENCIES ##
|
2013-11-14 19:54:29 +00:00
|
|
|
|
2019-06-01 16:34:38 +00:00
|
|
|
`Clang 3.4+`
|
2017-04-01 18:42:35 +00:00
|
|
|
|
|
|
|
SDKs with .tdb stubs (>= Xcode 7) require the TAPI library to be installed.
|
|
|
|
=> https://github.com/tpoechtrager/apple-libtapi
|
2013-11-14 19:59:27 +00:00
|
|
|
|
2018-01-19 02:35:59 +00:00
|
|
|
musl-libc based systems require the musl-fts library to be installed.
|
|
|
|
=> https://github.com/pullmoll/musl-fts
|
|
|
|
|
2015-07-11 07:32:55 +00:00
|
|
|
Optional, but recommended:
|
2013-11-14 19:59:27 +00:00
|
|
|
|
2015-10-23 17:07:14 +00:00
|
|
|
`llvm-devel` (For Link Time Optimization Support)
|
|
|
|
`uuid-devel` (For ld64 `-random_uuid` Support)
|
|
|
|
`llvm-devel` + `xar-devel` (For ld64 `-bitcode_bundle` Support)
|
2014-10-14 21:07:31 +00:00
|
|
|
|
2015-10-23 18:13:17 +00:00
|
|
|
You can find xar [here](https://github.com/mackyle/xar).
|
|
|
|
Do not install libxar-dev on Ubuntu, it's a different package.
|
|
|
|
|
2014-10-14 21:07:31 +00:00
|
|
|
## INSTALLATION ##
|
2013-11-14 19:54:29 +00:00
|
|
|
|
2017-04-01 18:42:35 +00:00
|
|
|
### Install Apple's TAPI library:
|
|
|
|
This step is only required if you intend to use SDKs with .tdb stubs.
|
|
|
|
|
|
|
|
git clone https://github.com/tpoechtrager/apple-libtapi.git
|
|
|
|
cd apple-libtapi
|
|
|
|
[INSTALLPREFIX=/home/user/cctools] ./build.sh
|
|
|
|
./install.sh
|
|
|
|
|
|
|
|
### Install cctools and ld64:
|
|
|
|
git clone https://github.com/tpoechtrager/cctools-port.git
|
|
|
|
cd cctools-port/cctools
|
|
|
|
./configure \
|
|
|
|
[--prefix=/home/user/cctools] \
|
|
|
|
[--with-libtapi=/home/user/cctools] \
|
|
|
|
[--target=<target>] \
|
|
|
|
[--with-llvm-config=...]
|
|
|
|
make
|
|
|
|
make install
|
2013-11-14 19:54:29 +00:00
|
|
|
|
|
|
|
target = `i386-apple-darwin11`, `x86_64-apple-darwin11`, `arm-apple-darwin11`, ...
|
2013-11-15 17:37:45 +00:00
|
|
|
|
|
|
|
If you get compile errors because of `unistd.h`, then please run
|
2014-10-14 21:07:31 +00:00
|
|
|
`../tools/fix_unistd_issue.sh` and restart compiling.
|
2015-08-23 22:56:14 +00:00
|
|
|
|
|
|
|
## TRAVIS CI ##
|
|
|
|
|
2020-03-20 12:35:53 +00:00
|
|
|
[![Build Status](https://travis-ci.org/tpoechtrager/cctools-port.svg?branch=949.0.1-ld64-512.4)](https://travis-ci.org/tpoechtrager/cctools-port)
|