mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Build: change libc compatibility code to only be used for new glibc
This way we can still use fast math functions.
This commit is contained in:
parent
cb2f5d498e
commit
abc040f26c
2 changed files with 10 additions and 1 deletions
|
|
@ -32,4 +32,6 @@ set(SRC
|
|||
set(LIB
|
||||
)
|
||||
|
||||
add_c_flag(-ffast-math)
|
||||
|
||||
blender_add_lib(bf_intern_libc_compat "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@
|
|||
* incompatible with the system libraries that Blender is built on. To solve
|
||||
* this we add a few -ffast-math symbols that can be missing. */
|
||||
|
||||
#include <math.h>
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# include <math.h>
|
||||
|
||||
# if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
|
||||
|
||||
double __exp_finite(double x);
|
||||
double __acos_finite(double x);
|
||||
|
|
@ -107,3 +111,6 @@ float __powf_finite(float x, float y)
|
|||
{
|
||||
return powf(x, y);
|
||||
}
|
||||
|
||||
# endif /* __GLIBC_PREREQ */
|
||||
#endif /* __linux__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue