forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -29,6 +29,13 @@
|
|||||||
#include "stm32h7xx.h"
|
#include "stm32h7xx.h"
|
||||||
#include "Legacy/stm32_hal_legacy.h"
|
#include "Legacy/stm32_hal_legacy.h"
|
||||||
#include <stddef.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>
|
#include <math.h>
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
|||||||
Reference in New Issue
Block a user