head	1.35;
access;
symbols
	pkgsrc-2026Q1:1.34.0.2
	pkgsrc-2026Q1-base:1.34
	pkgsrc-2025Q4:1.33.0.6
	pkgsrc-2025Q4-base:1.33
	pkgsrc-2025Q3:1.33.0.4
	pkgsrc-2025Q3-base:1.33
	pkgsrc-2025Q2:1.33.0.2
	pkgsrc-2025Q2-base:1.33
	pkgsrc-2025Q1:1.29.0.4
	pkgsrc-2025Q1-base:1.29
	pkgsrc-2024Q4:1.29.0.2
	pkgsrc-2024Q4-base:1.29
	pkgsrc-2024Q3:1.26.0.2
	pkgsrc-2024Q3-base:1.26
	pkgsrc-2024Q2:1.24.0.2
	pkgsrc-2024Q2-base:1.24
	pkgsrc-2024Q1:1.22.0.4
	pkgsrc-2024Q1-base:1.22
	pkgsrc-2023Q4:1.22.0.2
	pkgsrc-2023Q4-base:1.22
	pkgsrc-2023Q3:1.20.0.4
	pkgsrc-2023Q3-base:1.20
	pkgsrc-2023Q2:1.20.0.2
	pkgsrc-2023Q2-base:1.20
	pkgsrc-2023Q1:1.18.0.2
	pkgsrc-2023Q1-base:1.18
	pkgsrc-2022Q4:1.16.0.2
	pkgsrc-2022Q4-base:1.16
	pkgsrc-2022Q3:1.13.0.2
	pkgsrc-2022Q3-base:1.13
	pkgsrc-2022Q2:1.10.0.2
	pkgsrc-2022Q2-base:1.10
	pkgsrc-2022Q1:1.9.0.2
	pkgsrc-2022Q1-base:1.9
	pkgsrc-2021Q4:1.4.0.2
	pkgsrc-2021Q4-base:1.4;
locks; strict;
comment	@# @;


1.35
date	2026.03.25.22.56.28;	author wiz;	state Exp;
branches;
next	1.34;
commitid	29BuEbar9GuKtpzG;

1.34
date	2026.01.07.08.47.43;	author wiz;	state Exp;
branches;
next	1.33;
commitid	1wQ3ICD8eebefrpG;

1.33
date	2025.05.09.19.37.14;	author wiz;	state Exp;
branches;
next	1.32;
commitid	WCR78K3U9f0aFgUF;

1.32
date	2025.05.09.05.51.26;	author adam;	state Exp;
branches;
next	1.31;
commitid	gd9WBpmGiiwY5cUF;

1.31
date	2025.04.17.21.51.24;	author wiz;	state Exp;
branches;
next	1.30;
commitid	xcIXAVA292fk6sRF;

1.30
date	2025.04.10.13.16.54;	author leot;	state Exp;
branches;
next	1.29;
commitid	QJ73pUZMAh4zuvQF;

1.29
date	2024.11.14.22.20.33;	author wiz;	state Exp;
branches;
next	1.28;
commitid	JmuDYqwL4erbdFxF;

1.28
date	2024.11.01.12.53.17;	author wiz;	state Exp;
branches;
next	1.27;
commitid	QB4Wk02mZPuBuWvF;

1.27
date	2024.11.01.00.52.31;	author wiz;	state Exp;
branches;
next	1.26;
commitid	QT27BdVP362gvSvF;

1.26
date	2024.08.25.06.18.58;	author wiz;	state Exp;
branches;
next	1.25;
commitid	BcrSL94SO85mvanF;

1.25
date	2024.07.06.15.45.09;	author adam;	state Exp;
branches;
next	1.24;
commitid	9KpFpYTi5zNpfNgF;

1.24
date	2024.05.29.16.33.18;	author adam;	state Exp;
branches;
next	1.23;
commitid	n8aFyEjEVZA0JUbF;

1.23
date	2024.04.22.07.26.42;	author adam;	state Exp;
branches;
next	1.22;
commitid	iCmbPjQYdlj0U67F;

1.22
date	2023.11.08.13.19.53;	author wiz;	state Exp;
branches;
next	1.21;
commitid	PsuHTklAIsF4bOLE;

1.21
date	2023.10.06.19.18.15;	author adam;	state Exp;
branches;
next	1.20;
commitid	BMXgu5CLxEDLeBHE;

1.20
date	2023.06.06.12.41.47;	author riastradh;	state Exp;
branches;
next	1.19;
commitid	xhspr6Z8JLQOWSrE;

1.19
date	2023.04.19.08.10.36;	author adam;	state Exp;
branches;
next	1.18;
commitid	B8gCWhWtMX9vZGlE;

1.18
date	2023.01.25.22.25.14;	author wiz;	state Exp;
branches;
next	1.17;
commitid	tTYtOk3OEQA0rYaE;

1.17
date	2023.01.24.18.36.29;	author wiz;	state Exp;
branches;
next	1.16;
commitid	ve7xOYU4T11xcPaE;

1.16
date	2022.11.30.19.55.00;	author adam;	state Exp;
branches;
next	1.15;
commitid	FkUfhZM3QnG4pL3E;

1.15
date	2022.11.23.16.20.31;	author adam;	state Exp;
branches;
next	1.14;
commitid	ju2K3LUYlTJKqQ2E;

1.14
date	2022.11.14.18.44.07;	author adam;	state Exp;
branches;
next	1.13;
commitid	D4GB0JeiCAn4wH1E;

1.13
date	2022.08.13.12.42.45;	author ryoon;	state Exp;
branches;
next	1.12;
commitid	0JVeUuoPhGI5wIPD;

1.12
date	2022.08.13.09.56.45;	author tnn;	state Exp;
branches;
next	1.11;
commitid	0NoxJ9pZLSA9BHPD;

1.11
date	2022.08.12.13.55.48;	author gutteridge;	state Exp;
branches;
next	1.10;
commitid	jEYznYTLAE55XAPD;

1.10
date	2022.04.18.19.11.32;	author adam;	state Exp;
branches;
next	1.9;
commitid	eC9Na3jrfOOUpIAD;

1.9
date	2022.02.04.11.06.58;	author wiz;	state Exp;
branches;
next	1.8;
commitid	aYL7utcYLqOS5irD;

1.8
date	2022.01.10.02.10.04;	author gutteridge;	state Exp;
branches;
next	1.7;
commitid	ppep3qbbRzznV1oD;

1.7
date	2022.01.07.15.49.53;	author tnn;	state Exp;
branches;
next	1.6;
commitid	EmR7b3Ma9K7HyInD;

1.6
date	2022.01.07.14.33.43;	author tnn;	state Exp;
branches;
next	1.5;
commitid	grPWpvOnkX9B8InD;

1.5
date	2022.01.07.13.32.48;	author tnn;	state Exp;
branches;
next	1.4;
commitid	ogBJhonBBH5ENHnD;

1.4
date	2021.12.27.10.00.13;	author wiz;	state Exp;
branches
	1.4.2.1;
next	1.3;
commitid	xzgTLbWvFqXDYgmD;

1.3
date	2021.12.22.16.10.43;	author ryoon;	state Exp;
branches;
next	1.2;
commitid	VC4xEp5ZxIdMbFlD;

1.2
date	2021.12.22.13.00.26;	author tnn;	state Exp;
branches;
next	1.1;
commitid	h8TsQsJ65thp8ElD;

1.1
date	2021.12.19.14.12.20;	author ryoon;	state Exp;
branches;
next	;
commitid	1Y1946D8PKiaDglD;

1.4.2.1
date	2022.01.09.20.10.55;	author bsiegert;	state Exp;
branches;
next	1.4.2.2;
commitid	7isQ8WJwAFCkWZnD;

1.4.2.2
date	2022.01.13.19.53.12;	author bsiegert;	state Exp;
branches;
next	;
commitid	BCYa3kHWRXmhIvoD;


desc
@@


1.35
log
@llvm and friends: update to to 20.1.8

Based on the wip packages and help from adam@@
@
text
@# $NetBSD: Makefile,v 1.34 2026/01/07 08:47:43 wiz Exp $

.include "../../lang/llvm/version.mk"

EXTRACT_ELEMENTS+=	${DISTNAME}/libc
EXTRACT_ELEMENTS+=	${DISTNAME}/libcxx
EXTRACT_ELEMENTS+=	${DISTNAME}/libcxxabi

PKGNAME=	wasi-libcxx-${LLVM_VERSION}
CATEGORIES=	lang devel

MAINTAINER=	pkgsrc-users@@NetBSD.org
HOMEPAGE=	https://libcxxabi.llvm.org/
COMMENT=	C++ Standard Libraries (libc++/libc++abi) for WASI/WebAssembly
LICENSE=	apache-2.0

WRKSRC=		${WRKDIR}/${DISTNAME}

TOOL_DEPENDS+=	lld-[0-9]*:../../devel/lld

# Workaround for header conflicts
BUILDLINK_TRANSFORM+=	rm:-I/usr/include
BUILDLINK_TRANSFORM+=	rm:-I${PREFIX}/include

BUILD_DIRS+=		${WRKDIR}/build_libcxx
BUILD_DIRS+=		${WRKDIR}/build_libcxxabi
INSTALL_DIRS+=		${BUILD_DIRS}

USE_LANGUAGES=	c c++
USE_CMAKE=	yes

SSP_SUPPORTED=		no
PKGSRC_USE_STACK_CHECK=	no

CMAKE_CONFIGURE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
#CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_LIBCXX_INCLUDES=${WRKSRC}/libcxx/include
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_USE_LLVM_UNWINDER=OFF
CMAKE_CONFIGURE_ARGS+=	-DCMAKE_C_COMPILER_WORKS=1
CMAKE_CONFIGURE_ARGS+=	-DCMAKE_CXX_COMPILER_WORKS=1
CMAKE_CONFIGURE_ARGS+=	-DCXX_SUPPORTS_CXX11=ON
CMAKE_CONFIGURE_ARGS+=	-DLLVM_COMPILER_CHECKED=ON
CMAKE_CONFIGURE_ARGS+=	-DUNIX:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DCMAKE_SYSROOT=${BUILDLINK_DIR}/wasi
CMAKE_CONFIGURE_ARGS+=	-DCMAKE_CXX_COMPILER_TARGET=wasm32-wasi
CMAKE_CONFIGURE_ARGS+=	-DLLVM_CONFIG_PATH=${PREFIX}/bin/llvm-config
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_INCLUDE_BENCHMARKS:BOOL=FALSE
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_INCLUDE_TESTS:BOOL=FALSE
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_ENABLE_THREADS:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_HAS_PTHREAD_API:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_HAS_EXTERNAL_THREAD_API:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_HAS_WIN32_THREAD_API:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_ENABLE_SHARED:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_ENABLE_EXCEPTIONS:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_ENABLE_FILESYSTEM:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_CXX_ABI=libcxxabi
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_HAS_MUSL_LIBC:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_ABI_VERSION=2
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_LIBDIR_SUFFIX=/wasm32-wasi
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_ENABLE_EXCEPTIONS:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_ENABLE_SHARED:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_SILENT_TERMINATE:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_ENABLE_THREADS:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_HAS_PTHREAD_API:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_HAS_EXTERNAL_THREAD_API:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_HAS_WIN32_THREAD_API:BOOL=OFF
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_SUPPORTS_FNO_EXCEPTIONS_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_SUPPORTS_NOSTDLIBXX_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_HAS_COMMENT_LIB_PRAGMA:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_SUPPORTS_FALIGNED_ALLOCATION_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_SUPPORTS_NOSTDINCXX_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_SUPPORTS_FVISIBIL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=	-DLIBCXXABI_SUPPORTS_WSIGN_CONVERSION_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_SUPPORTS_WSTRICT_ALIASING_EQ_2_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_SUPPORTS_WSTRICT_OVERFLOW_EQ_4_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_SUPPORTS_WUNUSED_PARAMETER_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_SUPPORTS_WUNUSED_VARIABLE_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_SUPPORTS_PEDANTIC_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_SUPPORTS_FSTRICT_ALIASING_FLAG:BOOL=ON
CMAKE_CONFIGURE_ARGS+=	-DCMAKE_CXX_LINK_FLAGS=${LDFLAGS:Q}
CMAKE_CONFIGURE_ARGS+=	-DCMAKE_C_FLAGS=-fno-exceptions
CMAKE_CONFIGURE_ARGS+=	-DCMAKE_CXX_FLAGS=-fno-exceptions
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_CXX_ABI=system-libcxxabi
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${WRKSRC}/libcxxabi/include

CMAKE_INSTALL_PREFIX=	${PREFIX}/wasi

# avoid conflict with stddef.h
CPPFLAGS.NetBSD+=	-D__DEFINED_max_align_t=1

post-extract:
	${MKDIR} ${WRKDIR}/build_libcxx
	${MKDIR} ${WRKDIR}/build_libcxxabi

do-configure:
	cd ${WRKDIR}/build_libcxx && \
	${PKGSRC_SETENV} ${_CONFIGURE_CMAKE_ENV} \
		cmake ${CMAKE_CONFIGURE_ARGS} ${WRKSRC}/libcxx
	cd ${WRKDIR}/build_libcxxabi && \
	${PKGSRC_SETENV} ${_CONFIGURE_CMAKE_ENV} \
		cmake ${CMAKE_CONFIGURE_ARGS} ${WRKSRC}/libcxxabi

# Run llvm-ranlib again on the archives. Fixes mystery build failure
# in Firefox due to missing index (see PR pkg/56590). Might be a MAKE_JOBS
# problem in this package?
post-install:
	${PREFIX}/bin/llvm-ranlib \
	  ${DESTDIR}${PREFIX}/wasi/lib/wasm32-wasi/libc++.a
	${PREFIX}/bin/llvm-ranlib \
	  ${DESTDIR}${PREFIX}/wasi/lib/wasm32-wasi/libc++abi.a

.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
.include "../../lang/clang/buildlink3.mk"
.include "../../lang/python/tool.mk"
.include "../../mk/bsd.pkg.mk"
@


