Hello all. I've been working on getting DynamoRIO to build for 32-bit ARM-based Android platforms. I've tried a few different cross-compile toolchains and took the Android NDK ndk-build system through its paces. ndk-build doesn't give me enough control over the compile flags, though, so I used the Android NDK toolchain (and I tried one of the Linaro ARM cross compilers, too) with regular makefiles to get DynamoRIO building with the abbreviated/missing headers included in the Android NDK. Now, I am integrating that back into the original cmake build system.
I am passing a custom toolchain file into cmake and using the Unix Makefiles generator. In my toolchain file, I specify a variety of flags for cmake to use:
SET(MAKE_C_FLAGS "${CMAKE_C_FLAGS} -DANDROID -mhard-float -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a8 -fsigned-char --sysroot=${CMAKE_FIND_ROOT_PATH} -Wl,--fix-cortex-a8" CACHE STRING "" FORCE)
My problem is that these standard defines are wiped clean in cmake/DynamoRIOConfig.cmake. I really don't want to hack on DynamoRIOConfig.cmake to add in the additional Android logic if I can help it. Is there a "back door" set of variables that is already there that I can use to pass my custom CMAKE_C_FLAGS and CMAKE_EXE_LINKER_FLAGS info into the final CMAKE_*_FLAGS variables that cmake uses to construct the make files?
Andrew