-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Enable 64bit off_t on 32bit glibc systems
Pass -D_FILE_OFFSET_BITS=64 to compiler flags on 32bit glibc based systems. This will make sure that 64bit versions of LFS functions are used e.g. seek will behave same as lseek64. Also revert [1] partially because this added a cmake test to detect lseek64 but then forgot to pass the needed macro to actual compile, this test was incomplete too since libc implementations like musl has 64bit off_t by default on 32bit systems and does not bundle[2] -D_LARGEFILE64_SOURCE under -D_GNU_SOURCE like glibc, which means the compile now fails on musl because the cmake check passes but we do not have _LARGEFILE64_SOURCE defined. Using the *64 function was transitional anyways so use -D_FILE_OFFSET_BITS=64 instead [1] 8db7e5e [2] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D139752 (cherry picked from commit 5cd5543)
- Loading branch information
Showing
5 changed files
with
5 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters