pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
libcxxabi-15.0.1 - part of llvm update
Module Name: pkgsrc-wip
Committed By: pin <voidpin%protonmail.com@localhost>
Pushed By: pin
Date: Wed Sep 28 08:43:52 2022 +0200
Changeset: 38de9201fb27e99938911ec76e64dc19bf1aa555
Modified Files:
Makefile
Added Files:
libcxxabi/DESCR
libcxxabi/Makefile
libcxxabi/PLIST
libcxxabi/buildlink3.mk
libcxxabi/distinfo
libcxxabi/patches/patch-src_CMakeLists.txt
Log Message:
libcxxabi-15.0.1 - part of llvm update
Patch provide privately by nros@
Unfortunately, I can only seem to be able to build this with gcc12.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=38de9201fb27e99938911ec76e64dc19bf1aa555
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
libcxxabi/DESCR | 7 ++++
libcxxabi/Makefile | 67 ++++++++++++++++++++++++++++++
libcxxabi/PLIST | 7 ++++
libcxxabi/buildlink3.mk | 15 +++++++
libcxxabi/distinfo | 15 +++++++
libcxxabi/patches/patch-src_CMakeLists.txt | 29 +++++++++++++
7 files changed, 141 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 203cd19ff0..176a2a4cf5 100644
--- a/Makefile
+++ b/Makefile
@@ -2053,6 +2053,7 @@ SUBDIR+= libcsplit
SUBDIR+= libcthreads
SUBDIR+= libcuba
SUBDIR+= libcue
+SUBDIR+= libcxxabi
SUBDIR+= libdbglog
SUBDIR+= libdbh2
SUBDIR+= libdialog
diff --git a/libcxxabi/DESCR b/libcxxabi/DESCR
new file mode 100644
index 0000000000..7b53a18eda
--- /dev/null
+++ b/libcxxabi/DESCR
@@ -0,0 +1,7 @@
+libc++abi is a new implementation of low level support for a standard
+C++ library.
+
+Features and Goals
+ * Correctness as defined by the C++11 standard.
+ * Provide a portable sublayer to ease the porting of libc++
+ * On Mac OS X, be ABI compatible with the existing low-level support.
diff --git a/libcxxabi/Makefile b/libcxxabi/Makefile
new file mode 100644
index 0000000000..6fb77a960c
--- /dev/null
+++ b/libcxxabi/Makefile
@@ -0,0 +1,67 @@
+# $NetBSD: Makefile,v 1.15 2022/08/14 13:52:26 tnn Exp $
+
+.include "../../wip/llvm/version.mk"
+
+DISTNAME= libcxxabi-${LLVM_VERSION}.src
+PKGNAME= ${DISTNAME:S/.src//}
+CATEGORIES= lang devel
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://libcxxabi.llvm.org/
+COMMENT= C++ Standard Library
+LICENSE= apache-2.0
+
+# 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.
+# As of v15.0.0 libcxxabi requires cmake source code to build
+LIBCXX= libcxx-${LLVM_VERSION}.src
+LLVMDIST= llvm-${LLVM_VERSION}.src
+CMAKE= cmake-${LLVM_VERSION}.src
+EXTRA_DIST= ${LIBCXX}${EXTRACT_SUFX} ${LLVMDIST}${EXTRACT_SUFX} ${CMAKE}${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}/}
+SITES.${CMAKE}${EXTRACT_SUFX}= \
+ ${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
+
+DISTFILES= ${DEFAULT_DISTFILES} ${EXTRA_DIST}
+
+CONFIGURE_DIRS= build
+CMAKE_ARG_PATH= ${WRKSRC}
+
+USE_LANGUAGES= c c++17
+USE_CMAKE= yes
+SSP_SUPPORTED= no
+GCC_REQD+= 12 # must be in sync with libcxx
+
+CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
+CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CC:Q}
+CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CXX:Q}
+CMAKE_ARGS+= -DLIBCXXABI_LIBCXX_INCLUDES=${WRKDIR}/${LIBCXX}/include
+CMAKE_ARGS+= -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+
+# avoid conflict with stddef.h
+CXXFLAGS.NetBSD+= -D__DEFINED_max_align_t=1
+
+.include "../../mk/compiler.mk"
+
+.if !empty(CC_VERSION:Mgcc-[0-9].*) || !empty(CC_VERSION:Mgcc-10.*)
+# Avoid GCC < 11 error https://github.com/llvm/llvm-project/issues/54018
+CXXFLAGS+= -std=c++17 -D_LIBCPP_STD_VER=17
+.endif
+
+post-extract:
+ ${MKDIR} ${WRKSRC}/build
+ ${LN} -f -s ${WRKDIR}/${LIBCXX} ${WRKDIR}/libcxx
+ ${LN} -f -s ${WRKDIR}/${LLVMDIST} ${WRKDIR}/llvm
+ ${LN} -f -s ${WRKDIR}/${CMAKE} ${WRKDIR}/cmake
+# TODO: not sure what should create this and with which contents
+ ${TOUCH} ${WRKDIR}/${LIBCXX}/include/__config_site
+
+.include "../../wip/libunwind/buildlink3.mk"
+.include "../../wip/llvm/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/libcxxabi/PLIST b/libcxxabi/PLIST
new file mode 100644
index 0000000000..c9924a5b37
--- /dev/null
+++ b/libcxxabi/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2018/08/09 14:13:25 jperkin Exp $
+include/c++/v1/__cxxabi_config.h
+include/c++/v1/cxxabi.h
+lib/libc++abi.a
+lib/libc++abi.so
+lib/libc++abi.so.1
+lib/libc++abi.so.1.0
diff --git a/libcxxabi/buildlink3.mk b/libcxxabi/buildlink3.mk
new file mode 100644
index 0000000000..58a5ec462e
--- /dev/null
+++ b/libcxxabi/buildlink3.mk
@@ -0,0 +1,15 @@
+# $NetBSD: buildlink3.mk,v 1.6 2022/08/12 08:41:58 pin Exp $
+
+BUILDLINK_TREE+= libcxxabi
+
+.if !defined(LIBCXXABI_BUILDLINK3_MK)
+LIBCXXABI_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libcxxabi+= libcxxabi>=15.0.1
+BUILDLINK_PKGSRCDIR.libcxxabi?= ../../wip/libcxxabi
+
+.include "../../wip/llvm/buildlink3.mk"
+.include "../../wip/libunwind/buildlink3.mk"
+.endif # LIBCXXABI_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -libcxxabi
diff --git a/libcxxabi/distinfo b/libcxxabi/distinfo
new file mode 100644
index 0000000000..4281c64394
--- /dev/null
+++ b/libcxxabi/distinfo
@@ -0,0 +1,15 @@
+$NetBSD: distinfo,v 1.15 2022/08/12 08:41:58 pin Exp $
+
+BLAKE2s (cmake-15.0.1.src.tar.xz) = 1f7fb68a1c7c05b82a72137f3edf4a9b8dfb9e2fae277af1643e4bc545db6f75
+SHA512 (cmake-15.0.1.src.tar.xz) = fbb29395a337be4e591567cc0f990857a2663cb2335b5ef30945c6b516dbc65e86f022ef3acc1dc572cf6791e1cd20f6754256e00b60cdbf579c04ed74460522
+Size (cmake-15.0.1.src.tar.xz) = 6976 bytes
+BLAKE2s (libcxx-15.0.1.src.tar.xz) = 990ed1b196ec72548326496613b39a460f3836b34ec1e99443ec06d85096295e
+SHA512 (libcxx-15.0.1.src.tar.xz) = 1438b689bb11b25a0b77c83c8fc0dbe98f729186aa2718119c42f4efe42fca9ec33a79a0fac036d6617d0452dcfd76463a8adbc55b0552a0a4e72757d841fdf0
+Size (libcxx-15.0.1.src.tar.xz) = 3345100 bytes
+BLAKE2s (libcxxabi-15.0.1.src.tar.xz) = 009d90b6ebd8b53f08debb6a76218cc3624ddecbe6552563cfd5da4ab9f2b2cb
+SHA512 (libcxxabi-15.0.1.src.tar.xz) = ef765a897a1099933773b62a67e4c1e9b074ce50939e6723d0f8a8a1ce1f6761c37f35ecb6c837ff06eeb47a926a4b4c0755fb5da316f5b37e605e9f75312976
+Size (libcxxabi-15.0.1.src.tar.xz) = 568756 bytes
+BLAKE2s (llvm-15.0.1.src.tar.xz) = ed1e687e9fc2c529180f7352d3f8dcaa9a0de1bf4edc9c128f1fb85575afe31f
+SHA512 (llvm-15.0.1.src.tar.xz) = ec61b6d061ba71e00f6e9c1042705ab3512ff71a823e18ce75a3b8fd2ef40efff186b42d4be6ef948019e5bb5b3fb28f0c615ebb7872ec89f7643261eadf276a
+Size (llvm-15.0.1.src.tar.xz) = 53522984 bytes
+SHA1 (patch-src_CMakeLists.txt) = 76371daae97355fc9ee1bba8fb7e8e8879535f84
diff --git a/libcxxabi/patches/patch-src_CMakeLists.txt b/libcxxabi/patches/patch-src_CMakeLists.txt
new file mode 100644
index 0000000000..0096928fc9
--- /dev/null
+++ b/libcxxabi/patches/patch-src_CMakeLists.txt
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Make sure that libcxx headers are found, they are normally found
+using the target cxx-headers but, it does not exist since libcxxabi
+it's built alone, so have to create it.
+
+Link to -lunwind since the target unwind_shared does not exist
+due to that libcxxabi it's build alone.
+
+--- src/CMakeLists.txt.orig 2022-09-20 06:05:50.000000000 +0000
++++ src/CMakeLists.txt
+@@ -58,6 +58,8 @@ endif()
+
+ # Some files depend on libc++ internals.
+ include_directories("${LIBCXXABI_LIBCXX_PATH}/src")
++add_library(cxx-headers INTERFACE)
++target_include_directories(cxx-headers INTERFACE "${LIBCXXABI_LIBCXX_INCLUDES}")
+
+ if (LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
+ add_definitions(-DHAVE___CXA_THREAD_ATEXIT_IMPL)
+@@ -165,7 +167,7 @@ if (LIBCXXABI_USE_LLVM_UNWINDER)
+ target_link_libraries(cxxabi_shared_objects PUBLIC unwind_shared_objects) # propagate usage requirements
+ target_sources(cxxabi_shared_objects PUBLIC $<TARGET_OBJECTS:unwind_shared_objects>)
+ else()
+- target_link_libraries(cxxabi_shared_objects PUBLIC unwind_shared)
++ target_link_libraries(cxxabi_shared_objects PUBLIC unwind)
+ endif()
+ endif()
+ target_link_libraries(cxxabi_shared_objects PRIVATE cxx-headers ${LIBCXXABI_BUILTINS_LIBRARY} ${LIBCXXABI_SHARED_LIBRARIES} ${LIBCXXABI_LIBRARIES})
Home |
Main Index |
Thread Index |
Old Index