Skip to content

Commit f836f7e

Browse files
committed
depends: remove cctools & libtapi
1 parent 4a0536c commit f836f7e

File tree

9 files changed

+7
-104
lines changed

9 files changed

+7
-104
lines changed

contrib/macdeploy/README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,16 @@ The `sha256sum` should be `c0c2e7bb92c1fee0c4e9f3a485e4530786732d6c6dd9e9f418c28
5656

5757
## Deterministic macOS App Notes
5858

59-
macOS Applications are created in Linux by combining a recent `clang` and the Apple
60-
`binutils` (`ld`, `ar`, etc).
59+
macOS Applications are created in Linux using a recent LLVM.
6160

6261
Apple uses `clang` extensively for development and has upstreamed the necessary
6362
functionality so that a vanilla clang can take advantage. It supports the use of `-F`,
6463
`-target`, `-mmacosx-version-min`, and `-isysroot`, which are all necessary when
6564
building for macOS.
6665

67-
Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the
68-
FSF's `binutils`. In addition to extra linker options for frameworks and sysroots, several
69-
other tools are needed as well. These do not build under Linux, so they have been patched to
70-
do so. The work here was used as a starting point: [mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4).
71-
72-
In order to build a working toolchain, the following source packages are needed from
73-
Apple: `cctools`, `dyld`, and `ld64`.
74-
7566
These tools inject timestamps by default, which produce non-deterministic binaries. The
7667
`ZERO_AR_DATE` environment variable is used to disable that.
7768

78-
This version of `cctools` has been patched to use the current version of `clang`'s headers
79-
and its `libLTO.so` rather than those from `llvmgcc`, as it was originally done in `toolchain4`.
80-
8169
To complicate things further, all builds must target an Apple SDK. These SDKs are free to
8270
download, but not redistributable. See the SDK Extraction notes above for how to obtain it.
8371

depends/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ all_packages = $(packages) $(native_packages)
185185

186186
meta_depends = Makefile config.guess config.sub funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
187187

188-
$(host_arch)_$(host_os)_native_binutils?=$($(host_os)_native_binutils)
189188
$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
190189

191190
include funcs.mk
@@ -217,9 +216,8 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
217216
# tool needs to be available in $PATH at all times.
218217
#
219218
# 2. If the tool is _**not**_ expected to be available in $PATH at all times
220-
# (such as is the case for our native_cctools binutils tools), it needs to
221-
# be referred to by its absolute path, such as would be output by the
222-
# AC_PATH_{PROG,TOOL} macros.
219+
# it needs to be referred to by its absolute path, such as would be output
220+
# by the AC_PATH_{PROG,TOOL} macros.
223221
#
224222
# Minor note: it is also okay to refer to tools by their absolute path even if
225223
# we expect them to be available in $PATH at all times, more specificity does

depends/builders/darwin.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ darwin_STRIP:=$(shell xcrun -f strip)
1818
darwin_OBJDUMP:=$(shell xcrun -f objdump)
1919
darwin_NM:=$(shell xcrun -f nm)
2020
darwin_DSYMUTIL:=$(shell xcrun -f dsymutil)
21-
darwin_native_binutils=
2221
darwin_native_toolchain=
2322

2423
x86_64_darwin_CFLAGS += -arch x86_64

depends/funcs.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ endef
4646

4747
define int_get_build_id
4848
$(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
49-
$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(1)_dependencies)))
49+
$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
5050
$(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
5151
$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id))
5252
$(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
@@ -299,4 +299,4 @@ $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$
299299
$(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package))))
300300

301301
#special exception: if a toolchain package exists, all non-native packages depend on it
302-
$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) ))
302+
$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) ))

depends/hosts/darwin.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ LD64_VERSION=711
66

77
OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers
88

9-
darwin_native_binutils=native_cctools
10-
119
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
1210
# FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned LLVM
1311
# from llvm.org
1412

15-
# Clang is a dependency of native_cctools when FORCE_USE_SYSTEM_CLANG is empty
16-
darwin_native_toolchain=native_cctools
13+
darwin_native_toolchain=native_llvm
1714

1815
clang_prog=$(build_prefix)/bin/clang
1916
clangxx_prog=$(clang_prog)++
@@ -68,7 +65,7 @@ endif
6865
#
6966
# -B$(build_prefix)/bin
7067
#
71-
# Explicitly point to our binaries (e.g. cctools) so that they are
68+
# Explicitly point to our binaries so that they are
7269
# ensured to be found and preferred over other possibilities.
7370
#
7471
# -isysroot$(OSX_SDK) -nostdlibinc

depends/packages/native_cctools.mk

Lines changed: 0 additions & 39 deletions
This file was deleted.

depends/packages/native_libtapi.mk

Lines changed: 0 additions & 22 deletions
This file was deleted.

depends/packages/packages.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ usdt_linux_packages=systemtap
3030
darwin_native_packages =
3131

3232
ifneq ($(build_os),darwin)
33-
darwin_native_packages += native_cctools native_libtapi
3433

3534
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
3635
darwin_native_packages+= native_llvm

depends/patches/native_libtapi/disable_zlib.patch

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)