aboutsummaryrefslogtreecommitdiff
path: root/libraries/libtfm/Makefile
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-09-07 18:17:12 -0400
committerPaul Selkirk <paul@psgd.org>2017-09-07 18:20:55 -0400
commit72227852729ed3125af58cff3f593340b3247fed (patch)
tree234d45ae587ce51bfbbce6d8c059a121a44bf1e6 /libraries/libtfm/Makefile
parent2e1f88062c7ec6cd12688ce7522e802bbf09bba1 (diff)
parent5ff8c9512db48d128cf07904f68eb5139bebf952 (diff)
Rebase branch 'profiling' from master
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 ceb8541..5be45f4 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