pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/wasi-compiler-rt
Module Name: pkgsrc
Committed By: ryoon
Date: Wed Oct 11 03:43:49 UTC 2023
Modified Files:
pkgsrc/lang/wasi-compiler-rt: Makefile
Log Message:
wasi-compiler-rt: fix build with llvm 16
* Fix build. Build specific static library only.
* TODO: Do not repeat CMake targets in Makefile.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/lang/wasi-compiler-rt/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/wasi-compiler-rt/Makefile
diff -u pkgsrc/lang/wasi-compiler-rt/Makefile:1.22 pkgsrc/lang/wasi-compiler-rt/Makefile:1.23
--- pkgsrc/lang/wasi-compiler-rt/Makefile:1.22 Fri Oct 6 19:18:15 2023
+++ pkgsrc/lang/wasi-compiler-rt/Makefile Wed Oct 11 03:43:49 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2023/10/06 19:18:15 adam Exp $
+# $NetBSD: Makefile,v 1.23 2023/10/11 03:43:49 ryoon Exp $
.include "../../lang/llvm/version.mk"
@@ -16,7 +16,10 @@ DISTINFO_FILE= ${.CURDIR}/../../lang/com
NOT_FOR_PLATFORM= NetBSD-[0-7].*-*
-USE_LANGUAGES= c99 c++11
+TOOL_DEPENDS+= cmake-[0-9]*:../../devel/cmake
+TOOL_DEPENDS+= lld-${LLVM_VERSION}*:../../devel/lld
+
+USE_LANGUAGES= c99 c++17
USE_TOOLS+= ggrep
SSP_SUPPORTED= no
@@ -25,6 +28,8 @@ PKGSRC_USE_STACK_CHECK= no
BUILDLINK_TRANSFORM+= rm:-I/usr/include
BUILDLINK_TRANSFORM+= rm:-I${PREFIX}/include
+CMAKE_BUILD_DIR= cmake-pkgsrc-build
+
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
CMAKE_ARGS+= -DCOMPILER_RT_TEST_COMPILER=${CC:Q}
CMAKE_ARGS+= -DCOMPILER_RT_OS_DIR:STRING=wasi
@@ -47,30 +52,51 @@ CMAKE_ARGS+= -DCOMPILER_RT_HAS_FLOAT16:B
CMAKE_ARGS+= -DCOMPILER_RT_HAS_ASM_LSE:BOOL=OFF
CMAKE_ARGS+= -DCMAKE_C_COMPILER_WORKS=1 # Do not test clang compile
CMAKE_ARGS+= -DCMAKE_CXX_COMPILER_WORKS=1 # Do not test clang++ compile
-CMAKE_ARGS+= -DCOMPILER_RT_ENABLE_IOS=OFF
+CMAKE_ARGS+= -DCOMPILER_RT_ENABLE_IOS:BOOL=OFF
CMAKE_INSTALL_PREFIX= ${PREFIX}/lib/clang/${LLVM_MAJOR_VERSION}
+CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
GENERATE_PLIST+= find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \
sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ;
.include "../../mk/bsd.prefs.mk"
+pre-configure:
+ ${RUN} ${MKDIR} ${WRKSRC}/${CMAKE_BUILD_DIR}
+
+do-configure:
+ ${RUN} cd ${WRKSRC}/${CMAKE_BUILD_DIR} && \
+ ${SETENV} ${CONFIGURE_ENV} cmake \
+ ${CMAKE_ARGS} \
+ ${WRKSRC}/lib/builtins
+
+do-build:
+ ${RUN} cd ${WRKSRC}/${CMAKE_BUILD_DIR} && \
+ ${SETENV} ${MAKE_ENV} \
+ ${MAKE} ${CMAKE_ARGS} ${BUILD_TARGET}
+
+do-install:
+ ${RUN} cd ${WRKSRC}/${CMAKE_BUILD_DIR} && \
+ ${SETENV} ${INSTALL_ENV} \
+ ${MAKE} ${CMAKE_ARGS} ${INSTALL_TARGET}
+
# Run llvm-ranlib again on the archive. Fixes mystery build failure
# in Firefox due to missing index (see PR pkg/56590). Might be a MAKE_JOBS
# problem in this package?
.if ${OPSYS} != "Darwin"
post-install:
${PREFIX}/bin/llvm-ranlib \
- ${DESTDIR}${PREFIX}/lib/clang/${LLVM_MAJOR_VERSION}/lib/wasi/libclang_rt.builtins-wasm32.a
+ ${DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/wasi/libclang_rt.builtins-wasm32.a
.endif
ABI= # 32
-CFLAGS= -O2
-CXXFLAGS= -O2
+CFLAGS+= -fno-exceptions
+CFLAGS+= -O2
+CXXFLAGS+= -O2
PKGSRC_COMPILER= clang
CLANGBASE= ${PREFIX}
-.include "../../devel/cmake/build.mk"
+#.include "../../devel/cmake/build.mk"
BUILDLINK_DEPMETHOD.clang= build
.include "../../lang/clang/buildlink3.mk"
.include "../../lang/llvm/buildlink3.mk"
Home |
Main Index |
Thread Index |
Old Index