From patchwork Sun Apr 7 06:37:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1079859 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.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; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YCnCvA0A"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="B/aXylwp"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44cP5J2KBVz9sPn for ; Sun, 7 Apr 2019 16:38:27 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:Date: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=dDd5mRNRb8PEDObEBCtScr9YtmYYwgeTQRjVMZixMMk=; b=YCnCvA0AR6ylqw TQFgUqpuk1Ba/L3MscfZPGIv5hTSX0LetKuTa+yPzhjOSqsHxuMxdWTOzDPD5ue8dP7QvH5zLRB7Y Db3yYRXKkvJbqMVMBIcUhhURq2Kawnzw2gk6DXQRtcrdO425yt0ZQA41P50vMSvWHosmZ6iaQRGvi U6ELGi14yO+sHE21powv1QAqfWlrDNea1IK4kA+2EViXR8jvBprtzAgcV/0SPIwsduXDXBgb+f4T6 iRa9ZBj1Oisb1/YVIrJBF0NMnRv91h/Ebve1VN+tHcdOVDF/X+HZ2GQpDLtAyxDYqgKK2uH7fCpE7 X9Yhl+NJ8AhDbSLyVIJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hD1RM-0001Kd-Ni; Sun, 07 Apr 2019 06:38:04 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hD1RI-0001KI-TX for openwrt-devel@lists.openwrt.org; Sun, 07 Apr 2019 06:38:03 +0000 Received: by mail-pf1-x432.google.com with SMTP id 9so5696797pfj.13 for ; Sat, 06 Apr 2019 23:38:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=SeWfxAYNqoUl2fqQlZX9XfB2ZRQ/Q39DmZjS3chHCYg=; b=B/aXylwpiCI/8DmYlM5yF2XB01EKoYKadbJZJHAoiu6sxQ2DaF5kVjUs6zoCAPFu5N kUGm/XUcGH0CUikOqkSq35XDRJcRUe//6vG9vay+UfDwx0SZl6g3oDBEF3fnFlNSU+FH O5f+CCaprZXCsRzDCbSurEtwNs9OEx3eu+5jmApjRp9YWUO0PX+CiNAVKu97KsDz1aQG NgGWngkdf4EXayUUoQ86xd2GJ+QEj/H1LIQkfhudp1fKSgK/931o7kHgqs3VIA9M4nNV qHxMflKHu1qW18DjgPi6zIW9JSYY/oHWe7NfIyOaZ5XHN5bYmDWrhBqsbJNpZ4yfAwFl HHyg== 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; bh=SeWfxAYNqoUl2fqQlZX9XfB2ZRQ/Q39DmZjS3chHCYg=; b=feZPCXOXsQzZDlMi8+PYtnNGch7DB7J8B/TFH98S0TKPp6WyBA4pmFh0u+lqanEcnU VuQ7T+JDvuGECX+IpeiFv5kVIEdF+0Dfk4ikKXBfVkuBGbD/INnGfYcJeCTmocDdMB5H le5qud6kkQSO0MF23KuRbMluDdy6SVf1qM/C50bnY7WvU6nvTw4QMPbWbJWQknlS78vZ OZoHNnNQ1KEpgLET7fqoRBsyXIKhy9nPuaz2c1erIFt7TdIozE7r/2c4b37aDrHXHJxX mEAQJA1dCIRaYE2Iv0n7XoLTt/Mwivb0CwQhqVUvjGSUVGHOAtmz03oA9JteHDiIDt98 H5NQ== X-Gm-Message-State: APjAAAVplptjj/TDdjZDJ5hZ+E1GBkYMKeaMJmRVFbGpebkuwtiyS0g9 IBsnY0wTkfILRl8b16+qU631S6CkMK4= X-Google-Smtp-Source: APXvYqyEcb/Z/4ZUa7x+HG9k7n83L7KZMcyv77rdo3TSRLB3pB2f9R3tZ/tly01C5f07Ws13IYSnsg== X-Received: by 2002:a63:5858:: with SMTP id i24mr21431221pgm.222.1554619079010; Sat, 06 Apr 2019 23:37:59 -0700 (PDT) Received: from mangix-pc.lan (astound-69-42-18-19.ca.astound.net. [69.42.18.19]) by smtp.gmail.com with ESMTPSA id b9sm23170062pfd.32.2019.04.06.23.37.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 23:37:58 -0700 (PDT) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Date: Sat, 6 Apr 2019 23:37:56 -0700 Message-Id: <20190407063756.11830-1-rosenp@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190406_233800_988522_81362FC4 X-CRM114-Status: GOOD ( 15.21 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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:432 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rosenp[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH] uClibc++: Update to 0.2.5 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Switched to xz archives for smaller size. Removed upstreamed patches. Reorganized Makefile a little bit for clarity. Build/Prepare is not useful anymore. Upstream converted the file to LF. Refreshed config. Removed -ansi option from the original CFLAGS as this was causing long long support to be missing. Removed fPIC. We have the macro $(FPIC) already used. No point in setting fpic and fPIC together. Removed pedantic -Wlong-long warnings as they are not useful. Removed -std=gnu++98. Not only is it unnecessary (it compiles against all standards), it actually results in a size increase. 75843 vs. 75222 (gcc in OpenWrt defaults to g++14). Added --gc-sections to linker flags to reduce size: 72653 vs 75222. Removed warn linker options. They have been upstreamed. Tested on Archer C7v2 and GnuBee PC1. Signed-off-by: Rosen Penev --- package/libs/uclibc++/Makefile | 28 ++--- package/libs/uclibc++/files/config.default | 10 +- .../libs/uclibc++/patches/001-no-ansi.patch | 10 ++ .../uclibc++/patches/002-path_to_bash.patch | 11 -- .../libs/uclibc++/patches/002-quote-fix.patch | 13 ++ .../libs/uclibc++/patches/003-no-fPIC.patch | 10 ++ .../uclibc++/patches/004-no-pedantic.patch | 13 ++ .../libs/uclibc++/patches/006-eabi_fix.patch | 38 ------ .../uclibc++/patches/010-honor-ldflags.patch | 23 ---- .../uclibc++/patches/020-template-fix.patch | 22 ---- .../patches/030-memory_corruption_fix.patch | 114 ------------------ .../uclibc++/patches/040-delete-c++14.patch | 20 --- ...-erase-on-derived-__base_associative.patch | 40 ------ 13 files changed, 61 insertions(+), 291 deletions(-) create mode 100644 package/libs/uclibc++/patches/001-no-ansi.patch delete mode 100644 package/libs/uclibc++/patches/002-path_to_bash.patch create mode 100644 package/libs/uclibc++/patches/002-quote-fix.patch create mode 100644 package/libs/uclibc++/patches/003-no-fPIC.patch create mode 100644 package/libs/uclibc++/patches/004-no-pedantic.patch delete mode 100644 package/libs/uclibc++/patches/006-eabi_fix.patch delete mode 100644 package/libs/uclibc++/patches/010-honor-ldflags.patch delete mode 100644 package/libs/uclibc++/patches/020-template-fix.patch delete mode 100644 package/libs/uclibc++/patches/030-memory_corruption_fix.patch delete mode 100644 package/libs/uclibc++/patches/040-delete-c++14.patch delete mode 100644 package/libs/uclibc++/patches/050-Bugfix-erase-on-derived-__base_associative.patch diff --git a/package/libs/uclibc++/Makefile b/package/libs/uclibc++/Makefile index 7133a7ef33..763e0d9e4d 100644 --- a/package/libs/uclibc++/Makefile +++ b/package/libs/uclibc++/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uclibc++ -PKG_VERSION:=0.2.4 -PKG_RELEASE:=3 +PKG_VERSION:=0.2.5 +PKG_RELEASE:=1 -PKG_SOURCE:=uClibc++-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://cxx.uclibc.org/src/ -PKG_HASH:=be16fc6a6eb2e59df420ee41e7042f38e27ebaf5c2762d90e75803364a7b00db +PKG_SOURCE:=uClibc++-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://cxx.uclibc.org/src/ +PKG_HASH:=596fb9ed7295564ce4c70ae6076a18f92e72f70310d70c98520bbca85c77895a PKG_BUILD_DIR:=$(BUILD_DIR)/uClibc++-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 @@ -30,7 +30,7 @@ define Package/uclibcxx SECTION:=libs CATEGORY:=Libraries TITLE:=C++ library for embedded systems - URL:=http://cxx.uclibc.org/src/ + URL:=https://cxx.uclibc.org/ endef UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ @@ -45,7 +45,8 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ -e 's/mipsel.*/mips/' \ ) -TARGET_CFLAGS += $(FPIC) +TARGET_CFLAGS += $(FPIC) -nostdinc++ +TARGET_LDFLAGS += -Wl,--gc-sections ifneq ($(CONFIG_CCACHE),) TARGET_CXX=$(TARGET_CXX_NOCACHE) @@ -56,24 +57,15 @@ SSP_LIB=-lssp_nonshared endif MAKE_FLAGS:= \ - TOPDIR="$(PKG_BUILD_DIR)/" \ $(TARGET_CONFIGURE_OPTS) \ CPU_CFLAGS="$(TARGET_CFLAGS)" \ - CROSS="$(TARGET_CROSS)" \ - LDFLAGS="-Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,defs $(TARGET_LDFLAGS)" \ - CP="$(CP)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ GEN_LIBS="-lc $(LIBGCC_S) $(SSP_LIB)" \ - GEN_CFLAGS="-std=gnu++98 -nostdinc++" \ check_as_needed= # check_as_needed overrides dependency on libgcc_s -define Build/Prepare - $(PKG_UNPACK) - $(SED) 's/\r$$$$//' $(PKG_BUILD_DIR)/include/unwind-cxx.h - $(Build/Patch) -endef - define Build/Configure if [ -f ./files/config.$(UCLIBC_TARGET_ARCH) ]; then \ cp ./files/config.$(UCLIBC_TARGET_ARCH) $(PKG_BUILD_DIR)/.config; \ diff --git a/package/libs/uclibc++/files/config.default b/package/libs/uclibc++/files/config.default index 944e1a6cfb..d76670e969 100644 --- a/package/libs/uclibc++/files/config.default +++ b/package/libs/uclibc++/files/config.default @@ -8,7 +8,7 @@ UCLIBCXX_HAS_FLOATS=y # UCLIBCXX_HAS_LONG_DOUBLE is not set # UCLIBCXX_HAS_TLS is not set -WARNINGS="-Wall" +UCLIBCXX_WARNINGS="" BUILD_EXTRA_LIBRARIES="" HAVE_DOT_CONFIG=y @@ -23,10 +23,10 @@ UCLIBCXX_SUPPORT_CIN=y UCLIBCXX_SUPPORT_COUT=y UCLIBCXX_SUPPORT_CERR=y UCLIBCXX_SUPPORT_CLOG=y -UCLIBCXX_SUPPORT_WCIN=y -UCLIBCXX_SUPPORT_WCOUT=y -UCLIBCXX_SUPPORT_WCERR=y -UCLIBCXX_SUPPORT_WCLOG=y +# UCLIBCXX_SUPPORT_WCIN is not set +# UCLIBCXX_SUPPORT_WCOUT is not set +# UCLIBCXX_SUPPORT_WCERR is not set +# UCLIBCXX_SUPPORT_WCLOG is not set # # STL and Code Expansion diff --git a/package/libs/uclibc++/patches/001-no-ansi.patch b/package/libs/uclibc++/patches/001-no-ansi.patch new file mode 100644 index 0000000000..7ddbf52f00 --- /dev/null +++ b/package/libs/uclibc++/patches/001-no-ansi.patch @@ -0,0 +1,10 @@ +--- a/Rules.mak ++++ b/Rules.mak +@@ -232,7 +232,6 @@ endif + GEN_CXXFLAGS:=-nostdinc++ + GEN_CXXFLAGS+=$(if $(CXXFLAG_-fvisibility-inlines-hidden),-DGCC_HASCLASSVISIBILITY) + CXXFLAGS:=$(CFLAGS) +-CFLAGS += -ansi + + LIBGCC:=$(shell $(CC) -print-libgcc-file-name) + LIBGCC_DIR:=$(dir $(LIBGCC)) diff --git a/package/libs/uclibc++/patches/002-path_to_bash.patch b/package/libs/uclibc++/patches/002-path_to_bash.patch deleted file mode 100644 index 26d88ee4dd..0000000000 --- a/package/libs/uclibc++/patches/002-path_to_bash.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/bin/Makefile -+++ b/bin/Makefile -@@ -13,7 +13,7 @@ install: - $(INSTALL) -m 755 $(WRAPPER) $(PREFIX)$(UCLIBCXX_RUNTIME_BINDIR) - - $(WRAPPER): Makefile -- echo '#!/bin/sh' > $@ -+ echo '#!/usr/bin/env bash' > $@ - echo '' >> $@ - echo 'WRAPPER_INCLUDEDIR="$${WRAPPER_INCLUDEDIR:=-I$(UCLIBCXX_RUNTIME_INCLUDEDIR)}"' >> $@ - echo 'WRAPPER_LIBDIR="$${WRAPPER_LIBDIR:=-L$(UCLIBCXX_RUNTIME_LIBDIR)}"' >> $@ diff --git a/package/libs/uclibc++/patches/002-quote-fix.patch b/package/libs/uclibc++/patches/002-quote-fix.patch new file mode 100644 index 0000000000..49e7ac3d14 --- /dev/null +++ b/package/libs/uclibc++/patches/002-quote-fix.patch @@ -0,0 +1,13 @@ +--- a/bin/Makefile.in ++++ b/bin/Makefile.in +@@ -44,8 +44,8 @@ define do_wrapper + $(Q)echo ' WRAPPER_OPTIONS="$$WRAPPER_OPTIONS -nodefaultlibs $$WRAPPER_LIBDIR -l$(LNAME) $$WRAPPER_LIBS"' >> $@.tmp + $(Q)echo 'fi' >> $@.tmp + $(Q)echo '' >> $@.tmp +- $(Q)echo '[ -n "$$V" ] && [ $$V -gt 1 ] && echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR "$$@" $$WRAPPER_OPTIONS' >> $@.tmp +- $(Q)echo 'exec $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR "$$@" $$WRAPPER_OPTIONS' >> $@.tmp ++ $(Q)echo '[ -n "$$V" ] && [ $$V -gt 1 ] && echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$@ $$WRAPPER_OPTIONS' >> $@.tmp ++ $(Q)echo 'exec $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$@ $$WRAPPER_OPTIONS' >> $@.tmp + $(Q)echo '' >> $@.tmp + $(Q)chmod 0755 $@.tmp + $(Q)mv $@.tmp $@ diff --git a/package/libs/uclibc++/patches/003-no-fPIC.patch b/package/libs/uclibc++/patches/003-no-fPIC.patch new file mode 100644 index 0000000000..206a00de32 --- /dev/null +++ b/package/libs/uclibc++/patches/003-no-fPIC.patch @@ -0,0 +1,10 @@ +--- a/Rules.mak ++++ b/Rules.mak +@@ -185,7 +185,6 @@ export UCLIBCXX_RUNTIME_PREFIX UCLIBCXX_RUNTIME_LIBDIR UCLIBCXX_RUNTIME_BINDIR U + + WRAPPER = $(top_builddir)bin/g++-uc + OPTIMIZATION:= +-PICFLAG:=-fPIC + + # use '-Os' optimization if available, else use -O2, allow Config to override + $(eval $(call check-gcc-var,-Os)) diff --git a/package/libs/uclibc++/patches/004-no-pedantic.patch b/package/libs/uclibc++/patches/004-no-pedantic.patch new file mode 100644 index 0000000000..5128ca3f83 --- /dev/null +++ b/package/libs/uclibc++/patches/004-no-pedantic.patch @@ -0,0 +1,13 @@ +--- a/Rules.mak ++++ b/Rules.mak +@@ -200,10 +200,6 @@ $(eval $(call check-gxx-var,-std=gnu++14)) + $(eval $(call check-gxx-var,-Wno-sized-deallocation)) + $(eval $(call check-gxx-var,-Wno-tautological-compare)) + +-# Add a bunch of extra pedantic annoyingly strict checks +-XWARNINGS=$(call qstrip,$(UCLIBCXX_WARNINGS)) -Wno-trigraphs -pedantic +-CPU_CFLAGS=$(call qstrip,$(CPU_CFLAGS-y)) +- + # Some nice CFLAGS to work with + GEN_CFLAGS:=-fno-builtin + CFLAGS:=$(XWARNINGS) $(CPU_CFLAGS) diff --git a/package/libs/uclibc++/patches/006-eabi_fix.patch b/package/libs/uclibc++/patches/006-eabi_fix.patch deleted file mode 100644 index 893c2d60b6..0000000000 --- a/package/libs/uclibc++/patches/006-eabi_fix.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/include/typeinfo -+++ b/include/typeinfo -@@ -44,6 +44,7 @@ namespace __cxxabiv1 - class __class_type_info; - } // namespace __cxxabiv1 - -+#ifndef __GXX_MERGED_TYPEINFO_NAMES - #if !__GXX_WEAK__ - // If weak symbols are not supported, typeinfo names are not merged. - #define __GXX_MERGED_TYPEINFO_NAMES 0 -@@ -51,6 +52,7 @@ namespace __cxxabiv1 - // On platforms that support weak symbols, typeinfo names are merged. - #define __GXX_MERGED_TYPEINFO_NAMES 1 - #endif -+#endif - - namespace std - { ---- a/include/unwind-cxx.h -+++ b/include/unwind-cxx.h -@@ -173,6 +173,7 @@ extern std::unexpected_handler __unexpec - - // This is the exception class we report -- "GNUCC++\0". - const _Unwind_Exception_Class __gxx_exception_class -+#ifndef __ARM_EABI_UNWINDER__ - = ((((((((_Unwind_Exception_Class) 'G' - << 8 | (_Unwind_Exception_Class) 'N') - << 8 | (_Unwind_Exception_Class) 'U') -@@ -181,6 +182,9 @@ const _Unwind_Exception_Class __gxx_exce - << 8 | (_Unwind_Exception_Class) '+') - << 8 | (_Unwind_Exception_Class) '+') - << 8 | (_Unwind_Exception_Class) '\0'); -+#else -+= "GNUC++"; -+#endif - - // GNU C++ personality routine, Version 0. - extern "C" _Unwind_Reason_Code __gxx_personality_v0 diff --git a/package/libs/uclibc++/patches/010-honor-ldflags.patch b/package/libs/uclibc++/patches/010-honor-ldflags.patch deleted file mode 100644 index b1050cb1bd..0000000000 --- a/package/libs/uclibc++/patches/010-honor-ldflags.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/src/Makefile -+++ b/src/Makefile -@@ -3,9 +3,9 @@ include $(TOPDIR)Rules.mak - - WR_CXX := WRAPPER_INCLUDEDIR=-I$(TOPDIR)include $(TOPDIR)bin/g++-uc - --LDFLAGS += -nodefaultlibs -shared -Wl,-soname,$(SHARED_MAJORNAME) $(BUILD_EXTRA_LIBRARIES) -+EXTRA_LDFLAGS += -nodefaultlibs -shared -Wl,-soname,$(SHARED_MAJORNAME) $(BUILD_EXTRA_LIBRARIES) - ifneq ($(DODEBUG),y) --LDFLAGS += -Wl,-s -+EXTRA_LDFLAGS += -Wl,-s - endif - - SRCS = $(wildcard *.cpp) -@@ -60,7 +60,7 @@ $(LIBNAME).a: libgcc_eh libsupc $(EXOBJS - $(RANLIB) $@ - - $(SHARED_FULLNAME): libgcc_eh libsupc $(EXOBJS) -- $(CC) $(LDFLAGS) -o $@ $(EXOBJS) $(SUPOBJS) $(GCCOBJS) $(LIBS) -+ $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $(EXOBJS) $(SUPOBJS) $(GCCOBJS) $(LIBS) - $(LN) $@ $(SHARED_MAJORNAME) - $(LN) $(SHARED_MAJORNAME) $(LIBNAME).so - diff --git a/package/libs/uclibc++/patches/020-template-fix.patch b/package/libs/uclibc++/patches/020-template-fix.patch deleted file mode 100644 index f7cc09e140..0000000000 --- a/package/libs/uclibc++/patches/020-template-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/include/ostream -+++ b/include/ostream -@@ -294,7 +294,7 @@ namespace std { - #endif - #endif - -- template > -+ template - class _UCXXEXPORT basic_ostream::sentry - { - bool ok; ---- a/include/istream -+++ b/include/istream -@@ -340,7 +340,7 @@ namespace std{ - - }; - -- template > class _UCXXEXPORT basic_istream::sentry { -+ template class _UCXXEXPORT basic_istream::sentry { - bool ok; - public: - explicit _UCXXEXPORT sentry(basic_istream& os, bool noskipws = false){ diff --git a/package/libs/uclibc++/patches/030-memory_corruption_fix.patch b/package/libs/uclibc++/patches/030-memory_corruption_fix.patch deleted file mode 100644 index e34efdbb15..0000000000 --- a/package/libs/uclibc++/patches/030-memory_corruption_fix.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 1dc865b8bbb3911abc8ce53c7ae8a59dc90f6fc3 Mon Sep 17 00:00:00 2001 -From: Ivan Kold -Date: Thu, 3 Mar 2016 12:56:30 -0800 -Subject: [PATCH] Fix throw statement causing memory corruption - -The __cxxabiv1::__cxa_throw in the GCC's libsupc++ expects -sizeof(__cxa_refcounted_exception) bytes be allocated before -exception object. -uClibc++ allocates only sizeof(__cxa_exception) before an -exception object. -The __cxxabiv1::__cxa_throw writes in memory before allocated: -// gcc-5.2.0/libstdc++-v3/libsupc++/eh_throw.cc:69 -__cxa_refcounted_exception *header - = __get_refcounted_exception_header_from_obj (obj); -header->referenceCount = 1; - -Signed-off-by: Ivan Kold ---- - include/unwind-cxx.h | 34 +++++++++++++++++++++++++++++++++- - src/eh_alloc.cpp | 8 ++++---- - 2 files changed, 37 insertions(+), 5 deletions(-) - ---- a/include/unwind-cxx.h -+++ b/include/unwind-cxx.h -@@ -1,5 +1,5 @@ - // -*- C++ -*- Exception handling and frame unwind runtime interface routines. --// Copyright (C) 2001 Free Software Foundation, Inc. -+// Copyright (C) 2001-2015 Free Software Foundation, Inc. - // - // This file is part of GCC. - // -@@ -13,6 +13,10 @@ - // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - // GNU General Public License for more details. - // -+// Under Section 7 of GPL version 3, you are granted additional -+// permissions described in the GCC Runtime Library Exception, version -+// 3.1, as published by the Free Software Foundation. -+// - // You should have received a copy of the GNU General Public License - // along with GCC; see the file COPYING. If not, write to - // the Free Software Foundation, 59 Temple Place - Suite 330, -@@ -40,6 +44,12 @@ - #include - #include "unwind.h" - -+// Original unwind-cxx.h also includes bits/atomic_word.h which is CPU-specific, -+// but always defines _Atomic_word as typedef int . -+// Only thing that differs is memory-barrier macroses. -+typedef int _Atomic_word; -+ -+ - #pragma GCC visibility push(default) - - namespace __cxxabiv1 -@@ -79,6 +89,13 @@ struct __cxa_exception - _Unwind_Exception unwindHeader; - }; - -+struct __cxa_refcounted_exception -+{ -+ // Manage this header. -+ _Atomic_word referenceCount; -+ // __cxa_exception must be last, and no padding can be after it. -+ __cxa_exception exc; -+}; - - // A dependent C++ exception object consists of a header, which is a wrapper - // around an unwind object header with additional C++ specific information, -@@ -210,6 +227,21 @@ __get_exception_header_from_ue (_Unwind_ - return reinterpret_cast<__cxa_exception *>(exc + 1) - 1; - } - -+// Acquire the C++ refcounted exception header from the C++ object. -+static inline __cxa_refcounted_exception * -+__get_refcounted_exception_header_from_obj (void *ptr) -+{ -+ return reinterpret_cast<__cxa_refcounted_exception *>(ptr) - 1; -+} -+ -+// Acquire the C++ refcounted exception header from the generic exception -+// header. -+static inline __cxa_refcounted_exception * -+__get_refcounted_exception_header_from_ue (_Unwind_Exception *exc) -+{ -+ return reinterpret_cast<__cxa_refcounted_exception *>(exc + 1) - 1; -+} -+ - } /* namespace __cxxabiv1 */ - - #pragma GCC visibility pop ---- a/src/eh_alloc.cpp -+++ b/src/eh_alloc.cpp -@@ -30,16 +30,16 @@ extern "C" void * __cxa_allocate_excepti - void *retval; - //The sizeof crap is required by Itanium ABI because we need to provide space for - //accounting information which is implementaion (gcc) specified -- retval = malloc (thrown_size + sizeof(__cxa_exception)); -+ retval = malloc (thrown_size + sizeof(__cxa_refcounted_exception)); - if (0 == retval){ - std::terminate(); - } -- memset (retval, 0, sizeof(__cxa_exception)); -- return (void *)((unsigned char *)retval + sizeof(__cxa_exception)); -+ memset (retval, 0, sizeof(__cxa_refcounted_exception)); -+ return (void *)((unsigned char *)retval + sizeof(__cxa_refcounted_exception)); - } - - extern "C" void __cxa_free_exception(void *vptr) throw(){ -- free( (char *)(vptr) - sizeof(__cxa_exception) ); -+ free( (char *)(vptr) - sizeof(__cxa_refcounted_exception) ); - } - - diff --git a/package/libs/uclibc++/patches/040-delete-c++14.patch b/package/libs/uclibc++/patches/040-delete-c++14.patch deleted file mode 100644 index f48a78f0a4..0000000000 --- a/package/libs/uclibc++/patches/040-delete-c++14.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/del_op.cpp -+++ b/src/del_op.cpp -@@ -24,3 +24,7 @@ - _UCXXEXPORT void operator delete(void* ptr) throw(){ - free(ptr); - } -+ -+_UCXXEXPORT void operator delete(void* ptr, size_t size) throw(){ -+ free(ptr); -+} ---- a/src/del_opv.cpp -+++ b/src/del_opv.cpp -@@ -24,3 +24,7 @@ - _UCXXEXPORT void operator delete[](void * ptr) throw(){ - free(ptr); - } -+ -+_UCXXEXPORT void operator delete[](void * ptr, size_t size) throw(){ -+ free(ptr); -+} diff --git a/package/libs/uclibc++/patches/050-Bugfix-erase-on-derived-__base_associative.patch b/package/libs/uclibc++/patches/050-Bugfix-erase-on-derived-__base_associative.patch deleted file mode 100644 index 2ddb8a984e..0000000000 --- a/package/libs/uclibc++/patches/050-Bugfix-erase-on-derived-__base_associative.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 946b29e62927eadfc4e87f27b8d30e5974b78c4c Mon Sep 17 00:00:00 2001 -From: Ben Kelly -Date: Mon, 6 Feb 2017 13:08:25 +0200 -Subject: [PATCH] Bugfix erase() on derived __base_associative - -When calling erase() on a containers derived from __base_associative -(e.g. multimap) and providing a pair of iterators a segfault will -occur. - -Example code to reproduce: - - typedef std::multimap testmap; - testmap t; - t.insert(std::pair(1, 1)); - t.insert(std::pair(2, 1)); - t.insert(std::pair(3, 1)); - t.erase(t.begin(), t.end()); - -Signed-off-by: Ben Kelly ---- - include/associative_base | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/include/associative_base b/include/associative_base -index 27ae0ef..be8b27f 100644 ---- a/include/associative_base -+++ b/include/associative_base -@@ -200,8 +200,7 @@ public: - } - void erase(iterator first, iterator last){ - while(first != last){ -- backing.erase(first.base_iterator()); -- ++first; -+ first = backing.erase(first.base_iterator()); - } - } - --- -2.7.4 -