From patchwork Sat Jul 11 18:35:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1327376 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=qoSgJifd; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=gob8mRQg; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B3zCR44fjz9sRN for ; Sun, 12 Jul 2020 04:36:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=qNKT4nfZnFcfPFl6aslErTn1EJNJkY5sXrhpuOqDbZw=; b=qoSgJifdCy+Ve8Qz31UjOJo5xg rE3J0s0+zchMt5A/je8T7RDrJHDDQ3wO7uxkl0GcS2Ub+zBRAPb7l0zgtEBXxH5q9O6xwibY4K2Rn /ezfgjqI8U7X/zSadgNCs0mgOhfKcVNqY8TuDxvmVqMtMix/Of8YG1kofOI7bk4D2PrqvnSb/dAcL TNstywGoxrjpvh+szXnnEeFPGtOr97VX4qMxGUO0DXX1IsT3KIeHFIOiAtO0cY3EeJhBlht0Dv5Wa kzbOmQv052U2yb8G82uUiKdsog4wuYySDkpIpJxM2dT1+SOEUWhMFa2cF2NRAeq/D7BhRWqX4Up2T YV0KurlQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1juKLZ-0002Kk-A1; Sat, 11 Jul 2020 18:35:37 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1juKLW-0002KB-Ty for openwrt-devel@lists.openwrt.org; Sat, 11 Jul 2020 18:35:35 +0000 Received: by mail-pl1-x643.google.com with SMTP id x8so3564642plm.10 for ; Sat, 11 Jul 2020 11:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=XTYuyL+UGVDB9UKznePA9SbW0J55RqNhowoMsFzFy+8=; b=gob8mRQgzZU/7rH15PcjhOoGOGKmV6+c6iYYCBrmWHbUsLladdm7PpWKHSIhTlua+U rSoSST/gixBeO3oGbKfA75/obmVNZXs6Zs+kMoKccQP/wPufJMkfhm57kGSkAqKBhBTo h6R8qGms0NrGR3i7PdfrIE5TIuKUMo6qIB5bppGHLbhrvOi1MrOInEPTClolqgodcA4Q 9pLcnqiWtMSMI5lzSjpT+wLeezcO3yD9mBXlCyiIBmJ7JU2gTfsWB0xsvtP+sfs34/ws ooK0o5o5J1LyxV7vbH5kqXQ7h2AyLubF3RGg+HaBD/HSLlX8xAEku+JQ2nRT4jINWo6o 5clQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=XTYuyL+UGVDB9UKznePA9SbW0J55RqNhowoMsFzFy+8=; b=GfMme0lvf0tLmWs/2oQiTI1UoB2z7Gg4Ae07ZOzvyDjJY8laxW0vjDCjNyu7u/BL/d DT5VucrWs4l6LECX+h31mx/vwXbBHyf+OGmhbXYv70C2jMymVWaU/VS/AMULmJ3yrN3t 2n38Qsj0di8uI4cmPJGjAAQCwTCDcS36SSL18JGaWaWsSCuMwBLy9v+Rj8rWYZFe9iK1 QnUWv14Y/crjAQZAY4QOm5Rbqfd8AUmoLO00HG/V7EGGp1T3nGmJugHo1kfqq9yfF8qz vFKKkNZ+Ho7ct+/SPM1TiPpgCtW4H5mqjWChwbFE7iloiwLGz4IeLcaYHsaYZGUnQPrr R7eA== X-Gm-Message-State: AOAM533hgAhWLN8trB/9zIqc8X9YiHf0edNf1r1cWD20Qj7hkAQ3sR1y L9yDzWr+EsM+tjREvqo6iCP3XGmk32g= X-Google-Smtp-Source: ABdhPJxxPxe3b/KRpJjSsGqEGnbE9C2Zi7G540I8mmNdm4J9GdbSF7uNnbAD6yaC8uxqwH18WzdfZQ== X-Received: by 2002:a17:90a:1109:: with SMTP id d9mr11992031pja.201.1594492532458; Sat, 11 Jul 2020 11:35:32 -0700 (PDT) Received: from mangix-trapnet.lan (76-14-109-232.rk.wavecable.com. [76.14.109.232]) by smtp.gmail.com with ESMTPSA id e195sm9363284pfh.218.2020.07.11.11.35.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2020 11:35:31 -0700 (PDT) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Subject: [PATCH 1/2] libcxxabi: add Date: Sat, 11 Jul 2020 11:35:29 -0700 Message-Id: <20200711183530.40497-1-rosenp@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200711_143535_043616_552586E1 X-CRM114-Status: GOOD ( 10.73 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:643 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rosenp[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This will be used for libcxx. libcxxabi is needed as libsupc++ is not good enough for libcxx. It uses GCC specific stuff which causes failed compilation for some packages. There are also runtime issues, most notably with cxxopts where the program just crashes. Reference: https://github.com/gerbera/gerbera/issues/795 Signed-off-by: Rosen Penev --- v2: Added extra description. package/libs/libcxxabi/Makefile | 71 +++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 package/libs/libcxxabi/Makefile diff --git a/package/libs/libcxxabi/Makefile b/package/libs/libcxxabi/Makefile new file mode 100644 index 0000000000..90547561b2 --- /dev/null +++ b/package/libs/libcxxabi/Makefile @@ -0,0 +1,71 @@ + +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libcxxabi +PKG_VERSION:=10.0.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz +PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION) +PKG_HASH:=e71bac75a88c9dde455ad3f2a2b449bf745eafd41d2d8432253b2964e0ca14e1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).src + +PKG_MAINTAINER:=Rosen Penev +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt + +PKG_BUILD_PARALLEL:=1 +CMAKE_BINARY_SUBDIR:=build + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libcxxabi + SECTION:=libs + CATEGORY:=Libraries + TITLE:=LLVM lib++abi + URL:=https://libcxxabi.llvm.org/ + DEPENDS:=+libpthread + BUILDONLY:=1 +endef + +define Package/libcxxabi/description + libc++abi is a new implementation of low level support for a standard C++ library. +endef + +CMAKE_OPTIONS += \ + -DLIBCXXABI_ENABLE_EXCEPTIONS=ON \ + -DLIBCXXABI_ENABLE_PEDANTIC=OFF \ + -DLIBCXXABI_ENABLE_PIC=ON \ + -DLIBCXXABI_ENABLE_WERROR=OFF \ + -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \ + -DLIBCXXABI_USE_COMPILER_RT=OFF \ + -DLIBCXXABI_ENABLE_THREADS=ON \ + -DLIBCXXABI_HAS_PTHREAD_API=ON \ + -DLIBCXXABI_INCLUDE_TESTS=OFF \ + -DLIBCXXABI_LIBDIR_SUFFIX="" \ + -DLIBCXXABI_INSTALL_LIBRARY=ON \ + -DLIBCXXABI_ENABLE_SHARED=OFF \ + -DLIBCXXABI_LIBCXX_SRC_DIR=$(BUILD_DIR)/libcxx-$(PKG_VERSION).src \ + -DLIBCXXABI_LIBCXX_INCLUDES=$(BUILD_DIR)/libcxx-$(PKG_VERSION).src/include + +TARGET_CXXFLAGS += -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + +define Build/Prepare + $(MAKE) -C $(TOPDIR)/package/libs/libcxx prepare + $(call Build/Prepare/Default) +endef + +define Build/InstallDev + $(call Build/InstallDev/cmake,$(1)) + $(INSTALL_DIR) $(1)/usr/include/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/ +endef + +$(eval $(call BuildPackage,libcxxabi))