Fix for cross compiling for android#291
Fix for cross compiling for android#291talregev wants to merge 1 commit intoalgebraic-solving:masterfrom
Conversation
| AC_FUNC_MALLOC | ||
| AC_FUNC_REALLOC | ||
| AC_CHECK_FUNCS([floor getdelim gettimeofday memmove memset pow sqrt strchr strstr strtol]) | ||
| AC_CHECK_FUNCS([floor getdelim gettimeofday memmove memset malloc realloc pow sqrt strchr strstr strtol]) |
There was a problem hiding this comment.
Note that this changes the meaning of the result macros. The change is valid if msolve only depends on the availability of the functions, not on being "compatible with the GNU C library" malloc/realloc at runtime.
There was a problem hiding this comment.
Do you have a better solution?
There was a problem hiding this comment.
msolve depends heavily on malloc/realloc, so this should not be a problem.
|
For the maintainers, This PR was approve as a patch in vcpkg. FYI. |
This is not thorough endorsement. vcpkg builds ports, but it doesn't run any tests. It doesn't answer if msolve actually depends on the specific runtime behavior checked by To be clear, I'm happy about removing configuration tests which depend on running executables on the target platform. It is a barrier for generic cross builds recipes. But you probably don't want to enable UB by dereferencing the result of |
|
@dg0yt Do you have any solution for cross compiling android? |
The general solution is to run the configuration check on the target machine (emulator), capture the result, and pass it into the cross build. For these autotools macros, it can probably be done by injecting ac_cv_func_malloc_0_nonnull etc. |
Fix for cross compiling for android