This is attempting to build one of the tools used to build chdk modules, so it is problem with your host compiler settings rather than the ARM toolchain.
A quick google suggests that malloc.h isn't a standard include on OSX
https://www.google.com/search?q=malloc.h+osxYou can try just commenting out the #include <malloc.h> lines in the affected files
edit:
In changesets 2596 (trunk) / 2597 (release-1_1) I've removed the references to malloc.h. malloc() is defined in stdlib.h, malloc.h should only be needed for some other less standard functions that we don't use.