Build fixes: * enable RTTI by default when building with GCC to work around the tr1/functional error * link with -lrt * Tell chromium that it's always using wide wchar on Linux
authorBenjamin Smedberg <benjamin@smedbergs.us>
Tue, 30 Jun 2009 13:21:26 -0400
changeset 35739 f5675fec1a8d6998c5d753aad794b3e3e951a5f7
parent 35738 b44e0c08c4cf52b7a5a87049ef5e1565cb439f54
child 35740 7a4ca28274ab999c36df3d0ccc9944466d737e92
push id10694
push userbsmedberg@mozilla.com
push dateMon, 14 Dec 2009 15:23:10 +0000
treeherdermozilla-central@683dfdc4adf0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.2a1pre
Build fixes: * enable RTTI by default when building with GCC to work around the tr1/functional error * link with -lrt * Tell chromium that it's always using wide wchar on Linux
configure.in
ipc/chromium/chromium-config.mk
ipc/chromium/src/build/build_config.h
toolkit/library/libxul-config.mk
--- a/configure.in
+++ b/configure.in
@@ -7305,16 +7305,20 @@ if test "$ac_nscap_nonconst_opeq_bug" = 
     AC_DEFINE(NSCAP_DONT_PROVIDE_NONCONST_OPEQ)
 fi
 fi # SKIP_COMPILER_CHECKS
 
 dnl ========================================================
 dnl C++ rtti
 dnl Should be smarter and check that the compiler does indeed have rtti
 dnl ========================================================
+if test -n "$GNU_CC"; then
+    _MOZ_USE_RTTI=1
+fi
+
 MOZ_ARG_ENABLE_BOOL(cpp-rtti,
 [  --enable-cpp-rtti       Enable C++ RTTI ],
 [ _MOZ_USE_RTTI=1 ],
 [ _MOZ_USE_RTTI= ])
 
 if test "$_MOZ_USE_RTTI"; then
    _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_ON
 else
--- a/ipc/chromium/chromium-config.mk
+++ b/ipc/chromium/chromium-config.mk
@@ -104,12 +104,8 @@ DEFINES += \
 OS_CXXFLAGS := $(filter-out -pedantic,$(OS_CXXFLAGS))
 
 # TODO support !GTK
 OS_CXXFLAGS += $(MOZ_GTK2_CFLAGS)
 OS_CFLAGS += $(MOZ_GTK2_CFLAGS)
 
 endif # }
 endif # }
-
-ifdef OS_POSIX
-CXXFLAGS += $(MOZ_RTTI_FLAGS_ON)
-endif
--- a/ipc/chromium/src/build/build_config.h
+++ b/ipc/chromium/src/build/build_config.h
@@ -71,25 +71,13 @@
     (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
 #define WCHAR_T_IS_UTF32
 #else
 #error Please add support for your compiler in build/build_config.h
 #endif
 
 #else // CHROMIUM_MOZILLA_BUILD
 
-#if defined(OS_WIN)
-#define WCHAR_T_IS_UTF16
-#elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__)
-#if (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
 #define WCHAR_T_IS_UTF32
-#elif (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff)
-#define WCHAR_T_IS_UTF16
-#endif
-#endif
-
-#if !defined(WCHAR_T_IS_UTF16) && !defined(WCHAR_T_IS_UTF32)
-#error Please add support for your compiler in build/build_config.h
-#endif
 
 #endif // CHROMIUM_MOZILLA_BUILD
 
 #endif  // BUILD_BUILD_CONFIG_H_
--- a/toolkit/library/libxul-config.mk
+++ b/toolkit/library/libxul-config.mk
@@ -91,16 +91,18 @@ LOCAL_INCLUDES += -I$(topsrcdir)/widget/
 endif
 
 # dependent libraries
 ifdef MOZ_IPC
 STATIC_LIBS += \
   mozipc_s \
   chromium_s \
   $(NULL)
+
+OS_LIBS += -lrt
 endif
 
 STATIC_LIBS += \
 	xpcom_core \
 	ucvutil_s \
 	gkgfx \
 	gfxshared_s \
 	$(NULL)