summaryrefslogtreecommitdiffstats
path: root/bsps/arm
diff options
context:
space:
mode:
authorKarel Gardas <karel@functional.vision>2023-07-19 19:04:13 +0200
committerKarel Gardas <karel@functional.vision>2023-07-31 15:15:09 +0200
commit7f3dc31336765cc46e78b7b361c548e3bbe4c51c (patch)
tree96bf8691d03c4293eb3a53602258fd12ec1a3ebe /bsps/arm
parentbsps/stm32h7: disable ETH_UpdateDescriptor as unused function (diff)
downloadrtems-7f3dc31336765cc46e78b7b361c548e3bbe4c51c.tar.bz2
bsps/stm32h7: workaround compilation issue with libbsd
Part of the new HAL requires float_t type definition. For that it includes math.h header file which unfortunately brings a lot of math functions in. One of them, 'log' conflicts with FreeBSD log function defined in systm.h Provided hack is really just a crude work around this issue. Never thought that Motorola 68881 would help me even in 21st century.
Diffstat (limited to 'bsps/arm')
-rw-r--r--bsps/arm/stm32h7/include/stm32h7xx_hal_def.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_def.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_def.h
index 188e31cefb..7317b5ed5d 100644
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_def.h
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_def.h
@@ -29,6 +29,13 @@
#include "stm32h7xx.h"
#include "Legacy/stm32_hal_legacy.h"
#include <stddef.h>
+#ifdef __rtems__
+/* this is to avoid definition of log function which conflicts with
+ * freebsd's systm.h log function. Whole theatre just to make sure
+ * we do have float_t available (defined in math.h) which is later
+ * used in HAL */
+#define __math_68881 1
+#endif /* __rtems__ */
#include <math.h>
/* Exported types ------------------------------------------------------------*/