uclibc++: fix build with gcc 6.1.0, which defaults to using C++14 ABI
authorFelix Fietkau <nbd@nbd.name>
Thu, 14 Jul 2016 11:02:48 +0000 (13:02 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 15 Jul 2016 12:18:01 +0000 (14:18 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/libs/uclibc++/Makefile
package/libs/uclibc++/patches/040-delete-c++14.patch [new file with mode: 0644]

index 4c7c7678e3ace5d0c5bd93c76ce5190857c59ca3..c38655029265b5c62f2bd3fcca8913400905188c 100644 (file)
@@ -63,6 +63,7 @@ MAKE_FLAGS:= \
        LDFLAGS="-Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,defs $(TARGET_LDFLAGS)" \
        CP="$(CP)" \
        GEN_LIBS="-lc $(LIBGCC_S) $(SSP_LIB)" \
+       GEN_CFLAGS="-std=gnu++98 -nostdinc++" \
        check_as_needed=
 
 # check_as_needed overrides dependency on libgcc_s
diff --git a/package/libs/uclibc++/patches/040-delete-c++14.patch b/package/libs/uclibc++/patches/040-delete-c++14.patch
new file mode 100644 (file)
index 0000000..f48a78f
--- /dev/null
@@ -0,0 +1,20 @@
+--- 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);
++}