| @@ -1,39 +1,39 @@ | | | @@ -1,39 +1,39 @@ |
1 | # $NetBSD: Makefile,v 1.13 2022/08/12 13:59:52 gutteridge Exp $ | | 1 | # $NetBSD: Makefile,v 1.14 2022/08/13 10:07:26 tnn Exp $ |
2 | | | 2 | |
3 | .include "../../lang/llvm/version.mk" | | 3 | .include "../../lang/llvm/version.mk" |
4 | | | 4 | |
5 | DISTNAME= compiler-rt-${LLVM_VERSION}.src | | 5 | DISTNAME= compiler-rt-${LLVM_VERSION}.src |
6 | PKGNAME= ${DISTNAME:S/.src//:S/compiler-rt-/wasi-compiler-rt-/} | | 6 | PKGNAME= ${DISTNAME:S/.src//:S/compiler-rt-/wasi-compiler-rt-/} |
7 | CATEGORIES= lang devel | | 7 | CATEGORIES= lang devel |
8 | | | 8 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 9 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= https://compiler-rt.llvm.org/ | | 10 | HOMEPAGE= https://compiler-rt.llvm.org/ |
11 | COMMENT= LLVM runtime libraries for WASI/WebAssembly | | 11 | COMMENT= LLVM runtime libraries for WASI/WebAssembly |
12 | LICENSE= apache-2.0 | | 12 | LICENSE= apache-2.0 |
13 | | | 13 | |
14 | PATCHDIR= ${.CURDIR}/../../lang/compiler-rt/patches | | 14 | PATCHDIR= ${.CURDIR}/../../lang/compiler-rt/patches |
15 | DISTINFO_FILE= ${.CURDIR}/../../lang/compiler-rt/distinfo | | 15 | DISTINFO_FILE= ${.CURDIR}/../../lang/compiler-rt/distinfo |
16 | | | 16 | |
17 | NOT_FOR_PLATFORM= NetBSD-[0-7].*-* | | 17 | NOT_FOR_PLATFORM= NetBSD-[0-7].*-* |
18 | | | 18 | |
19 | USE_CMAKE= yes | | 19 | USE_CMAKE= yes |
20 | USE_LANGUAGES= c99 c++11 | | 20 | USE_LANGUAGES= c99 c++11 |
21 | USE_TOOLS+= ggrep | | 21 | USE_TOOLS+= ggrep |
22 | | | 22 | |
23 | SSP_SUPPORTED= no | | 23 | SSP_SUPPORTED= no |
24 | PKGSRC_USE_STACK_CHECK= no | | 24 | PKGSRC_USE_STACK_CHECK= no |
25 | | | 25 | |
26 | CONFIGURE_DIRS= ../build | | 26 | CONFIGURE_DIRS= build |
27 | CMAKE_ARG_PATH= ${WRKSRC}/lib/builtins | | 27 | CMAKE_ARG_PATH= ${WRKSRC}/lib/builtins |
28 | | | 28 | |
29 | BUILDLINK_TRANSFORM+= rm:-I/usr/include | | 29 | BUILDLINK_TRANSFORM+= rm:-I/usr/include |
30 | BUILDLINK_TRANSFORM+= rm:-I${PREFIX}/include | | 30 | BUILDLINK_TRANSFORM+= rm:-I${PREFIX}/include |
31 | | | 31 | |
32 | CMAKE_ARGS+= -DCMAKE_VERBOSE_MAKEFILE=1 | | 32 | CMAKE_ARGS+= -DCMAKE_VERBOSE_MAKEFILE=1 |
33 | | | 33 | |
34 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release | | 34 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release |
35 | CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CC:Q} | | 35 | CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CC:Q} |
36 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CXX:Q} | | 36 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CXX:Q} |
37 | CMAKE_ARGS+= -DCOMPILER_RT_TEST_COMPILER=${CC:Q} | | 37 | CMAKE_ARGS+= -DCOMPILER_RT_TEST_COMPILER=${CC:Q} |
38 | CMAKE_ARGS+= -DCOMPILER_RT_OS_DIR:STRING=wasi | | 38 | CMAKE_ARGS+= -DCOMPILER_RT_OS_DIR:STRING=wasi |
39 | CMAKE_ARGS+= -DLLVM_CONFIG_PATH=${LLVM_CONFIG_PATH:Q} | | 39 | CMAKE_ARGS+= -DLLVM_CONFIG_PATH=${LLVM_CONFIG_PATH:Q} |
| @@ -48,27 +48,27 @@ CMAKE_ARGS+= -DCOMPILER_RT_HAS_FNO_BUILT | | | @@ -48,27 +48,27 @@ CMAKE_ARGS+= -DCOMPILER_RT_HAS_FNO_BUILT |
48 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_STD_C11_FLAG:BOOL=ON | | 48 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_STD_C11_FLAG:BOOL=ON |
49 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG:BOOL=ON | | 49 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG:BOOL=ON |
50 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_FREESTANDING_FLAG:BOOL=ON | | 50 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_FREESTANDING_FLAG:BOOL=ON |
51 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_XRAY_COMPILER_FLAG:BOOL=OFF | | 51 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_XRAY_COMPILER_FLAG:BOOL=OFF |
52 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_ATOMIC_KEYWORD:BOOL=ON | | 52 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_ATOMIC_KEYWORD:BOOL=ON |
53 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_FLOAT16:BOOL=OFF | | 53 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_FLOAT16:BOOL=OFF |
54 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_ASM_LSE:BOOL=OFF | | 54 | CMAKE_ARGS+= -DCOMPILER_RT_HAS_ASM_LSE:BOOL=OFF |
55 | CMAKE_ARGS+= -DCMAKE_C_COMPILER_WORKS=1 # Do not test clang compile | | 55 | CMAKE_ARGS+= -DCMAKE_C_COMPILER_WORKS=1 # Do not test clang compile |
56 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER_WORKS=1 # Do not test clang++ compile | | 56 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER_WORKS=1 # Do not test clang++ compile |
57 | | | 57 | |
58 | CMAKE_INSTALL_PREFIX= ${PREFIX}/lib/clang/${PKGVERSION_NOREV} | | 58 | CMAKE_INSTALL_PREFIX= ${PREFIX}/lib/clang/${PKGVERSION_NOREV} |
59 | | | 59 | |
60 | post-extract: | | 60 | post-extract: |
61 | ${MKDIR} ${WRKDIR}/build | | 61 | ${MKDIR} ${WRKSRC}/build |
62 | | | 62 | |
63 | # Run llvm-ranlib again on the archive. Fixes mystery build failure | | 63 | # Run llvm-ranlib again on the archive. Fixes mystery build failure |
64 | # in Firefox due to missing index (see PR pkg/56590). Might be a MAKE_JOBS | | 64 | # in Firefox due to missing index (see PR pkg/56590). Might be a MAKE_JOBS |
65 | # problem in this package? | | 65 | # problem in this package? |
66 | post-install: | | 66 | post-install: |
67 | ${PREFIX}/bin/llvm-ranlib \ | | 67 | ${PREFIX}/bin/llvm-ranlib \ |
68 | ${DESTDIR}${PREFIX}/lib/clang/${PKGVERSION_NOREV}/lib/wasi/libclang_rt.builtins-wasm32.a | | 68 | ${DESTDIR}${PREFIX}/lib/clang/${PKGVERSION_NOREV}/lib/wasi/libclang_rt.builtins-wasm32.a |
69 | | | 69 | |
70 | .include "../../mk/bsd.prefs.mk" | | 70 | .include "../../mk/bsd.prefs.mk" |
71 | | | 71 | |
72 | ABI= # 32 | | 72 | ABI= # 32 |
73 | CFLAGS= -O2 | | 73 | CFLAGS= -O2 |
74 | CXXFLAGS= -O2 | | 74 | CXXFLAGS= -O2 |