diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2022-01-09 20:10:55 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2022-01-09 20:10:55 +0000 |
commit | 7f86dca264b57ffb11fbb59aa20da97f61d558b6 (patch) | |
tree | de5382e6b4fdc311cfdcd58a4fafe6b68b459cce | |
parent | 2d4bceb6a8bf21a3489547eca694699c801bd4c7 (diff) | |
download | pkgsrc-7f86dca264b57ffb11fbb59aa20da97f61d558b6.tar.gz |
Pullup ticket #6560 - requested by tnn
lang/wasi-compiler-rt: build fix
lang/wasi-libc: build fix
lang/wasi-libcxx: build fix
Revisions pulled up:
- lang/wasi-compiler-rt/Makefile 1.4-1.8
- lang/wasi-libc/Makefile 1.4-1.5
- lang/wasi-libcxx/Makefile 1.5-1.7
---
Module Name: pkgsrc
Committed By: tnn
Date: Fri Jan 7 13:32:48 UTC 2022
Modified Files:
pkgsrc/lang/wasi-compiler-rt: Makefile
pkgsrc/lang/wasi-libc: Makefile
pkgsrc/lang/wasi-libcxx: Makefile
Log Message:
wasi-*: force ABI=32
These packages were failing when ABI=64 in mk.conf, because then -m64 is
passed down to clang and WebAssembly currently only supports -m32.
---
Module Name: pkgsrc
Committed By: tnn
Date: Fri Jan 7 13:51:05 UTC 2022
Modified Files:
pkgsrc/lang/wasi-compiler-rt: Makefile
Log Message:
wasi-compiler-rt: don't circumvent pkgsrc wrappers
Fixes build failure on Linux due to BUILDLINK_TRANSFORM not kicking in.
---
Module Name: pkgsrc
Committed By: tnn
Date: Fri Jan 7 14:33:43 UTC 2022
Modified Files:
pkgsrc/lang/wasi-compiler-rt: Makefile
pkgsrc/lang/wasi-libcxx: Makefile
Log Message:
wasi-*: fix build failure when package already installed
Only use headers that pkgsrc has permitted via buildlink.
---
Module Name: pkgsrc
Committed By: tnn
Date: Fri Jan 7 15:49:53 UTC 2022
Modified Files:
pkgsrc/lang/wasi-compiler-rt: Makefile
pkgsrc/lang/wasi-libc: Makefile
pkgsrc/lang/wasi-libcxx: Makefile
Log Message:
wasi-*: eliminate -march and/or -mcpu CFLAGS user might have set
Random CFLAGS from mk.conf are not a good idea in a cross compile scenario.
Also reset ABI to empty string since -m32 can break some native CMake tests.
---
Module Name: pkgsrc
Committed By: tnn
Date: Fri Jan 7 20:24:40 UTC 2022
Modified Files:
pkgsrc/lang/wasi-compiler-rt: Makefile
Log Message:
wasi-compiler-rt: apply band-aid for ranlib error in www/firefox
-rw-r--r-- | lang/wasi-compiler-rt/Makefile | 23 | ||||
-rw-r--r-- | lang/wasi-libc/Makefile | 5 | ||||
-rw-r--r-- | lang/wasi-libcxx/Makefile | 7 |
3 files changed, 27 insertions, 8 deletions
diff --git a/lang/wasi-compiler-rt/Makefile b/lang/wasi-compiler-rt/Makefile index 87fbdc7bb59..0a01c8773b0 100644 --- a/lang/wasi-compiler-rt/Makefile +++ b/lang/wasi-compiler-rt/Makefile @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.3 2021/12/22 16:10:08 ryoon Exp $ +# $NetBSD: Makefile,v 1.3.2.1 2022/01/09 20:10:55 bsiegert Exp $ .include "../../lang/llvm/version.mk" DISTNAME= compiler-rt-${LLVM_VERSION}.src PKGNAME= ${DISTNAME:S/.src//:S/compiler-rt-/wasi-compiler-rt-/} +PKGREVISION= 1 CATEGORIES= lang devel MAINTAINER= pkgsrc-users@NetBSD.org @@ -32,14 +33,14 @@ BUILDLINK_TRANSFORM+= rm:-I${PREFIX}/include CMAKE_ARGS+= -DCMAKE_VERBOSE_MAKEFILE=1 CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release -CMAKE_ARGS+= -DCMAKE_C_COMPILER=${PREFIX}/bin/clang -CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${PREFIX}/bin/clang++ -CMAKE_ARGS+= -DCOMPILER_RT_TEST_COMPILER=${PREFIX}/bin/clang +CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CC:Q} +CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CXX:Q} +CMAKE_ARGS+= -DCOMPILER_RT_TEST_COMPILER=${CC:Q} CMAKE_ARGS+= -DCOMPILER_RT_OS_DIR:STRING=wasi CMAKE_ARGS+= -DLLVM_CONFIG_PATH=${LLVM_CONFIG_PATH:Q} CMAKE_ARGS+= -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=wasm32-wasi CMAKE_ARGS+= -DCOMPILER_RT_BAREMETAL_BUILD=TRUE -CMAKE_ARGS+= -DCMAKE_SYSROOT=${PREFIX}/wasi +CMAKE_ARGS+= -DCMAKE_SYSROOT=${BUILDLINK_DIR}/wasi CMAKE_ARGS+= -DCOMPILER_RT_BAREMETAL_BUILD=TRUE CMAKE_ARGS+= -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=TRUE CMAKE_ARGS+= -DCOMPILER_RT_HAS_FPIC_FLAG:BOOL=ON @@ -60,6 +61,18 @@ CMAKE_INSTALL_PREFIX= ${PREFIX}/lib/clang/13.0.0 post-extract: ${MKDIR} ${WRKDIR}/build +# Run llvm-ranlib again on the archive. Fixes mystery build failure +# in Firefox due to missing index. Might be a MAKE_JOBS problem in +# this package? +post-install: + ${PREFIX}/bin/llvm-ranlib \ + ${DESTDIR}${PREFIX}/lib/clang/${LLVM_VERSION}/lib/wasi/libclang_rt.builtins-wasm32.a + +.include "../../mk/bsd.prefs.mk" + +ABI= # 32 +CFLAGS= -O2 +CXXFLAGS= -O2 PKGSRC_COMPILER= clang CLANGBASE= ${PREFIX} BUILDLINK_DEPMETHOD.clang= build diff --git a/lang/wasi-libc/Makefile b/lang/wasi-libc/Makefile index 7c8598cc5f7..007d0c194d1 100644 --- a/lang/wasi-libc/Makefile +++ b/lang/wasi-libc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2021/12/22 16:09:45 ryoon Exp $ +# $NetBSD: Makefile,v 1.3.2.1 2022/01/09 20:10:55 bsiegert Exp $ GITHUB_PROJECT= wasi-libc GITHUB_TAG= ad5133410f66b93a2381db5b542aad5e0964db96 @@ -36,6 +36,9 @@ MAKE_FLAGS+= WASM_NM=${PREFIX}/bin/llvm-nm MAKE_FLAGS+= INSTALL_DIR=${DESTDIR}${PREFIX}/wasi BUILD_TARGET= finish +ABI= # 32 +CFLAGS= -O2 +CXXFLAGS= -O2 PKGSRC_COMPILER= clang CLANGBASE= ${PREFIX} BUILDLINK_DEPMETHOD.clang= build diff --git a/lang/wasi-libcxx/Makefile b/lang/wasi-libcxx/Makefile index d94565b3c53..8febebe2d71 100644 --- a/lang/wasi-libcxx/Makefile +++ b/lang/wasi-libcxx/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2021/12/27 10:00:13 wiz Exp $ +# $NetBSD: Makefile,v 1.4.2.1 2022/01/09 20:10:55 bsiegert Exp $ .include "../../lang/llvm/version.mk" @@ -52,7 +52,7 @@ CMAKE_ARGS+= -DCMAKE_CXX_COMPILER_WORKS=1 CMAKE_ARGS+= -DCXX_SUPPORTS_CXX11=ON CMAKE_ARGS+= -DLLVM_COMPILER_CHECKED=ON CMAKE_ARGS+= -DUNIX:BOOL=ON -CMAKE_ARGS+= -DCMAKE_SYSROOT=${PREFIX}/wasi +CMAKE_ARGS+= -DCMAKE_SYSROOT=${BUILDLINK_DIR}/wasi CMAKE_ARGS+= -DCMAKE_CXX_COMPILER_TARGET=wasm32-wasi CMAKE_ARGS+= -DLLVM_CONFIG_PATH=${PREFIX}/bin/llvm-config CMAKE_ARGS+= -DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi @@ -170,6 +170,9 @@ do-configure: .include "../../lang/llvm/buildlink3.mk" .include "../../lang/wasi-libc/buildlink3.mk" .include "../../lang/wasi-compiler-rt/buildlink3.mk" +ABI= # 32 +CFLAGS= -O2 +CXXFLAGS= -O2 PKGSRC_COMPILER= clang CLANGBASE= ${PREFIX} BUILDLINK_DEPMETHOD.clang= build |