From 1008318715245aa50fdae6e338b9df6971f9afd7 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 3 May 2022 23:03:28 +0100 Subject: [PATCH] Update native_cctools for newer SDK support --- contrib/depends/hosts/darwin.mk | 2 +- contrib/depends/packages/native_cctools.mk | 9 ++++--- contrib/depends/packages/native_libtapi.mk | 26 +++++++++++++++++++ contrib/depends/packages/packages.mk | 2 +- .../patches/native_cctools/skip_otool.patch | 12 --------- 5 files changed, 33 insertions(+), 18 deletions(-) create mode 100644 contrib/depends/packages/native_libtapi.mk delete mode 100644 contrib/depends/patches/native_cctools/skip_otool.patch diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk index 0b6582003..2226f779c 100644 --- a/contrib/depends/hosts/darwin.mk +++ b/contrib/depends/hosts/darwin.mk @@ -1,7 +1,7 @@ OSX_MIN_VERSION=10.8 OSX_SDK_VERSION=11.1 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk -LD64_VERSION=253.9 +LD64_VERSION=609 ifeq (aarch64, $(host_arch)) CC_target=arm64-apple-darwin11 else diff --git a/contrib/depends/packages/native_cctools.mk b/contrib/depends/packages/native_cctools.mk index 64a72e484..02da9cd84 100644 --- a/contrib/depends/packages/native_cctools.mk +++ b/contrib/depends/packages/native_cctools.mk @@ -1,9 +1,9 @@ package=native_cctools -$(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6 -$(package)_download_path=https://github.com/theuni/cctools-port/archive +$(package)_version=04663295d0425abfac90a42440a7ec02d7155fea +$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_download_file=$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a +$(package)_sha256_hash=70a7189418c2086d20c299c5d59250cf5940782c778892ccc899c66516ed240e $(package)_build_subdir=cctools $(package)_clang_version=3.7.1 $(package)_clang_download_path=http://llvm.org/releases/$($(package)_clang_version) @@ -12,6 +12,7 @@ $(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-g $(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9 $(package)_extra_sources=$($(package)_clang_file_name) $(package)_patches=skip_otool.patch +$(package)_dependencies=native_libtapi define $(package)_fetch_cmds $(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ @@ -33,7 +34,7 @@ define $(package)_extract_cmds endef define $(package)_set_vars -$(package)_config_opts=--target=$(host) --disable-lto-support +$(package)_config_opts=--target=$(host) --disable-lto-support --with-libtapi=$(host_prefix) $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib $(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang $(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++ diff --git a/contrib/depends/packages/native_libtapi.mk b/contrib/depends/packages/native_libtapi.mk new file mode 100644 index 000000000..68c5047e9 --- /dev/null +++ b/contrib/depends/packages/native_libtapi.mk @@ -0,0 +1,26 @@ +package=native_libtapi +$(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026 +$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive +$(package)_download_file=$($(package)_version).tar.gz +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61 +$(package)_build_subdir=build + +define $(package)_config_cmds + echo -n $(build_prefix) > INSTALLPREFIX; \ + cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DCMAKE_BUILD_TYPE=RELEASE \ + -DTAPI_REPOSITORY_STRING="1100.0.11" \ + -DTAPI_FULL_VERSION="11.0.0" \ + -DCMAKE_CXX_FLAGS="-I $($(package)_extract_dir)/src/llvm/projects/clang/include -I $($(package)_build_dir)/projects/clang/include" \ + $($(package)_extract_dir)/src/llvm +endef + +define $(package)_build_cmds + $(MAKE) clangBasic && $(MAKE) libtapi +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install-libtapi install-tapi-headers +endef diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk index eed9e8ec1..93cd07802 100644 --- a/contrib/depends/packages/packages.mk +++ b/contrib/depends/packages/packages.mk @@ -34,6 +34,6 @@ mingw32_packages = icu4c sodium $(hardware_packages) mingw32_native_packages = $(hardware_native_packages) ifneq ($(build_os),darwin) -darwin_native_packages += native_cctools +darwin_native_packages += native_cctools native_libtapi endif diff --git a/contrib/depends/patches/native_cctools/skip_otool.patch b/contrib/depends/patches/native_cctools/skip_otool.patch deleted file mode 100644 index 30c4ee524..000000000 --- a/contrib/depends/patches/native_cctools/skip_otool.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- cctools/Makefile.am.O 2016-06-09 15:06:16.000000000 +0100 -+++ cctools/Makefile.am 2019-11-18 08:59:20.078663220 +0000 -@@ -1,7 +1,7 @@ - if ISDARWIN --SUBDIRS=libstuff ar as misc otool ld64 $(LD_CLASSIC) -+SUBDIRS=libstuff ar as misc ld64 $(LD_CLASSIC) - else --SUBDIRS=libstuff ar as misc libobjc2 otool ld64 $(LD_CLASSIC) -+SUBDIRS=libstuff ar as misc ld64 $(LD_CLASSIC) - endif - - ACLOCAL_AMFLAGS = -I m4