Merge pull request #87704 from veprbl/pr/cmake_32bit_workaround

pkgsi686Linux.cmake: compile with _FILE_OFFSET_BITS=64 for 32-bit targets
This commit is contained in:
Thomas Tuegel 2020-05-19 06:13:58 -05:00 committed by GitHub
commit 694d80b170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,6 +71,11 @@ stdenv.mkDerivation rec {
"--docdir=share/doc/${pname}${version}"
] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
++ lib.optional (useQt4 || withQt5) "--qt-gui"
# Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568
++ lib.optionals stdenv.hostPlatform.is32bit [
"CFLAGS=-D_FILE_OFFSET_BITS=64"
"CXXFLAGS=-D_FILE_OFFSET_BITS=64"
]
++ [
"--"
# We should set the proper `CMAKE_SYSTEM_NAME`.