This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to enable exceptions when building C++ libraries


Hi Guys,

  I would like to submit the following patch for consideration.  It
adds the '-fexceptions' flag to the command line when building C++
libraries (in particular, libstdc++).  Although for most ports this
feature is enabled by default, I am now looking at a toolchain where
it is disabled by default (by setting '-fno-exceptions' in CC1_SPEC). 
Since libstdc++ will not build without exceptions being enabled, this
patch seems to be a reasonable solution.

Note - the disabling of exception handling by default was done in
response to a request from the user of the toolchain.  They do not
mind of libstdc++ builds or not, since they do not use it, but they
would like to be able to run 'make all' from the top level and have it
work.

Cheers
	Nick

1999-03-31  Nick Clifton  <nickc@cygnus.com>

	* Makefile.in (LIBCXXFLAGS): Add -fexceptions.
	(LIBCXXFLAGS_FOR_TARGET): Add -fexceptions.


Index: Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/Makefile.in,v
retrieving revision 1.38
diff -p -w -r1.38 Makefile.in
*** Makefile.in	1999/02/17 00:40:16	1.38
--- Makefile.in	1999/03/31 20:53:46
*************** CHILL_LIB = -lchill
*** 97,105 ****
  CXX = c++
  
  # Use -O2 to stress test the compiler.
! LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
  CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
! LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
  
  RANLIB = ranlib
  
--- 97,105 ----
  CXX = c++
  
  # Use -O2 to stress test the compiler.
! LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions
  CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
! LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions
  
  RANLIB = ranlib
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]