[CMAKE] Propagate the LFS support flags to the libraries
Summary:
The add_<compiler|linker>_flags() and add_compile_*() functions set
directory level properties and apply to all the targets created after
the call. The LFS (Large File Support) flags are set after the libraries
are included, and as such are not applied. This causes an issue with
leveldb when running with qemu for ARM (cannot reproduce on a real ARM
target).
While at it, replace the add_compile_flags() with a more appropriated
add_compile_definitions() to set -D_FILE_OFFSET_BITS=64.
Test Plan:
ninja check cmake -GNinja .. \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/LinuxARM.cmake \ ninja test_bitcoin qemu-arm-static -L /usr/arm-linux-gnueabihf src/test/test_bitcoin -t
dbwrapper_tests
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5881