[source] uclibc++: fix build with gcc 6.1.0, which defaults to using C++14 ABI

LEDE Commits lede-commits at lists.infradead.org
Fri Jul 15 05:20:13 PDT 2016


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=b948c9371b2bce7b5c3ca5812cc4b9d9a02b49b9

commit b948c9371b2bce7b5c3ca5812cc4b9d9a02b49b9
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jul 14 13:02:48 2016 +0200

    uclibc++: fix build with gcc 6.1.0, which defaults to using C++14 ABI
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/uclibc++/Makefile                       |  1 +
 package/libs/uclibc++/patches/040-delete-c++14.patch | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/package/libs/uclibc++/Makefile b/package/libs/uclibc++/Makefile
index 4c7c767..c386550 100644
--- a/package/libs/uclibc++/Makefile
+++ b/package/libs/uclibc++/Makefile
@@ -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
index 0000000..f48a78f
--- /dev/null
+++ b/package/libs/uclibc++/patches/040-delete-c++14.patch
@@ -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);
++}



More information about the lede-commits mailing list