| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.87 2023/04/19 08:10:35 adam Exp $ | | 1 | # $NetBSD: Makefile,v 1.88 2023/06/27 10:31:32 riastradh Exp $ |
2 | # | | 2 | # |
3 | # When updating this, please also update: | | 3 | # When updating this, please also update: |
4 | # devel/include-what-you-use | | 4 | # devel/include-what-you-use |
5 | # devel/lld | | 5 | # devel/lld |
6 | # devel/lldb | | 6 | # devel/lldb |
7 | # devel/polly | | 7 | # devel/polly |
8 | # lang/clang | | 8 | # lang/clang |
9 | # lang/clang-tools-extra | | 9 | # lang/clang-tools-extra |
10 | # lang/compiler-rt | | 10 | # lang/compiler-rt |
11 | # lang/libcxx | | 11 | # lang/libcxx |
12 | # lang/libcxxabi | | 12 | # lang/libcxxabi |
13 | # lang/libunwind | | 13 | # lang/libunwind |
14 | # lang/wasi-compiler-rt | | 14 | # lang/wasi-compiler-rt |
| @@ -27,27 +27,27 @@ PKGREVISION= 1 | | | @@ -27,27 +27,27 @@ PKGREVISION= 1 |
27 | .include "version.mk" | | 27 | .include "version.mk" |
28 | | | 28 | |
29 | DISTNAME= llvm-${LLVM_VERSION}.src | | 29 | DISTNAME= llvm-${LLVM_VERSION}.src |
30 | PKGNAME= ${DISTNAME:S/.src//} | | 30 | PKGNAME= ${DISTNAME:S/.src//} |
31 | CATEGORIES= lang devel | | 31 | CATEGORIES= lang devel |
32 | | | 32 | |
33 | MAINTAINER= pkgsrc-users@NetBSD.org | | 33 | MAINTAINER= pkgsrc-users@NetBSD.org |
34 | HOMEPAGE= https://llvm.org/ | | 34 | HOMEPAGE= https://llvm.org/ |
35 | COMMENT= Low Level Virtual Machine compiler infrastructure | | 35 | COMMENT= Low Level Virtual Machine compiler infrastructure |
36 | LICENSE= apache-2.0 | | 36 | LICENSE= apache-2.0 |
37 | | | 37 | |
38 | USE_LANGUAGES= c c++14 | | 38 | USE_LANGUAGES= c c++14 |
39 | GCC_REQD+= 7 | | 39 | GCC_REQD+= 7 |
40 | PYTHON_FOR_BUILD_ONLY= yes | | 40 | PYTHON_FOR_BUILD_ONLY= tool |
41 | | | 41 | |
42 | PYTHON_VERSIONS_INCOMPATIBLE= 27 | | 42 | PYTHON_VERSIONS_INCOMPATIBLE= 27 |
43 | | | 43 | |
44 | NOT_FOR_PLATFORM+= *-*-alpha | | 44 | NOT_FOR_PLATFORM+= *-*-alpha |
45 | NOT_FOR_PLATFORM+= *-*-vax | | 45 | NOT_FOR_PLATFORM+= *-*-vax |
46 | | | 46 | |
47 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release | | 47 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release |
48 | CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CC:Q} | | 48 | CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CC:Q} |
49 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CXX:Q} | | 49 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CXX:Q} |
50 | CMAKE_ARGS+= -DCMAKE_CXX_LINK_FLAGS=${LDFLAGS:Q} | | 50 | CMAKE_ARGS+= -DCMAKE_CXX_LINK_FLAGS=${LDFLAGS:Q} |
51 | CMAKE_ARGS+= -DLLVM_BUILD_LLVM_DYLIB=ON | | 51 | CMAKE_ARGS+= -DLLVM_BUILD_LLVM_DYLIB=ON |
52 | CMAKE_ARGS+= -DLLVM_INCLUDE_BENCHMARKS=OFF | | 52 | CMAKE_ARGS+= -DLLVM_INCLUDE_BENCHMARKS=OFF |
53 | CMAKE_ARGS+= -DLLVM_INSTALL_UTILS=ON | | 53 | CMAKE_ARGS+= -DLLVM_INSTALL_UTILS=ON |
| @@ -122,26 +122,31 @@ CFLAGS+= -mno-pltseq | | | @@ -122,26 +122,31 @@ CFLAGS+= -mno-pltseq |
122 | CXXFLAGS+= -mno-pltseq | | 122 | CXXFLAGS+= -mno-pltseq |
123 | . endif # (just drop for older NetBSD) | | 123 | . endif # (just drop for older NetBSD) |
124 | . else # Not NetBSD | | 124 | . else # Not NetBSD |
125 | # Let's just insist on newer gcc -- untested. | | 125 | # Let's just insist on newer gcc -- untested. |
126 | CFLAGS+= -mno-pltseq | | 126 | CFLAGS+= -mno-pltseq |
127 | CXXFLAGS+= -mno-pltseq | | 127 | CXXFLAGS+= -mno-pltseq |
128 | . endif | | 128 | . endif |
129 | .endif | | 129 | .endif |
130 | | | 130 | |
131 | .if ${OPSYS} == "NetBSD" | | 131 | .if ${OPSYS} == "NetBSD" |
132 | CMAKE_ARGS+= -DPKGSRC_LLVM_PTHREADLIB=-lpthread | | 132 | CMAKE_ARGS+= -DPKGSRC_LLVM_PTHREADLIB=-lpthread |
133 | .endif | | 133 | .endif |
134 | | | 134 | |
| | | 135 | .if ${USE_CROSS_COMPILE:U:tl} == "yes" |
| | | 136 | TOOL_DEPENDS+= ${PKGNAME}:../../${PKGPATH} |
| | | 137 | CMAKE_ARGS+= -DLLVM_TABLEGEN:STRING=${TOOLBASE:Q}/bin/llvm-tblgen |
| | | 138 | .endif |
| | | 139 | |
135 | .include "options.mk" | | 140 | .include "options.mk" |
136 | | | 141 | |
137 | # replacing config.guess is required even for cmake. | | 142 | # replacing config.guess is required even for cmake. |
138 | # It is used to detect correct LLVM_HOST_TRIPLE, e.g. for NetBSD/evbarm. | | 143 | # It is used to detect correct LLVM_HOST_TRIPLE, e.g. for NetBSD/evbarm. |
139 | post-extract: | | 144 | post-extract: |
140 | .for f in config.guess config.sub | | 145 | .for f in config.guess config.sub |
141 | ${CP} ../../mk/gnu-config/${f} ${WRKSRC}/cmake/${f} | | 146 | ${CP} ../../mk/gnu-config/${f} ${WRKSRC}/cmake/${f} |
142 | .endfor | | 147 | .endfor |
143 | | | 148 | |
144 | .include "../../devel/cmake/build.mk" | | 149 | .include "../../devel/cmake/build.mk" |
145 | .include "../../archivers/zstd/buildlink3.mk" | | 150 | .include "../../archivers/zstd/buildlink3.mk" |
146 | .include "../../devel/zlib/buildlink3.mk" | | 151 | .include "../../devel/zlib/buildlink3.mk" |
147 | .include "../../lang/python/application.mk" | | 152 | .include "../../lang/python/application.mk" |