From 0175584887dd345be7a933eb8446a9883b29635c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20Kiiskil=C3=A4?= Date: Tue, 3 Oct 2017 16:19:29 +0300 Subject: [PATCH] Change ARM compiler options to use -O2 instead of -O3 Decrease optimisation level from 3 to 2. Reason being that we are seeing multiple compiler issues with level 3 and this is the workaround to get around those. We assume the impact on any performance/size will be non-visible to anyone. This is a workaround for IOTCLT-2038 / SingletonPtr corrupts. --- tools/profiles/develop.json | 4 ++-- tools/profiles/release.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/profiles/develop.json b/tools/profiles/develop.json index 6142485a5fa..a169d0d2adc 100644 --- a/tools/profiles/develop.json +++ b/tools/profiles/develop.json @@ -27,7 +27,7 @@ "ARM": { "common": ["-c", "--gnu", "-Otime", "--split_sections", "--apcs=interwork", "--brief_diagnostics", "--restrict", - "--multibyte_chars", "-O3"], + "--multibyte_chars", "-O2"], "asm": [], "c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"], "cxx": ["--cpp", "--no_rtti", "--no_vla"], @@ -36,7 +36,7 @@ "uARM": { "common": ["-c", "--gnu", "-Otime", "--split_sections", "--apcs=interwork", "--brief_diagnostics", "--restrict", - "--multibyte_chars", "-O3", "-D__MICROLIB", + "--multibyte_chars", "-O2", "-D__MICROLIB", "--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"], "asm": [], "c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"], diff --git a/tools/profiles/release.json b/tools/profiles/release.json index eedbce067f6..87a77c0e6d0 100644 --- a/tools/profiles/release.json +++ b/tools/profiles/release.json @@ -27,7 +27,7 @@ "ARM": { "common": ["-c", "--gnu", "-Ospace", "--split_sections", "--apcs=interwork", "--brief_diagnostics", "--restrict", - "--multibyte_chars", "-O3", "-DNDEBUG"], + "--multibyte_chars", "-O2", "-DNDEBUG"], "asm": [], "c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"], "cxx": ["--cpp", "--no_rtti", "--no_vla"], @@ -36,7 +36,7 @@ "uARM": { "common": ["-c", "--gnu", "-Ospace", "--split_sections", "--apcs=interwork", "--brief_diagnostics", "--restrict", - "--multibyte_chars", "-O3", "-D__MICROLIB", + "--multibyte_chars", "-O2", "-D__MICROLIB", "--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", "-DNDEBUG"], "asm": [], "c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],