COMPONENT_TARGETS = $(HARDWARE_NOARCH)
include ../../../../build-system/constants.mk
url = $(DOWNLOAD_SERVER)/sources/packages/d/llvm
versions = 16.0.2
pkgname = llvm
suffix = tar.xz
tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
sha1s = $(addsuffix .sha1sum, $(tarballs))
patches = $(CURDIR)/patches/llvm-16.0.2-clang-gnu-triple.patch
patches += $(CURDIR)/patches/llvm-16.0.2-clang-set-revision.patch
patches += $(CURDIR)/patches/llvm-16.0.2-clangd-riscv64.patch
patches += $(CURDIR)/patches/llvm-16.0.2-compiler-rt-mips.patch
patches += $(CURDIR)/patches/llvm-16.0.2-compiler-rt-jz47xx.patch
patches += $(CURDIR)/patches/llvm-16.0.2-compiler-rt-p5600.patch
patches += $(CURDIR)/patches/llvm-16.0.2-compiler-rt-ppc64.patch
patches += $(CURDIR)/patches/llvm-16.0.2-compiler-rt-synonyms.patch
patches += $(CURDIR)/patches/llvm-16.0.2-lldb-instr-link.patch
patches += $(CURDIR)/patches/llvm-16.0.2-lldb-lua-version.patch
patches += $(CURDIR)/patches/llvm-16.0.2-lldb-riscv64.patch
patches += $(CURDIR)/patches/llvm-16.0.2-lldb-set-revision.patch
patches += $(CURDIR)/patches/llvm-16.0.2-llvm-64bit-atomic.patch
patches += $(CURDIR)/patches/llvm-16.0.2-llvm-install-symlink.patch
patches += $(CURDIR)/patches/llvm-16.0.2-llvm-pass-variables.patch
patches += $(CURDIR)/patches/llvm-16.0.2-llvm-ppc64.patch
patches += $(CURDIR)/patches/llvm-16.0.2-llvm-versioning.patch
patches += $(CURDIR)/patches/llvm-16.0.2-openmp-perl.patch
patches += $(CURDIR)/patches/llvm-16.0.2-polly-hack.patch
patches += $(CURDIR)/patches/llvm-16.0.2-pstl-x32.patch
patches += $(CURDIR)/patches/llvm-16.0.2-x32-interpreter.patch
patches += $(CURDIR)/patches/llvm-16.0.2-x64-interpreter.patch
.NOTPARALLEL: $(patches)
BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
include ../../../../build-system/core.mk
.PHONY: download_clean
$(tarballs):
@echo -e "\n======= Downloading source tarballs =======" ; \
for tarball in $(tarballs) ; do \
echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
done ; wait
$(sha1s): $(tarballs)
@for sha in $@ ; do \
echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
touch $$sha ; \
echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
sha1sum --check $$sha ; ret="$$?" ; \
if [ "$$ret" == "1" ]; then \
echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
exit 1 ; \
fi ; \
done
$(patches): $(sha1s)
@echo -e "\n======= Create Patches =======\n" ; \
( cd create-16.0.2-clang-gnu-triple-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-clang-set-revision-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-clangd-riscv64-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-compiler-rt-mips-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-compiler-rt-jz47xx-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-compiler-rt-p5600-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-compiler-rt-ppc64-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-compiler-rt-synonyms-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-lldb-instr-link-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-lldb-lua-version-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-lldb-riscv64-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-lldb-set-revision-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-llvm-64bit-atomic-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-llvm-install-symlink-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-llvm-pass-variables-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-llvm-ppc64-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-llvm-versioning-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-openmp-perl-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-polly-hack-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-pstl-x32-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-x32-interpreter-patch ; ./create.patch.sh ) ; \
( cd create-16.0.2-x64-interpreter-patch ; ./create.patch.sh ) ; \
echo -e "\n"
download_clean:
@rm -f $(tarballs) $(sha1s) $(patches)