@@ -4,27 +4,39 @@ $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
4
4
$(package)_file_name =$($(package ) _version) .tar.gz
5
5
$(package)_sha256_hash =a2d491c0981cef72fee2b833598f20f42a6c44a7614a61c439bda93d56446fec
6
6
$(package)_build_subdir =cctools
7
+ ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG ) ) ,)
7
8
$(package)_clang_version =8.0.0
8
9
$(package)_clang_download_path =https://releases.llvm.org/$($(package ) _clang_version)
9
10
$(package)_clang_download_file =clang+llvm-$($(package ) _clang_version) -x86_64-linux-gnu-ubuntu-14.04.tar.xz
10
11
$(package)_clang_file_name =clang-llvm-$($(package ) _clang_version) -x86_64-linux-gnu-ubuntu-14.04.tar.xz
11
12
$(package)_clang_sha256_hash =9ef854b71949f825362a119bf2597f744836cb571131ae6b721cd102ffea8cd0
13
+ endif
12
14
13
15
$(package)_libtapi_version =3efb201881e7a76a21e0554906cf306432539cef
14
16
$(package)_libtapi_download_path =https://github.com/tpoechtrager/apple-libtapi/archive
15
17
$(package)_libtapi_download_file =$($(package ) _libtapi_version) .tar.gz
16
18
$(package)_libtapi_file_name =$($(package ) _libtapi_version) .tar.gz
17
19
$(package)_libtapi_sha256_hash =380c1ca37cfa04a8699d0887a8d3ee1ad27f3d08baba78887c73b09485c0fbd3
18
20
19
- $(package)_extra_sources =$($(package ) _clang_file_name)
20
- $(package)_extra_sources += $($(package ) _libtapi_file_name)
21
+ $(package)_extra_sources =$($(package ) _libtapi_file_name)
22
+ ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG ) ) ,)
23
+ $(package)_extra_sources += $($(package ) _clang_file_name)
24
+ endif
21
25
26
+ ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG ) ) ,)
22
27
define $(package)_fetch_cmds
23
28
$(call fetch_file,$(package ) ,$($(package ) _download_path) ,$($(package ) _download_file) ,$($(package ) _file_name) ,$($(package ) _sha256_hash) ) && \
24
29
$(call fetch_file,$(package ) ,$($(package ) _clang_download_path) ,$($(package ) _clang_download_file) ,$($(package ) _clang_file_name) ,$($(package ) _clang_sha256_hash) ) && \
25
30
$(call fetch_file,$(package ) ,$($(package ) _libtapi_download_path) ,$($(package ) _libtapi_download_file) ,$($(package ) _libtapi_file_name) ,$($(package ) _libtapi_sha256_hash) )
26
31
endef
32
+ else
33
+ define $(package)_fetch_cmds
34
+ $(call fetch_file,$(package ) ,$($(package ) _download_path) ,$($(package ) _download_file) ,$($(package ) _file_name) ,$($(package ) _sha256_hash) ) && \
35
+ $(call fetch_file,$(package ) ,$($(package ) _libtapi_download_path) ,$($(package ) _libtapi_download_file) ,$($(package ) _libtapi_file_name) ,$($(package ) _libtapi_sha256_hash) )
36
+ endef
37
+ endif
27
38
39
+ ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG ) ) ,)
28
40
define $(package)_extract_cmds
29
41
mkdir -p $($(package ) _extract_dir) && \
30
42
echo "$($(package ) _sha256_hash) $($(package ) _source) " > $($(package ) _extract_dir) /.$($(package ) _file_name) .hash && \
@@ -38,12 +50,28 @@ define $(package)_extract_cmds
38
50
rm -f toolchain/lib/libc++abi.so* && \
39
51
tar --no-same-owner --strip-components=1 -xf $($(package ) _source)
40
52
endef
53
+ else
54
+ define $(package)_extract_cmds
55
+ mkdir -p $($(package ) _extract_dir) && \
56
+ echo "$($(package ) _sha256_hash) $($(package ) _source) " > $($(package ) _extract_dir) /.$($(package ) _file_name) .hash && \
57
+ echo "$($(package ) _libtapi_sha256_hash) $($(package ) _source_dir) /$($(package ) _libtapi_file_name) " >> $($(package ) _extract_dir) /.$($(package ) _file_name) .hash && \
58
+ $(build_SHA256SUM ) -c $($(package ) _extract_dir) /.$($(package ) _file_name) .hash && \
59
+ mkdir -p libtapi && \
60
+ tar --no-same-owner --strip-components=1 -C libtapi -xf $($(package ) _source_dir) /$($(package ) _libtapi_file_name) && \
61
+ tar --no-same-owner --strip-components=1 -xf $($(package ) _source)
62
+ endef
63
+ endif
41
64
42
65
define $(package)_set_vars
43
66
$(package ) _config_opts=--target=$(host ) --disable-lto-support --with-libtapi=$($(package ) _extract_dir)
44
67
$(package ) _ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
68
+ ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG ) ) ,)
45
69
$(package ) _cc=$($(package ) _extract_dir) /toolchain/bin/clang
46
70
$(package ) _cxx=$($(package ) _extract_dir) /toolchain/bin/clang++
71
+ else
72
+ $(package ) _cc=clang
73
+ $(package ) _cxx=clang++
74
+ endif
47
75
endef
48
76
49
77
define $(package)_preprocess_cmds
@@ -60,6 +88,7 @@ define $(package)_build_cmds
60
88
$(MAKE )
61
89
endef
62
90
91
+ ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG ) ) ,)
63
92
define $(package)_stage_cmds
64
93
$(MAKE ) DESTDIR=$($(package ) _staging_dir) install && \
65
94
mkdir -p $($(package ) _staging_prefix_dir) /lib/ && \
@@ -74,3 +103,11 @@ define $(package)_stage_cmds
74
103
cp -rf lib/clang/$($(package ) _clang_version) /include/* $($(package ) _staging_prefix_dir) /lib/clang/$($(package ) _clang_version) /include/ && \
75
104
cp bin/dsymutil $($(package ) _staging_prefix_dir) /bin/$(host ) -dsymutil
76
105
endef
106
+ else
107
+ define $(package)_stage_cmds
108
+ $(MAKE ) DESTDIR=$($(package ) _staging_dir) install && \
109
+ mkdir -p $($(package ) _staging_prefix_dir) /lib/ && \
110
+ cd $($(package ) _extract_dir) && \
111
+ cp lib/libtapi.so.6 $($(package ) _staging_prefix_dir) /lib/
112
+ endef
113
+ endif
0 commit comments