From f1ab0ec1ffcd6c665c183b362a9695a133724e11 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Tue, 23 Oct 2012 12:12:53 +0000
Subject: [PATCH] - Changed default compiler flags to include -O2
---
CMakeLists.txt | 6 +++---
library/Makefile | 2 +-
programs/Makefile | 2 +-
tests/Makefile | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bae87e3bf9..2a25057b17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,9 +4,9 @@ project(POLARSSL C)
enable_testing()
if(CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wdeclaration-after-statement")
- set(CMAKE_C_FLAGS_DEBUG "-g -O0")
- set(CMAKE_C_FLAGS_COVERAGE "-g -O0 -fprofile-arcs -ftest-coverage -lgcov")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra -W -Wdeclaration-after-statement")
+ set(CMAKE_C_FLAGS_DEBUG "-g3 -O0")
+ set(CMAKE_C_FLAGS_COVERAGE "-g3 -O0 -fprofile-arcs -ftest-coverage -lgcov")
endif(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
diff --git a/library/Makefile b/library/Makefile
index cd25c51900..7983f7b531 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -5,7 +5,7 @@
# environment
#
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
-OFLAGS = -O
+OFLAGS = -O2
ifdef DEBUG
CFLAGS += -g3
diff --git a/programs/Makefile b/programs/Makefile
index adc66ce555..9b0d1f531b 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -4,7 +4,7 @@
# To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
-OFLAGS = -O
+OFLAGS = -O2
LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS)
ifdef DEBUG
diff --git a/tests/Makefile b/tests/Makefile
index 2ebb9f5766..4c97aa5d36 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -6,7 +6,7 @@
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement \
-Wno-unused-function -Wno-unused-value
-OFLAGS = -O
+OFLAGS = -O2
LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS)
ifdef DEBUG