From: Stephan Kulow Date: Mon, 16 Nov 1998 13:21:02 +0000 (+0000) Subject: * ltconfig.in: extent no_builtin_flag to contain -fno-rtti and X-Git-Tag: start~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=791c05ea8215002401d266c5291d3ea90c2c601d;p=thirdparty%2Flibtool.git * ltconfig.in: extent no_builtin_flag to contain -fno-rtti and -fno-exceptions in case we compile with a gcc, that supports this options (egcs and gcc >= 2.8) --- diff --git a/ChangeLog b/ChangeLog index 597a90acd..1a7825025 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-11-16 Stephan Kulow + + * ltconfig.in: extent no_builtin_flag to contain -fno-rtti and + -fno-exceptions in case we compile with a gcc, that supports + this options (egcs and gcc >= 2.8) + 1998-11-16 Alexandre Oliva * ltmain.in (C_compiler): copy $CC before it is overwritten with diff --git a/ltconfig.in b/ltconfig.in index 30ab98043..11da3572b 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -570,7 +570,6 @@ no_builtin_flag= if test "$with_gcc" = yes; then wl='-Wl,' link_static_flag='-static' - no_builtin_flag=' -fno-builtin' case "$host_os" in aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) @@ -772,6 +771,42 @@ else need_locks=no fi +if test "$with_gcc" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" + echo "$progname:@LINENO@: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_rtti_exceptions=no + else + echo "$ac_t"yes 1>&6 + compiler_rtti_exceptions=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_rtti_exceptions=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* + + if test "$compiler_rtti_exceptions" = "yes"; then + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' + else + no_builtin_flag=' -fno-builtin' + fi + +fi + # Check for any special shared library compilation flags. if test -n "$special_shlib_compile_flags"; then echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2