1.34
log
@*: recursive bump for icu 78.1
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.33 2025/05/09 19:37:14 wiz Exp $
a2 1
PKGREVISION= 2
d5 5
a9 2
DISTNAME=	libcxxabi-${LLVM_VERSION}.src
PKGNAME=	${DISTNAME:S/.src//:S/libcxxabi-/wasi-libcxx-/}
d17 1
a17 10
WRKSRC=		${WRKDIR}

# libcxx requires libcxxabi's cxxabi.h to build, but libcxxabi requires
# libcxx's includes to build, so we have this unholy extra distfiles thing
# in both of them to get them to build against each other without causing
# circular dependencies.  This must be kept in sync with libcxxabi/Makefile.
LIBCXX=		libcxx-${LLVM_VERSION}.src
EXTRA_DIST+=	${LIBCXX}${EXTRACT_SUFX}
SITES.${LIBCXX}${EXTRACT_SUFX}=	\
	${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
d25 2
a26 2
BUILD_DIRS+=		build_libcxx
BUILD_DIRS+=		build_libcxxabi
d36 1
a36 1
CMAKE_CONFIGURE_ARGS+=	-DLIBCXXABI_LIBCXX_INCLUDES=${WRKDIR}/libcxx/include
d136 1
a136 1
CMAKE_CONFIGURE_ARGS+=	-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${WRKDIR}/libcxxabi/include
a145 2
	${LN} -f -s ${WRKDIR}/${DISTNAME} ${WRKDIR}/libcxxabi
	${LN} -f -s ${WRKDIR}/${LIBCXX} ${WRKDIR}/libcxx
d148 1
a148 1
	cd ${WRKSRC} && cd build_libcxx && \
d150 2
a151 2
		cmake ${CMAKE_CONFIGURE_ARGS} ../libcxx
	cd ${WRKSRC} && cd build_libcxxabi && \
d153 1
a153 1
		cmake ${CMAKE_CONFIGURE_ARGS} ../libcxxabi
@


1.33
log
@*: bump for llvm 19 (shlib major changed)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.32 2025/05/09 05:51:26 adam Exp $
d3 1
a3 1
PKGREVISION= 1
@


1.32
log
@llvm: updated to 19.1.7

19.1.7
https://releases.llvm.org/19.1.0/docs/ReleaseNotes.html
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.31 2025/04/17 21:51:24 wiz Exp $
d3 1
@


1.31
log
@*: recursive bump for icu 77 and libxml2 2.14
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.30 2025/04/10 13:16:54 leot Exp $
a2 1
PKGREVISION= 4
d182 1
@


1.30
log
@wasi-libcxx: Fix a typo in COMMENT

From Rares Aioanei via PR pkg/59274, thanks!
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.29 2024/11/14 22:20:33 wiz Exp $
d3 1
a3 1
PKGREVISION= 3
@


1.29
log
@*: recursive bump for icu 76 shlib major version bump
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.28 2024/11/01 12:53:17 wiz Exp $
d12 1
a12 1
COMMENT=	C++ Standard Librares (libc++/libc++abi) for WASI/WebAssembly
@


1.28
log
@*: revbump for icu downgrade
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.27 2024/11/01 00:52:31 wiz Exp $
d3 1
a3 1
PKGREVISION= 2
@


1.27
log
@*: recursive bump for icu 76.1 shlib bump
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.26 2024/08/25 06:18:58 wiz Exp $
d3 1
a3 1
PKGREVISION= 1
@


1.26
log
@*: replace CMAKE_ARGS with CMAKE_CONFIGURE_ARGS
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.25 2024/07/06 15:45:09 adam Exp $
d3 1
@


1.25
log
@llvm: updated to 18.1.8

https://releases.llvm.org
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.19 2023/04/19 08:10:36 adam Exp $
d41 102
a142 102
CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
CMAKE_ARGS+=	-DLIBCXXABI_LIBCXX_INCLUDES=${WRKDIR}/libcxx/include
CMAKE_ARGS+=	-DLIBCXXABI_USE_LLVM_UNWINDER=OFF
CMAKE_ARGS+=	-DCMAKE_C_COMPILER_WORKS=1
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=${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
CMAKE_ARGS+=	-DLIBCXX_INCLUDE_BENCHMARKS:BOOL=FALSE
CMAKE_ARGS+=	-DLIBCXX_INCLUDE_TESTS:BOOL=FALSE
CMAKE_ARGS+=	-DLIBCXX_ENABLE_THREADS:BOOL=OFF
CMAKE_ARGS+=	-DLIBCXX_HAS_PTHREAD_API:BOOL=OFF
CMAKE_ARGS+=	-DLIBCXX_HAS_EXTERNAL_THREAD_API:BOOL=OF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PPORTS_WSTRICT_OVERFLOW_EQ_4_FLAG:BOOL=ON
CMAKE_ARGS+=	-DLIBCXXABI_SUPPORTS_WUNUSED_PARAMETER_FLAG:BOOL=ON
CMAKE_ARGS+=	-DLIBCXXABI_SUPPORTS_WUNUSED_VARIABLE_FLAG:BOOL=ON
CMAKE_ARGS+=	-DLIBCXXABI_SUPPORTS_PEDANTIC_FLAG:BOOL=ON
CMAKE_ARGS+=	-DLIBCXXABI_SUPPORTS_FSTRICT_ALIASING_FLAG:BOOL=ON
CMAKE_ARGS+=	-DCMAKE_CXX_LINK_FLAGS=${LDFLAGS:Q}
CMAKE_ARGS+=	-DCMAKE_C_FLAGS=-fno-exceptions
CMAKE_ARGS+=	-DCMAKE_CXX_FLAGS=-fno-exceptions
CMAKE_ARGS+=	-DLIBCXX_CXX_ABI=system-libcxxabi
CMAKE_ARGS+=	-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${WRKDIR}/libcxxabi/include
d158 1
a158 1
		cmake ${CMAKE_ARGS} ../libcxx
d161 1
a161 1
		cmake ${CMAKE_ARGS} ../libcxxabi
@


1.24
log
@revbump after icu and protobuf updates
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.23 2024/04/22 07:26:42 adam Exp $
a2 1
PKGREVISION= 1
@


1.23
log
@wasi-compiler-rt wasi-libcxx: updated to 17.0.6

17.0.6
Match LLVM version
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.22 2023/11/08 13:19:53 wiz Exp $
d3 1
@


1.22
log
@*: recursive bump for icu 74.1
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.21 2023/10/06 19:18:15 adam Exp $
a2 1
PKGREVISION= 1
@


1.21
log
@wasi-compiler-rt, wasi-libcxx: update to LLVM 16
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.19 2023/04/19 08:10:36 adam Exp $
d3 1
@


1.20
log
@Mass-change BUILD_DEPENDS to TOOL_DEPENDS outside mk/.

Almost all uses, if not all of them, are wrong, according to the
semantics of BUILD_DEPENDS (packages built for target available for
use _by_ tools at build-time) and TOOL_DEPEPNDS (packages built for
host available for use _as_ tools at build-time).

No change to BUILD_DEPENDS as used correctly inside buildlink3.

As proposed on tech-pkg:
https://mail-index.netbsd.org/tech-pkg/2023/06/03/msg027632.html
@
text
@a2 1
PKGREVISION= 1
@


1.19
log
@revbump after textproc/icu update
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2023/01/25 22:25:14 wiz Exp $
d26 1
a26 1
BUILD_DEPENDS+=	lld-[0-9]*:../../devel/lld
@


1.18
log
@wasi-libcxx: revert previous

This does lots of manual cmake steps, do not use cmake/build.mk for now
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2023/01/24 18:36:29 wiz Exp $
d3 1
@


1.17
log
@*: convert to cmake/build.mk
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2022/11/30 19:55:00 adam Exp $
d36 1
a171 1
.include "../../devel/cmake/build.mk"
@


1.16
log
@llvm: updated to 15.0.6

15.0.6
Bug fixes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2022/11/23 16:20:31 adam Exp $
a35 1
USE_CMAKE=	yes
d171 1
@


1.15
log
@massive revision bump after textproc/icu update
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2022/11/14 18:44:07 adam Exp $
a2 1
PKGREVISION= 1
@


1.14
log
@llvm: updated to 15.0.4

LLVM 15.0.4

Changes to the LLVM IR

LLVM now uses opaque pointers. This means that different pointer types like i8*, i32* or void()** are now represented as a single ptr type. See the linked document for migration instructions.
Renamed llvm.experimental.vector.extract intrinsic to llvm.vector.extract.
Renamed llvm.experimental.vector.insert intrinsic to llvm.vector.insert.
The constant expression variants of the following instructions have been removed:
extractvalue
insertvalue
udiv
sdiv
urem
srem
fadd
fsub
fmul
fdiv
frem
Added the support for fmax and fmin in atomicrmw instruction. The comparison is expected to match the behavior of llvm.maxnum.* and llvm.minnum.* respectively.
callbr instructions no longer use blockaddress arguments for labels. Instead, label constraints starting with ! refer directly to entries in the callbr indirect destination list.

Changes to building LLVM

Omitting CMAKE_BUILD_TYPE when using a single configuration generator is now an error. You now have to pass -DCMAKE_BUILD_TYPE=<type> in order to configure LLVM. This is done to help new users of LLVM select the correct type: since building LLVM in Debug mode is very resource intensive, we want to make sure that new users make the choice that lines up with their usage. We have also improved documentation around this setting that should help new users. You can find this documentation here.

Changes to Loop Optimizations

Loop interchange legality and cost model improvements

Changes to the AMDGPU Backend

8 and 16-bit atomic loads and stores are now supported

Changes to the ARM Backend

Added support for the Armv9-A, Armv9.1-A and Armv9.2-A architectures.
Added support for the Armv8.1-M PACBTI-M extension.
Added support for the Armv9-A, Armv9.1-A and Armv9.2-A architectures.
Added support for the Armv8.1-M PACBTI-M extension.
Removed the deprecation of ARMv8-A T32 Complex IT blocks. No deprecation warnings will be generated and -mrestrict-it is now always off by default. Previously it was on by default for Armv8 and off for all other architecture versions.
Added a pass to workaround Cortex-A57 Erratum 1742098 and Cortex-A72 Erratum 1655431. This is enabled by default when targeting either CPU.
Implemented generation of Windows SEH unwind information.
Switched the MinGW target to use SEH instead of DWARF for unwind information.
Added support for the Cortex-M85 CPU.
Added support for a new -mframe-chain=(none|aapcs|aapcs+leaf) command-line option, which controls the generation of AAPCS-compliant Frame Records.

Changes to the DirectX Backend

DirectX has been added as an experimental target. Specify -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=DirectX in your CMake configuration to enable it. The target is not packaged in pre-built binaries.
The DirectX backend supports the dxil architecture which is based on LLVM 3.6 IR encoded as bitcode and is the format used for DirectX GPU Shader programs.

Changes to the PowerPC Backend

Common PowerPC improvements: * Add a new post instruction selection pass to generate CTR loops. * Add SSE4 and BMI compatible intrinsics implementation. * Supported 16-byte lock free atomics on PowerPC8 and up. * Supported atomic load/store for pointer types. * Supported stack size larger than 2G * Add __builtin_min/__builtin_max/__abs builtins. * Code generation improvements for splat load/vector shuffle/mulli, etc. * Emit VSX instructions for vector loads and stores regardless of alignment. * The mcpu=future has its own ISA now (FutureISA). * Added the ppc-set-dscr option to set the Data Stream Control Register (DSCR). * Bug fixes.

AIX improvements: * Supported 64 bit XCOFF for integrated-as path. * Supported X86-compatible vector intrinsics. * Program code csect default alignment now is 32-byte. * Supported auxiliary header in integrated-as path. * Improved alias symbol handling.

Changes to the RISC-V Backend

A RISCVRedundantCopyElimination pass was added to remove unnecessary zero copies.
A RISC-V specific CodeGenPrepare pass was added.
The machine outliner was enabled by default for RISC-V at -Oz. Additionally, the newly introduced RISCVMakeCompressible pass will make modify instructions prior to emission at -Oz in order to increase opportunities for the compression with the RISC-V C extension.
Various bug fixes and improvements to code generation for the RISC-V vector extensions.
Various improvements were made to RISC-V specific optimisation passes such as RISCVSExtWRemoval and RISCVMergeBaseOffset.
llc now computes the target ABI based on the target architecture using the same logic as Clang if not explicit ABI is given.
generic is now recognized as a valid CPU name and is mapped to generic-rv32 or generic-rv64 depending on the target triple.
Support for the experimental Zvfh extension was added, enabling half-precision floating point in vectors.
Support for the Zihintpause (Pause Hint) extension.
Assembler and disassembler support for the Zfinx and Zdinx (float / double in integer register) extensions.
Assembler and disassembler support for the Zicbom, Zicboz, and Zicbop cache management operation extensions.
Support for the Zmmul extension (a subextension of the M extension, adding multiplication instructions only).
Assembler and disassembler support for the hypervisor extension and for the Sinval supervisor memory-management extension.

Changes to the X86 Backend

Support half type on SSE2 and above targets following X86 psABI.
Support rdpru instruction on Zen2 and above targets.
During this release, half type has an ABI breaking change to provide the support for the ABI of _Float16 type on SSE2 and above following X86 psABI. (D107082)

The change may affect the current use of half includes (but is not limited to):

Frontends generating half type in function passing and/or returning arguments.
Downstream runtimes providing any half conversion builtins assuming the old ABI.
Projects built with LLVM 15.0 but using early versions of compiler-rt.
When you find failures with half type, check the calling conversion of the code and switch it to the new ABI.

Changes to the LLVM tools

(Experimental) llvm-symbolizer now has --filter-markup to filter Symbolizer Markup into human-readable form.
llvm-objcopy has removed support for the legacy zlib-gnu format.
llvm-objcopy now allows --set-section-flags src=... --rename-section src=tst. --add-section=.foo1=... --rename-section=.foo1=.foo2 now adds .foo1 instead of .foo2.
New features supported on AIX for llvm-ar:
AIX big-format archive write operation (D123949)
A new object mode option, -X , to specify the type of object file llvm-ar should operate upon (D127864)
Read global symbols of AIX big archive (D124865)
New options supported for llvm-nm:
-X, to specify the type of object file that llvm-nm should examine (D118193)
--export-symbols, to create a list of symbols to export (D112735)
The LLVM gold plugin now ignores bitcode from the .llvmbc section of ELF files when doing LTO. https://github.com/llvm/llvm-project/issues/47216
llvm-objcopy now supports 32 bit XCOFF.
llvm-objdump: improved assembly printing for XCOFF.
llc now parses code-model attribute from input file.

Changes to LLDB

The “memory region” command now has a “–all” option to list all memory regions (including unmapped ranges). This is the equivalent of using address 0 then repeating the command until all regions have been listed.
Added “–show-tags” option to the “memory find” command. This is off by default. When enabled, if the target value is found in tagged memory, the tags for that memory will be shown inline with the memory contents.
Various memory related parts of LLDB have been updated to handle non-address bits (such as AArch64 pointer signatures):
“memory read”, “memory write” and “memory find” can now be used with addresses with non-address bits.
All the read and write memory methods on SBProccess and SBTarget can be used with addreses with non-address bits.
When printing a pointer expression, LLDB can now dereference the result even if it has non-address bits.
The memory cache now ignores non-address bits when looking up memory locations. This prevents us reading locations multiple times, or not writing out new values if the addresses have different non-address bits.
LLDB now supports reading memory tags from AArch64 Linux core files.
LLDB now supports the gnu debuglink section for reading debug information from a separate file on Windows
LLDB now allows selecting the C++ ABI to use on Windows (between Itanium, used for MingW, and MSVC) via the plugin.object-file.pe-coff.abi setting. In Windows builds of LLDB, this defaults to the style used for LLVM’s default target.

Other Changes

The code for the LLVM Visual Studio integration has been removed. This had been obsolete and abandoned since Visual Studio started including an integration by default in 2019.
Added the unwinder, personality, and helper functions for exception handling on AIX. (D100132) (D100504)
PGO on AIX: A new implementation that requires linker support (__start_SECTION/__stop_SECTION symbols) available on AIX 7.2 TL5 SP4 and AIX 7.3 TL0 SP2.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2022/08/13 12:42:45 ryoon Exp $
d3 1
@


1.13
log
@wasi-libcxx: Fix build

I have no idea how to generate __config_site file and include it.
This patch is obviously wrong, however it fixes wasi-libcxx-14.0.6b build.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2022/08/13 09:56:45 tnn Exp $
d21 1
a21 2
LLVMDIST=	llvm-${LLVM_VERSION}.src
EXTRA_DIST=	${LIBCXX}${EXTRACT_SUFX} ${LLVMDIST}${EXTRACT_SUFX}
a23 4
SITES.${LLLVMDIST}${EXTRACT_SUFX}=	\
	${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}

DISTFILES=	${DEFAULT_DISTFILES} ${EXTRA_DIST}
a40 2
CMAKE_ARGS+=	-DCMAKE_VERBOSE_MAKEFILE=1

a41 2
CMAKE_ARGS+=	-DCMAKE_C_COMPILER=${CC:Q}
CMAKE_ARGS+=	-DCMAKE_CXX_COMPILER=${CXX:Q}
d141 1
a141 1
CMAKE_ARGS+=	-DLIBCXX_CXX_ABI=libcxxabi
a153 1
	${LN} -f -s ${WRKDIR}/${LLVMDIST} ${WRKDIR}/llvm
@


1.12
log
@wasi-libcxx: delint, to extent possible
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2022/08/12 13:55:48 gutteridge Exp $
d14 2
d36 2
a37 2
BUILD_DIRS+=		../build_libcxx
BUILD_DIRS+=		../build_libcxxabi
d51 2
a52 2
CMAKE_ARGS+=	-DLIBCXXABI_LIBCXX_INCLUDES=${WRKDIR}/${LIBCXX}/include
CMAKE_ARGS+=	-DLIBCXXABI_USE_LLVM_UNWINDER=ON
d148 2
d151 1
a151 1
CMAKE_ARGS+=	-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${WRKDIR}/${DISTNAME}/include
a163 2
# TODO: not sure what should create this and with which contents
	${TOUCH} ${WRKDIR}/${LIBCXX}/include/__config_site
d166 1
a166 1
	cd ${WRKSRC} && cd ../build_libcxx && \
d169 1
a169 1
	cd ${WRKSRC} && cd ../build_libcxxabi && \
@


1.11
log
@wasi-libcxx: catch up with LLVM bump
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2022/04/18 19:11:32 adam Exp $
d18 7
a24 5
LIBCXX=					libcxx-${LLVM_VERSION}.src
LLVMDIST=				llvm-${LLVM_VERSION}.src
_EXTRA_DIST=				${LIBCXX}${EXTRACT_SUFX} ${LLVMDIST}${EXTRACT_SUFX}
SITES.${LIBCXX}${EXTRACT_SUFX}=		${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
SITES.${LLLVMDIST}${EXTRACT_SUFX}=	${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
d26 1
a26 1
DISTFILES=	${DEFAULT_DISTFILES} ${_EXTRA_DIST}
a29 1
CXXFLAGS+=		-Wno-reserved-user-defined-literal
d160 1
a160 1
	# TODO: not sure what should create this and with which contents
@


1.10
log
@revbump for textproc/icu update
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2022/02/04 11:06:58 wiz Exp $
a2 1
PKGREVISION= 1
@


1.9
log
@wasi-libcxx: pkglint whitespace fixes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2022/01/10 02:10:04 gutteridge Exp $
d3 1
@


1.8
log
@wasi-libcxx: carry over wasi-compiler-rt fix for Firefox builds

Also apply tnn@@'s workaround in wasi-compiler-rt here, as related
failures have been observed due to this package. See PR pkg/56590.
(Tested with multiple iterations on NetBSD 9.2_STABLE.)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2022/01/07 15:49:53 tnn Exp $
d18 3
a20 3
LIBCXX=		libcxx-${LLVM_VERSION}.src
LLVMDIST=	llvm-${LLVM_VERSION}.src
_EXTRA_DIST=	${LIBCXX}${EXTRACT_SUFX} ${LLVMDIST}${EXTRACT_SUFX}
@


1.7
log
@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.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2022/01/07 14:33:43 tnn Exp $
d170 9
@


1.6
log
@wasi-*: fix build failure when package already installed

Only use headers that pkgsrc has permitted via buildlink.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2022/01/07 13:32:48 tnn Exp $
d173 3
a175 1
ABI=			32
@


1.5
log
@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.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2021/12/27 10:00:13 wiz Exp $
d55 1
a55 1
CMAKE_ARGS+=	-DCMAKE_SYSROOT=${PREFIX}/wasi
@


1.4
log
@wasi-libcxx: add missing include for wasi-libc

Fixes build.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2021/12/22 16:10:43 ryoon Exp $
d173 1
@


1.4.2.1
log
@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
@
text
@d1 1
a1 1
# $NetBSD$
d55 1
a55 1
CMAKE_ARGS+=	-DCMAKE_SYSROOT=${BUILDLINK_DIR}/wasi
a172 3
ABI=			# 32
CFLAGS=			-O2
CXXFLAGS=		-O2
@


1.4.2.2
log
@Pullup ticket #6565 - requested by gutteridge
lang/wasi-libcxx: build fix

Revisions pulled up:
- lang/wasi-libcxx/Makefile                                     1.8

---
   Module Name:    pkgsrc
   Committed By:   gutteridge
   Date:           Mon Jan 10 02:10:04 UTC 2022

   Modified Files:
           pkgsrc/lang/wasi-libcxx: Makefile

   Log Message:
   wasi-libcxx: carry over wasi-compiler-rt fix for Firefox builds

   Also apply tnn@@'s workaround in wasi-compiler-rt here, as related
   failures have been observed due to this package. See PR pkg/56590.
   (Tested with multiple iterations on NetBSD 9.2_STABLE.)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4.2.1 2022/01/09 20:10:55 bsiegert Exp $
a169 9
# Run llvm-ranlib again on the archives. Fixes mystery build failure
# in Firefox due to missing index (see PR pkg/56590). Might be a MAKE_JOBS
# problem in this package?
post-install:
	${PREFIX}/bin/llvm-ranlib \
	  ${DESTDIR}${PREFIX}/wasi/lib/wasm32-wasi/libc++.a
	${PREFIX}/bin/llvm-ranlib \
	  ${DESTDIR}${PREFIX}/wasi/lib/wasm32-wasi/libc++abi.a

@


1.3
log
@wasi-libcxx: Disable stack check explicitly too
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2021/12/22 13:00:26 tnn Exp $
d171 1
@


1.2
log
@wasi-libcxx: set CLANGBASE instead of PKG_CC/CXX
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2021/12/19 14:12:20 ryoon Exp $
d39 3
a41 1
SSP_SUPPORTED=	no
@


1.1
log
@lang/wasi-libcxx: import wasi-libcxx-13.0.0

libc++abi and libc++ for WebAssembly WASI environment.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2021/11/23 20:55:43 wiz Exp $
d171 1
a171 2
PKG_CC=		${PREFIX}/bin/clang
PKG_CXX=	${PREFIX}/bin/clang++
@

