aboutsummaryrefslogtreecommitdiff
path: root/libraries/libtfm/Makefile
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2018-04-06 16:14:43 -0400
committerPaul Selkirk <paul@psgd.org>2018-04-06 22:34:05 -0400
commit6c7bd80b4e7bc5af1659b14b7fb0038f3dc53989 (patch)
treea10451c611dcf9f7d31a019c6bbc2e81fc8cd9ac /libraries/libtfm/Makefile
parentb35b87ea14016760786319a23b87792f1e1041de (diff)
parentf508e24f5b872a8f7d642eb4fb2217dd1497de96 (diff)
Merge branch 'profiling'
Diffstat (limited to 'libraries/libtfm/Makefile')
-rw-r--r--libraries/libtfm/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/libraries/libtfm/Makefile b/libraries/libtfm/Makefile
index 57c76a5..b50421c 100644
--- a/libraries/libtfm/Makefile
+++ b/libraries/libtfm/Makefile
@@ -30,7 +30,12 @@ LIB := tomsfastmath/libtfm.a
# for now, at least until we confirm that it hasn't already been fixed
# in a newer version of libtfm.
+ifdef DO_PROFILING
+# arm-none-eabi-gcc: error: -pg and -fomit-frame-pointer are incompatible
+STM32_LIBTFM_CFLAGS_OPTIMIZATION := -O3 -funroll-loops
+else
STM32_LIBTFM_CFLAGS_OPTIMIZATION := -O3 -funroll-loops -fomit-frame-pointer
+endif
CFLAGS := $(subst ${STM32_CFLAGS_OPTIMIZATION},${STM32_LIBTFM_CFLAGS_OPTIMIZATION},${CFLAGS})
CFLAGS += -DTFM_ARM -Dasm=__asm__ -Wa,-mimplicit-it=thumb