From ec74914a2f98a5cff231a2540576d00cd2366cf2 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 1 Feb 2000 09:51:19 +0000 Subject: [PATCH] Add -fstrict-aliasing to the flags in optimized mode. git-svn-id: https://svn.dealii.org/trunk@2301 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/common/Make.global_options.in | 11 +++++++++++ 1 file changed, 11 insertions(+) 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, -- 2.39.5