|
1 | 1 | package=native_cctools |
2 | | -$(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6 |
3 | | -$(package)_download_path=https://github.com/theuni/cctools-port/archive |
4 | | -$(package)_file_name=$($(package)_version).tar.gz |
5 | | -$(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a |
6 | | -$(package)_build_subdir=cctools |
7 | | -$(package)_clang_version=3.7.1 |
8 | | -$(package)_clang_download_path=http://llvm.org/releases/$($(package)_clang_version) |
9 | | -$(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz |
10 | | -$(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz |
11 | | -$(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9 |
12 | | -$(package)_extra_sources=$($(package)_clang_file_name) |
| 2 | +$(package)_version=master |
| 3 | +$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive/refs/heads |
| 4 | +$(package)_file_name=$(package)_$(package)_version.tar.gz |
| 5 | +$(package)_sha256_hash=579c46ce16a269f202de4f4118db00bfdef95e3aa251cc79d4726faef9f4dab2 |
13 | 6 |
|
14 | | -define $(package)_fetch_cmds |
15 | | -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ |
16 | | -$(call fetch_file,$(package),$($(package)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) |
17 | | -endef |
18 | | - |
19 | | -define $(package)_extract_cmds |
20 | | - mkdir -p $($(package)_extract_dir) && \ |
21 | | - echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
22 | | - echo "$($(package)_clang_sha256_hash) $($(package)_source_dir)/$($(package)_clang_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
23 | | - $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
24 | | - mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \ |
25 | | - tar --strip-components=1 -C toolchain -xf $($(package)_source_dir)/$($(package)_clang_file_name) && \ |
26 | | - rm -f toolchain/lib/libc++abi.so* && \ |
27 | | - echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \ |
28 | | - echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \ |
29 | | - chmod +x toolchain/bin/$(host)-dsymutil && \ |
30 | | - tar --strip-components=1 -xf $($(package)_source) |
31 | | -endef |
32 | | - |
33 | | -define $(package)_set_vars |
34 | | -$(package)_config_opts=--target=$(host) --disable-lto-support |
35 | | -$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib |
36 | | -$(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang |
37 | | -$(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++ |
38 | | -endef |
| 7 | +$(package)_clang_version=10.0.0 |
| 8 | +$(package)_clang_download_path=https://github.com/llvm/llvm-project/releases/download/llvmorg-$($(package)_clang_version) |
| 9 | +$(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz |
| 10 | +$(package)_clang_file_name=$($(package)_clang_download_file) |
| 11 | +$(package)_clang_sha256_hash=b25f592a0c00686f03e3b7db68ca6dc87418f681f4ead4df4745a01d9be63843 |
39 | 12 |
|
40 | 13 | define $(package)_preprocess_cmds |
41 | | - cd $($(package)_build_subdir); ./autogen.sh && \ |
42 | | - sed -i.old "/define HAVE_PTHREADS/d" ld64/src/ld/InputFiles.h |
| 14 | + cd tools && ./autogen.sh && cd .. |
43 | 15 | endef |
44 | 16 |
|
45 | 17 | define $(package)_config_cmds |
46 | | - $($(package)_autoconf) |
| 18 | + ./configure --target=$(HOST) --prefix=$(build_prefix) |
47 | 19 | endef |
48 | 20 |
|
49 | 21 | define $(package)_build_cmds |
50 | 22 | $(MAKE) |
51 | 23 | endef |
52 | 24 |
|
53 | 25 | define $(package)_stage_cmds |
54 | | - $(MAKE) DESTDIR=$($(package)_staging_dir) install && \ |
55 | | - cd $($(package)_extract_dir)/toolchain && \ |
56 | | - mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include && \ |
57 | | - mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \ |
58 | | - cp bin/clang $($(package)_staging_prefix_dir)/bin/ &&\ |
59 | | - cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\ |
60 | | - cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ |
61 | | - cp -rf lib/clang/$($(package)_clang_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include/ && \ |
62 | | - cp bin/llvm-dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ |
63 | | - if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \ |
64 | | - if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi |
| 26 | + $(MAKE) DESTDIR=$(staging_dir) install |
65 | 27 | endef |
0 commit comments