From: Wolfgang Bangerth Date: Tue, 1 Feb 2000 09:51:19 +0000 (+0000) Subject: Add -fstrict-aliasing to the flags in optimized mode. X-Git-Tag: v8.0.0~21059 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec74914a2f98a5cff231a2540576d00cd2366cf2;p=dealii.git Add -fstrict-aliasing to the flags in optimized mode. git-svn-id: https://svn.dealii.org/trunk@2301 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index 3e3b9fba49..efd0700a7c 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -112,6 +112,17 @@ ifneq ($(OS),Linux) endif + +# after egcs1.1, the optimization flag -fstrict-aliasing was +# introduced, which enables better optimizations for well-written C++ +# code. we believe that deal.II falls into that category and thusly +# enable the flag +ifneq ($(GXX-Version),egcs1.1) + CXXFLAGS.o += -fstrict-aliasing +endif + + + # if --enable-multithreading was given, then set the compiler flags # accordingly. note that this only sets the flags to generate programs # which use thread-safe allocation functions, include the right files,