Enabling exception and rtti support in uClibc++

Troy Davis gpf at dslinux.in-berlin.de
Mon Apr 7 21:53:23 CEST 2008



Working on a port that uses exceptions and rtti, If I enable it in uClibc++ and
then add -fno-rtti -fno-exceptions to the other current c++ projects , should
everything be ok? Here is my diff.

Index: lib/uClibc++/extra/Configs/dslinux_config
===================================================================
--- lib/uClibc++/extra/Configs/dslinux_config	(revision 2226)
+++ lib/uClibc++/extra/Configs/dslinux_config	(working copy)
@@ -46,7 +46,7 @@
 UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include"
 UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib"
 UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin"
-# UCLIBCXX_EXCEPTION_SUPPORT is not set
+UCLIBCXX_EXCEPTION_SUPPORT=y
 # IMPORT_LIBSUP is not set
 # IMPORT_LIBGCC_EH is not set
 BUILD_STATIC_LIB=y
Index: vendors/config/armnommu/config.arch
===================================================================
--- vendors/config/armnommu/config.arch	(revision 2226)
+++ vendors/config/armnommu/config.arch	(working copy)
@@ -199,7 +199,7 @@
 ifeq ($(UCLINUX_BUILD_SET),1)
 	EXTRA_CFLAGS := $(CPUFLAGS)

-	CXXFLAGS = $(CFLAGS) -fno-exceptions
+	CXXFLAGS = $(CFLAGS) #-fno-exceptions

 	# C++ headers, linked into the DSLINUX source tree
 	# use -I because the c++ dirs have to come before the other system dirs.
@@ -208,7 +208,7 @@
 		CXXFLAGS += -fno-builtin
 		CXXFLAGS += -nostdinc++
 		CXXFLAGS += -DGCC_HASCLASSVISIBILITY
-		CXXFLAGS += -fno-rtti
+		#CXXFLAGS += -fno-rtti
 		LIBGCC :=$(shell $(CXX) $(CXXFLAGS) -print-libgcc-file-name)
 		LIBGCC_DIR:=$(dir $(LIBGCC))
 		CXXLIBS	  =  $(CXXSUP)


More information about the dslinux-devel mailing list