commit | author | age
|
364ce7
|
1 |
# |
AL |
2 |
# This file and its contents are supplied under the terms of the |
|
3 |
# Common Development and Distribution License ("CDDL"), version 1.0. |
|
4 |
# You may only use this file in accordance with the terms of version |
|
5 |
# 1.0 of the CDDL. |
|
6 |
# |
|
7 |
# A full copy of the text of the CDDL should have accompanied this |
|
8 |
# source. A copy of the CDDL is also available via the Internet at |
|
9 |
# http://www.illumos.org/license/CDDL. |
|
10 |
# |
|
11 |
|
|
12 |
# |
|
13 |
# Copyright 2016 Aurelien Larcher. All rights reserved. |
|
14 |
# |
|
15 |
|
|
16 |
include ../../../make-rules/shared-macros.mk |
|
17 |
|
|
18 |
COMPONENT_NAME= clang-40 |
|
19 |
LLVM_NAME=llvm |
|
20 |
CLANG_NAME=cfe |
|
21 |
|
3f034a
|
22 |
COMPONENT_VERSION= 4.0.1 |
364ce7
|
23 |
COMPONENT_MAJOR_VERSION= \ |
AL |
24 |
$(shell echo $(COMPONENT_VERSION) | $(GSED) -e 's/\([0-9]\+\.[0-9]\+\).*/\1/') |
|
25 |
COMPONENT_PROJECT_URL = http://llvm.org/ |
|
26 |
COMPONENT_FMRI= developer/clang-40 |
|
27 |
COMPONENT_CLASSIFICATION= Development/C |
|
28 |
COMPONENT_SUMMARY= LLVM tools and Clang compiler |
|
29 |
COMPONENT_SRC= $(LLVM_NAME)-$(COMPONENT_VERSION).src |
|
30 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
|
31 |
COMPONENT_ARCHIVE_HASH= \ |
3f034a
|
32 |
sha256:da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51 |
364ce7
|
33 |
COMPONENT_ARCHIVE_URL= \ |
AL |
34 |
http://llvm.org/releases/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
|
35 |
COMPONENT_LICENSE= BSD |
|
36 |
|
|
37 |
COMPONENT_ARCHIVE_1= $(CLANG_NAME)-$(COMPONENT_VERSION).src.tar.xz |
|
38 |
COMPONENT_ARCHIVE_HASH_1= \ |
3f034a
|
39 |
sha256:61738a735852c23c3bdbe52d035488cdb2083013f384d67c1ba36fabebd8769b |
364ce7
|
40 |
COMPONENT_ARCHIVE_URL_1= http://llvm.org/releases/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE_1) |
AL |
41 |
|
|
42 |
include $(WS_MAKE_RULES)/prep.mk |
|
43 |
include $(WS_MAKE_RULES)/cmake.mk |
|
44 |
include $(WS_MAKE_RULES)/ips.mk |
|
45 |
|
|
46 |
CMAKE_PREFIX= /usr/clang/$(COMPONENT_MAJOR_VERSION) |
|
47 |
|
|
48 |
PATH=$(PATH.illumos) |
|
49 |
|
|
50 |
COMPONENT_POST_UNPACK_ACTION += \ |
|
51 |
$(UNPACK) $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_1) && \ |
|
52 |
mv $(CLANG_NAME)-$(COMPONENT_VERSION).src $(COMPONENT_SRC)/tools/clang |
|
53 |
|
|
54 |
COMPONENT_PRE_CONFIGURE_ACTION = (cp -a $(SOURCE_DIR)/* $(@D)) |
|
55 |
|
|
56 |
COMPONENT_POST_INSTALL_ACTION = \ |
|
57 |
for file in `echo $(PROTO_DIR)/$(CMAKE_PREFIX)/bin/*`; do \ |
96e01e
|
58 |
elfedit -e 'dyn:runpath $(GCC_ROOT)/lib:$$ORIGIN/../lib' $$file ; \ |
364ce7
|
59 |
done && \ |
AL |
60 |
for file in \ |
|
61 |
`ggrep -rlh '^\#!*/usr/bin/env python' $(PROTO_DIR)/$(CMAKE_PREFIX)`; do \ |
|
62 |
sed -i -e 's,^\#!*/usr/bin/env python,\#!$(PYTHON),' $$file; \ |
|
63 |
done |
|
64 |
|
|
65 |
COMPONENT_TEST_TARGETS = check-all |
|
66 |
COMPONENT_TEST_ENV += PATH=/usr/gnu/bin:/usr/bin |
|
67 |
|
|
68 |
CMAKE_OPTIONS += -DCMAKE_C_COMPILER=$(CC) |
|
69 |
CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX) |
|
70 |
CMAKE_OPTIONS += -DGCC_INSTALL_PREFIX=$(GCC_ROOT) |
|
71 |
CMAKE_OPTIONS += -DCMAKE_CXX_LINK_FLAGS="-L$(GCC_ROOT)/lib -Wl,-rpath,$(GCC_ROOT)/lib" |
|
72 |
CMAKE_OPTIONS += -DLLVM_ENABLE_ASSERTIONS=ON |
|
73 |
CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE="Release" |
|
74 |
|
|
75 |
|
|
76 |
build: $(BUILD_32) |
|
77 |
|
|
78 |
install: $(INSTALL_32) |
|
79 |
|
|
80 |
test: $(TEST_32) |
|
81 |
|
|
82 |
# Auto-generated dependencies |
|
83 |
REQUIRED_PACKAGES += library/libxml2 |
|
84 |
REQUIRED_PACKAGES += library/zlib |
|
85 |
REQUIRED_PACKAGES += runtime/python-27 |
|
86 |
REQUIRED_PACKAGES += system/library |
f5010f
|
87 |
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG) |
969846
|
88 |
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG) |
364ce7
|
89 |
REQUIRED_PACKAGES += system/library/math |