[glade] linux64 bundler build: Fixed to include libcwrap.h for C++ sources.



commit bf5d7ba775d58edc8d7ea4591cd30772f5941ab3
Author: Tristan Van Berkom <tristan upstairslabs com>
Date:   Sat Dec 14 00:13:32 2013 +0900

    linux64 bundler build: Fixed to include libcwrap.h for C++ sources.

 build/linux64/jhbuildrc  |    9 +++++++--
 build/linux64/libcwrap.h |   10 ++++++++--
 2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/build/linux64/jhbuildrc b/build/linux64/jhbuildrc
index 3d01f07..52fbaff 100644
--- a/build/linux64/jhbuildrc
+++ b/build/linux64/jhbuildrc
@@ -8,8 +8,9 @@ moduleset = 'bundle.modules'
 # Unset autogenargs (screws with some modules like freetype)
 autogenargs = ''
 
-# Make sure we require a low libc dependency
-os.environ['CC'] = 'gcc -U_FORTIFY_SOURCE -DCAIRO_NO_MUTEX=1 -include ' + os.getenv('GLADE_DIR') + 
'/build/linux64/libcwrap.h'
+# Make sure we require a low libc dependency when compiling C or C++
+os.environ['CC']  = 'gcc -U_FORTIFY_SOURCE -DCAIRO_NO_MUTEX=1 -include ' + os.getenv('GLADE_DIR') + 
'/build/linux64/libcwrap.h'
+os.environ['CXX'] = 'g++ -U_FORTIFY_SOURCE -DCAIRO_NO_MUTEX=1 -include ' + os.getenv('GLADE_DIR') + 
'/build/linux64/libcwrap.h'
 
 # Enable our custom triggers
 os.environ['JHBUILD_TRIGGERS'] = os.getenv('GLADE_DIR') + '/build/linux64/triggers'
@@ -25,3 +26,7 @@ checkoutroot = '~/AppImages/Sources'
 
 # the prefix to configure/install modules to (must have write access)
 prefix = '~/AppImages/Install'
+
+# Uncomment this for verbose builds
+makeargs = "V=1"
+
diff --git a/build/linux64/libcwrap.h b/build/linux64/libcwrap.h
index b425f39..30abb2f 100644
--- a/build/linux64/libcwrap.h
+++ b/build/linux64/libcwrap.h
@@ -4,7 +4,10 @@
 /* This needs to be fixed, should rather be #if defined (__C__) or
  * whatever the right automatic macro is (just need to find it).
  */
-#if !defined(__OBJC__) && !defined(__cplusplus) && !defined(__ASSEMBLER__)
+#  if !defined (__OBJC__) && !defined (__ASSEMBLER__)
+#    if defined (__cplusplus)
+extern "C" {
+#    endif
 
 /* This list was generated against libc 2.15 ABI
  *
@@ -211,5 +214,8 @@ __asm__(".symver ns_name_ntop,ns_name_ntop GLIBC_DONT_USE_THIS_SYMBOL");
 __asm__(".symver ns_samename,ns_samename GLIBC_DONT_USE_THIS_SYMBOL");
 __asm__(".symver ns_get16,ns_get16 GLIBC_DONT_USE_THIS_SYMBOL");
 
-#  endif
+#    if defined (__cplusplus)
+}
+#    endif
+#  endif /* !defined (__OBJC__) && !defined (__ASSEMBLER__) */
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]