Procházet zdrojové kódy

uclibcxx: fix compile for rpi

Waldemar Brodkorb před 10 roky
rodič
revize
3ca1407b8b

+ 2 - 1
package/uclibc++/Makefile

@@ -16,6 +16,7 @@ PKG_LIBNAME:=		uclibc++
 PKG_OPTS:=		dev
 
 DISTFILES:=		uClibc++-${PKG_VERSION}.tar.bz2
+WRKDIST=		${WRKDIR}/uClibc++-${PKG_VERSION}
 
 PKG_LIBC_DEPENDS:=	uclibc-ng
 
@@ -28,7 +29,7 @@ INSTALL_STYLE:=         manual
 
 MAKE_FLAGS+=		ADK_TOPDIR="${WRKBUILD}/" \
 			${TARGET_CONFIGURE_OPTS} \
-			ARCH_CFLAGS="${TARGET_CFLAGS}" \
+			ARCH_CFLAGS="${TARGET_CFLAGS} -lgcc_s" \
 			CROSS="${TARGET_CROSS}"
 TARGET_CONFIGURE_OPTS=
 

+ 19 - 1
package/uclibc++/patches/patch-Rules_mak

@@ -1,5 +1,5 @@
 --- uClibc++-0.2.4.orig/Rules.mak	2012-05-25 23:15:31.000000000 +0200
-+++ uClibc++-0.2.4/Rules.mak	2014-05-26 16:20:39.000000000 +0200
++++ uClibc++-0.2.4/Rules.mak	2015-10-14 18:06:07.000000000 +0200
 @@ -79,9 +79,6 @@ check_gcc=$(shell if $(CC) $(1) -S -o /d
  check_gxx_visibility=$(shell if $(CXX) -fvisibility-inlines-hidden -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
          then echo "-DGCC_HASCLASSVISIBILITY"; fi)
@@ -10,3 +10,21 @@
  # strip quotes
  qstrip = $(strip $(subst ",,$(1)))
  #"))
+@@ -107,7 +104,7 @@ CPU_CFLAGS=$(call qstrip,$(CPU_CFLAGS-y)
+ 
+ # Some nice CFLAGS to work with
+ GEN_CFLAGS:=-fno-builtin
+-CFLAGS:=$(XWARNINGS) $(CPU_CFLAGS) -ansi
++CFLAGS:=$(XWARNINGS) $(CPU_CFLAGS)
+ 
+ LDFLAGS:=-Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,defs
+ 
+@@ -145,7 +142,7 @@ endif
+ ifneq ($(IMPORT_LIBSUP),y)
+   GEN_LIBS += -lsupc++
+ endif
+-GEN_LIBS += -lc -lgcc
++GEN_LIBS += -lc -lgcc -lgcc_s
+ 
+ LIBS := $(GEN_LIBS)
+ STATIC_LIBS := $(GEN_LIBS)

+ 13 - 14
package/uclibc++/patches/patch-include_unwind-cxx_h

@@ -1,21 +1,20 @@
 http://git.uclibc.org/uClibc++/commit/?id=cf73cb907c03ca2fb22bfe7fe2f732c10714b9ad
 --- uClibc++-0.2.4.orig/include/unwind-cxx.h	2012-05-25 23:15:31.000000000 +0200
-+++ uClibc++-0.2.4/include/unwind-cxx.h	2013-09-24 11:48:52.000000000 +0200
-@@ -173,6 +173,7 @@ extern std::unexpected_handler __unexpec
++++ uClibc++-0.2.4/include/unwind-cxx.h	2015-10-14 17:02:55.000000000 +0200
+@@ -172,15 +172,7 @@ extern std::unexpected_handler __unexpec
+ // These are explicitly GNU C++ specific.
  
  // 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
-+= "GNUCC++";
-+#endif 
+-const _Unwind_Exception_Class __gxx_exception_class
+-= ((((((((_Unwind_Exception_Class) 'G' 
+-	 << 8 | (_Unwind_Exception_Class) 'N')
+-	<< 8 | (_Unwind_Exception_Class) 'U')
+-       << 8 | (_Unwind_Exception_Class) 'C')
+-      << 8 | (_Unwind_Exception_Class) 'C')
+-     << 8 | (_Unwind_Exception_Class) '+')
+-    << 8 | (_Unwind_Exception_Class) '+')
+-   << 8 | (_Unwind_Exception_Class) '\0');
++const _Unwind_Exception_Class __gxx_exception_class = "GNUCC++";
  
  // GNU C++ personality routine, Version 0.
  extern "C" _Unwind_Reason_Code __gxx_personality_v0