Commit 32d225be authored by Natanael Copa's avatar Natanael Copa

main/uclibc++: import patches from openwrt

https://dev.openwrt.org/browser/packages/libs/uclibc%2B%2B/patches
parent 1444ddae
diff -ur old/Makefile dev/Makefile
--- old/Makefile Sat Oct 14 17:49:55 2006
+++ dev/Makefile Sat Oct 14 17:50:18 2006
@@ -1,4 +1,3 @@
-MAKE = make
SUBDIRS = bin include src
# User defines:
@@ -43,10 +42,10 @@
#Menu configuration system
extra/config/conf:
- make -C extra/config conf
+ $(MAKE) -C extra/config conf
extra/config/mconf:
- make -C extra/config ncurses mconf
+ $(MAKE) -C extra/config ncurses mconf
menuconfig: extra/config/mconf
@./extra/config/mconf extra/Configs/Config.in
@@ -71,7 +70,7 @@
include/system_configuration.h: .config
@if [ ! -x ./extra/config/conf ] ; then \
- make -C extra/config conf; \
+ $(MAKE) -C extra/config conf; \
fi;
@./extra/config/conf -o extra/Configs/Config.in
diff -ur old/bin/Makefile dev/bin/Makefile
--- old/bin/Makefile Sat Oct 14 17:49:54 2006
+++ dev/bin/Makefile Sat Oct 14 17:57:33 2006
@@ -13,7 +13,7 @@
$(INSTALL) -m 755 $(WRAPPER) $(PREFIX)$(UCLIBCXX_RUNTIME_BINDIR)
$(WRAPPER):
- echo "#!/bin/bash" > $(WRAPPER)
+ echo "#!/usr/bin/env bash" > $(WRAPPER)
echo "" >> $(WRAPPER)
echo 'WRAPPER_INCLUDEDIR="$${WRAPPER_INCLUDEDIR:=-I$(UCLIBCXX_RUNTIME_INCLUDEDIR)}"' >> $(WRAPPER)
echo 'WRAPPER_LIBDIR="$${WRAPPER_LIBDIR:=-L$(UCLIBCXX_RUNTIME_LIBDIR)}"' >> $(WRAPPER)
diff -ur old/src/Makefile dev/src/Makefile
--- old/src/Makefile Sat Oct 14 17:49:54 2006
+++ dev/src/Makefile Sat Oct 14 18:02:30 2006
@@ -25,12 +25,14 @@
all: libgcc_eh libsupc $(EXOBJS) $(ALLBIN)
+CP = cp -fPR
+
install:
$(INSTALL) -d $(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
ifneq ($(BUILD_ONLY_STATIC_LIB),y)
$(INSTALL) -m 755 $(SHARED_FULLNAME) \
$(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
- cp -fa $(SHARED_MAJORNAME) $(LIBNAME).so $(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
+ $(CP) $(SHARED_MAJORNAME) $(LIBNAME).so $(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
endif
ifeq ($(BUILD_STATIC_LIB),y)
$(INSTALL) -m 644 $(LIBNAME).a $(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
diff -ruN uClibc++-0.2.2-old/src/abi/libgcc_eh/Makefile uClibc++-0.2.2-new/src/abi/libgcc_eh/Makefile
--- uClibc++-0.2.2-old/src/abi/libgcc_eh/Makefile 2007-06-04 00:51:13.000000000 +0200
+++ uClibc++-0.2.2-new/src/abi/libgcc_eh/Makefile 2007-09-03 21:51:07.000000000 +0200
@@ -16,7 +16,7 @@
#
#else
# echo Binary
- $(AR) x $(shell CC=$(CC) $(TOPDIR)/scripts/find_libgcc_eh.sh)
+ $(AR) x $(shell CC="$(CC)" $(TOPDIR)/scripts/find_libgcc_eh.sh)
#endif
#endif
diff -ruN uClibc++-0.2.2-old/src/abi/libsupc/Makefile uClibc++-0.2.2-new/src/abi/libsupc/Makefile
--- uClibc++-0.2.2-old/src/abi/libsupc/Makefile 2007-06-04 00:51:13.000000000 +0200
+++ uClibc++-0.2.2-new/src/abi/libsupc/Makefile 2007-09-03 21:51:17.000000000 +0200
@@ -14,7 +14,7 @@
#
#else
# echo Binary
- $(AR) x $(shell CC=$(CC) $(TOPDIR)/scripts/find_libsupc.sh)
+ $(AR) x $(shell CC="$(CC)" $(TOPDIR)/scripts/find_libsupc.sh)
$(RM) -f new_op*.o del_op*.o pure.o new_handler.o eh_alloc.o eh_globals.o
#
#endif
diff -ruN uClibc++-0.2.2-old/bin/Makefile uClibc++-0.2.2-new/bin/Makefile
--- uClibc++-0.2.2-old/bin/Makefile 2007-09-23 13:46:10.000000000 +0200
+++ uClibc++-0.2.2-new/bin/Makefile 2007-09-23 13:47:03.000000000 +0200
@@ -25,7 +25,7 @@
echo 'while [ -n "$$1" ]' >> $(WRAPPER)
echo 'do' >> $(WRAPPER)
echo ' WRAPPER_OPTIONS="$$WRAPPER_OPTIONS $$1"' >> $(WRAPPER)
- echo ' if [ "$$1" = "-c" -o "$$1" = "-E" -o "$$1" = "-S" ]' >> $(WRAPPER)
+ echo ' if [ "$$1" = "-c" -o "$$1" = "-E" -o "$$1" = "-S" -o "$$1" = "-MF" ]' >> $(WRAPPER)
echo ' then' >> $(WRAPPER)
echo ' WRAPPER_INCLIB="N"' >> $(WRAPPER)
echo ' fi' >> $(WRAPPER)
Index: uClibc++-0.2.2/include/typeinfo
===================================================================
--- uClibc++-0.2.2.orig/include/typeinfo 2008-02-13 00:37:04.000000000 +0100
+++ uClibc++-0.2.2/include/typeinfo 2008-02-13 00:37:34.000000000 +0100
@@ -44,6 +44,7 @@
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 @@
// On platforms that support weak symbols, typeinfo names are merged.
#define __GXX_MERGED_TYPEINFO_NAMES 1
#endif
+#endif
namespace std
{
Index: uClibc++-0.2.2/include/unwind-cxx.h
===================================================================
--- uClibc++-0.2.2.orig/include/unwind-cxx.h 2008-02-13 00:38:04.000000000 +0100
+++ uClibc++-0.2.2/include/unwind-cxx.h 2008-02-13 00:40:32.000000000 +0100
@@ -135,6 +135,7 @@
// 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')
@@ -143,6 +144,9 @@
<< 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
Index: uClibc++-0.2.2/include/limits
===================================================================
--- uClibc++-0.2.2/include/limits (revision 1877)
+++ uClibc++-0.2.2/include/limits (revision 1878)
@@ -143,6 +143,53 @@
static T signaling_NaN();
};
+template <> class numeric_limits<bool> {
+public:
+ typedef bool T;
+ // General -- meaningful for all specializations.
+ static const bool is_specialized = true;
+ static T min(){
+ return false;
+ }
+ static T max(){
+ return true;
+ }
+ static const int radix = 2;
+ static const int digits = 1;
+ static const int digits10 = 0;
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const bool traps = false;
+ static const bool is_modulo = false;
+ static const bool is_bounded = true;
+
+ // Floating point specific.
+
+ static T epsilon(){
+ return 0;
+ }
+ static T round_error(){
+ return 0;
+ }
+ static const int min_exponent10 = 0;
+ static const int max_exponent10 = 0;
+ static const int min_exponent = 0;
+
+ static const int max_exponent = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const bool is_iec559 = false;
+ static const bool has_denorm = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_indeterminate;
+ static T denorm_min();
+ static T infinity();
+ static T quiet_NaN();
+ static T signaling_NaN();
+};
+
template <> class numeric_limits<unsigned char> {
public:
typedef unsigned char T;
@@ -567,6 +614,7 @@
};
template <> class numeric_limits<double> {
+public:
typedef double numeric_type;
static const bool is_specialized = true;
This diff is collapsed.
--- a/src/eh_alloc.cpp 2007-06-03 23:51:13.000000000 +0100
+++ b/src/eh_alloc.cpp 2009-07-13 09:42:39.000000000 +0100
@@ -42,4 +42,21 @@
free( (char *)(vptr) - sizeof(__cxa_exception) );
}
+#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404
+extern "C" __cxa_dependent_exception* __cxa_allocate_dependent_exception() throw(){
+ __cxa_dependent_exception *retval;
+
+ retval = static_cast<__cxa_dependent_exception*>(malloc(sizeof(__cxa_dependent_exception)));
+ if(0 == retval){
+ std::terminate();
+ }
+ memset (retval, 0, sizeof(__cxa_dependent_exception));
+ return retval ;
+}
+
+extern "C" void __cxa_free_dependent_exception(__cxa_dependent_exception *vptr) throw(){
+ free( vptr );
+}
+#endif
+
}
--- a/include/unwind-cxx.h 2009-07-13 10:01:11.000000000 +0100
+++ b/include/unwind-cxx.h 2009-07-13 10:14:08.000000000 +0100
@@ -79,6 +79,41 @@
_Unwind_Exception unwindHeader;
};
+#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404
+// A dependent C++ exception object consists of a wrapper around an unwind
+// object header with additional C++ specific information, containing a pointer
+// to a primary exception object.
+
+struct __cxa_dependent_exception
+{
+ // The primary exception this thing depends on.
+ void *primaryException;
+
+ // The C++ standard has entertaining rules wrt calling set_terminate
+ // and set_unexpected in the middle of the exception cleanup process.
+ std::unexpected_handler unexpectedHandler;
+ std::terminate_handler terminateHandler;
+
+ // The caught exception stack threads through here.
+ __cxa_exception *nextException;
+
+ // How many nested handlers have caught this exception. A negated
+ // value is a signal that this object has been rethrown.
+ int handlerCount;
+
+ // Cache parsed handler data from the personality routine Phase 1
+ // for Phase 2 and __cxa_call_unexpected.
+ int handlerSwitchValue;
+ const unsigned char *actionRecord;
+ const unsigned char *languageSpecificData;
+ _Unwind_Ptr catchTemp;
+ void *adjustedPtr;
+
+ // The generic exception header. Must be last.
+ _Unwind_Exception unwindHeader;
+};
+
+#endif
// Each thread in a C++ program has access to a __cxa_eh_globals object.
struct __cxa_eh_globals
{
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uclibc++
pkgver=0.2.2
pkgrel=3
pkgrel=4
pkgdesc="Embedded C++ library"
url="http://cxx.uclibc.org/"
license='GPL-2'
......@@ -9,6 +9,15 @@ depends=
makedepends=
subpackages="$pkgname-dev"
source="http://cxx.uclibc.org/src/uClibc++-$pkgver.tar.bz2
001-path_to_make.patch
002-path_to_bash.patch
003-cp_command.patch
004-ccache_fixes.patch
005-wrapper.patch
006-eabi_fix.patch
007-numeric_limits.patch
008-integer_width.patch
900-dependent_exception.patch
associative_base.patch
uclibc++-gcc-4.3.patch
uclibc++config
......@@ -42,6 +51,15 @@ dev() {
md5sums="1ceef3209cca88be8f1bd9de99735954 uClibc++-0.2.2.tar.bz2
ce1016fb83c23c83486f35f4cd1b64ab 001-path_to_make.patch
42954542f9f3c5dd6febb73d2db7f1d0 002-path_to_bash.patch
8068b394de053ed94a742d1ed9657b99 003-cp_command.patch
363dc1cd86052f44212c2f3ac15926da 004-ccache_fixes.patch
3689f8d77984ca66554e14cacbeb796c 005-wrapper.patch
99e625748c0e6d5fc7cef8484cbac587 006-eabi_fix.patch
d335b8f1c9d4682a220a082a371277e4 007-numeric_limits.patch
2c431d4ad46a244f2f50baf40b85f7d2 008-integer_width.patch
4e9c416c2a107f7d814f938fa57901a5 900-dependent_exception.patch
5689baa3f3bf8488c0a5d27a690d30fa associative_base.patch
4c7b499e4697225378acef25f6364e9b uclibc++-gcc-4.3.patch
2f573c1e2a0c7a320ea4685cc3ce9e2a uclibc++config"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment