-mmacosx-version-min & C++ ABI

Andrew Pinski pinskia@physics.uc.edu
Fri Feb 24 21:45:00 GMT 2006


> 
> 
> This patch makes the Darwin -mmacosx-version-min flag correctly choose
> various aspects of the C++ ABI.  It's mostly self-explanatory although
> more complicated than you'd expect because of the way that the C++ ABI
> is a property of the G++ frontend, not the middle-end.
> -fuse-cxa-atexit is not switched on by default yet because although
> the 10.4 libSystem contains __cxa_atexit, the linker doesn't define
> __dso_handle yet.
> 
> Bootstrapped (except that libssp doesn't bootstrap for me due to a
> ld64 problem) & tested on powerpc-darwin.
> 
> -- 
>  /* Nonzero to use __cxa_atexit, rather than atexit, to register
> -   destructors for local statics and global objects.  */
> +   destructors for local statics and global objects.  '2' means it has been
> +   set nonzero as a default, not by a command-line flag.  */
>  
>  int flag_use_cxa_atexit = DEFAULT_USE_CXA_ATEXIT;
>  
> +/* Nonzero to use __cxa_get_exception_ptr in C++ exception-handling
> +   code.  '2' means it has not been set explicitly on the command line.  */
> +
> +int flag_use_cxa_get_exception_ptr = 2;
> +

Why 2 and not -1 like all the rest of the flags?

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list