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
)
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
))
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
)
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
++
40 define $(package
)_preprocess_cmds
41 cd
$($(package
)_build_subdir
); .
/autogen.sh
&& \
42 sed
-i.old
"/define HAVE_PTHREADS/d" ld64
/src
/ld/InputFiles.h
45 define $(package
)_config_cmds
46 $($(package
)_autoconf
)
49 define $(package
)_build_cmds
53 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