Don't rely on __GXX_RTTI being defined with g++ < 4.3.
__GXX_RTTI is only defined since g++ 4.3.2 and so we can't rely on its absence as indicating the use of -fno-rtti switch with the older versions of the compiler, only do this for g++ 4.3+. Also define wxNO_RTTI from configure if --enable-no_rtti was used as we can't always detect it automatically. Closes #11955. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
3acf8a8d9b
commit
3017880eff
4
configure
vendored
4
configure
vendored
@ -42122,7 +42122,7 @@ fi
|
||||
|
||||
if test "$GCC" = "yes" ; then
|
||||
if test "$wxUSE_NO_RTTI" = "yes" ; then
|
||||
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-rtti"
|
||||
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -DwxNO_RTTI -fno-rtti"
|
||||
fi
|
||||
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
|
||||
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-exceptions"
|
||||
@ -47507,7 +47507,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <windows.h>
|
||||
#include <gdiplus.h>
|
||||
#include <gdiplus.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
@ -5408,7 +5408,10 @@ fi
|
||||
|
||||
if test "$GCC" = "yes" ; then
|
||||
if test "$wxUSE_NO_RTTI" = "yes" ; then
|
||||
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-rtti"
|
||||
dnl Define wxNO_RTTI on the command line because only g++ 4.3 and later
|
||||
dnl define __GXX_RTTI which allows us to detect the use of -fno-rtti
|
||||
dnl switch but we need to do it manually for the older versions.
|
||||
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -DwxNO_RTTI -fno-rtti"
|
||||
fi
|
||||
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
|
||||
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-exceptions"
|
||||
|
@ -837,7 +837,11 @@
|
||||
g++) or by editing project files with MSVC so test for it here too.
|
||||
*/
|
||||
#ifndef wxNO_RTTI
|
||||
# ifdef __GNUG__
|
||||
/*
|
||||
Only 4.3 defines __GXX_RTTI by default so its absence is not an
|
||||
indication of disabled RTTI with the previous versions.
|
||||
*/
|
||||
# if wxCHECK_GCC_VERSION(4, 3)
|
||||
# ifndef __GXX_RTTI
|
||||
# define wxNO_RTTI
|
||||
# endif
|
||||
|
Loading…
Reference in New Issue
Block a user