How do I use -fexceptions?

Steven T. Hatton hattons at globalsymmetry.com
Fri May 21 13:48:09 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 21 May 2004 04:53 am, Alexander Dymo wrote:
> On Friday 21 May 2004 08:21, Steven T. Hatton wrote:
> > I've tried putting -fexceptions in the CXXFLAGS, the CFLAGS, the
> > CPPFLAGS, and the CXXCPP variables.  None of these worked.  I also tried
> > to compile with a different build of GCC (the 3.3.1 that shipped with
> > SuSE 9.0). Suggestions?
>
> Take a look at http://www.kdevelop.org/index.html?filename=3.0/faq.html

Hmmm.... So how does this relate to the field Project->Project 
Options->Configure Options->C++->Compiler flags (CXXFLAGS):? 

What I did to make things work was remove the parts of the acinclude.m4 and 
aclocal.m4 which looked like they were causing the problem. You can see the 
diffs below.  

I have to say this situation seems wrong.  Am I to understand the default of 
"-fno-exceptions" and "-fno-rtti" to be an autotools "feature"?  Can this be 
explained in terms that reasonable minds can understand?

Regards,
Steven


  diff acinclude.m4 acinclude.m4~
9633c9633
<   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti],
- ---
>   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti 
- -fno-exceptions],
9635,9636c9635,9636
<     [-fno-rtti ], [],
<     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, 
$1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti"])
- ---
>     [-fno-rtti -fno-exceptions], [],
>     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, 
$1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti 
- -fno-exceptions"])



diff aclocal.m4 aclocal.m4~
2964c2964,2970
<    
- ---
>     
>   if test "$GXX" = "yes"; then
>     KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS 
- -fno-exceptions"])
>     KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS 
- -fno-check-new"])
>     KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
>     KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], 
USE_EXCEPTIONS=     )
>   fi
9610c9616
<   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti],
- ---
>   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti 
- -fno-exceptions],
9612,9613c9618,9619
<     [-fno-rtti], [],
<     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, 
$1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti"])
- ---
>     [-fno-rtti -fno-exceptions], [],
>     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, 
$1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti 
- -fno-exceptions"])
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFArfqTwX61+IL0QsMRAnSUAKCNpWGGsWZcCTyffX+cRXAkWjw+eACeOw7t
2eRVccna3c3IysEBla1dPfo=
=CNj/
-----END PGP SIGNATURE-----

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list