[llvm-branch-commits] [llvm-branch] r367526 - Merging r367304:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 1 01:47:45 PDT 2019


Author: hans
Date: Thu Aug  1 01:47:45 2019
New Revision: 367526

URL: http://llvm.org/viewvc/llvm-project?rev=367526&view=rev
Log:
Merging r367304:
------------------------------------------------------------------------
r367304 | ro | 2019-07-30 12:33:20 +0200 (Tue, 30 Jul 2019) | 10 lines

[CMake] Define _FILE_OFFSET_BITS=64 on Solaris

This is the compantion patch to https://reviews.llvm.org/D64482, needed to ensure
that builds with host compilers that don't yet predefine _FILE_OFFSET_BITS=64 on
Solaris succeed by always making the host and freshly built clang consistent.

Tested on x86_64-pc-solaris2.11.

Differential Revision: https://reviews.llvm.org/D64483

------------------------------------------------------------------------

Modified:
    llvm/branches/release_90/   (props changed)
    llvm/branches/release_90/CMakeLists.txt
    llvm/branches/release_90/cmake/config-ix.cmake

Propchange: llvm/branches/release_90/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug  1 01:47:45 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366481,366487,366527,366570,366925,367030,367062,367124,367215,367292,367314,367340-367341,367394,367396,367398
+/llvm/trunk:155241,366431,366481,366487,366527,366570,366925,367030,367062,367124,367215,367292,367304,367314,367340-367341,367394,367396,367398

Modified: llvm/branches/release_90/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/CMakeLists.txt?rev=367526&r1=367525&r2=367526&view=diff
==============================================================================
--- llvm/branches/release_90/CMakeLists.txt (original)
+++ llvm/branches/release_90/CMakeLists.txt Thu Aug  1 01:47:45 2019
@@ -831,6 +831,11 @@ if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHE
           add_definitions("-D_LARGE_FILE_API")
 endif()
 
+# Build with _FILE_OFFSET_BITS=64 on Solaris to match g++ >= 9.
+if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+          add_definitions("-D_FILE_OFFSET_BITS=64")
+endif()
+
 # Work around a broken bfd ld behavior. When linking a binary with a
 # foo.so library, it will try to find any library that foo.so uses and
 # check its symbols. This is wasteful (the check was done when foo.so

Modified: llvm/branches/release_90/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/cmake/config-ix.cmake?rev=367526&r1=367525&r2=367526&view=diff
==============================================================================
--- llvm/branches/release_90/cmake/config-ix.cmake (original)
+++ llvm/branches/release_90/cmake/config-ix.cmake Thu Aug  1 01:47:45 2019
@@ -30,6 +30,12 @@ if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHE
           list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_LARGE_FILE_API")
 endif()
 
+# Do checks with _FILE_OFFSET_BITS=64 on Solaris, because we will build
+# with those too.
+if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+          list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
+endif()
+
 # include checks
 check_include_file(dlfcn.h HAVE_DLFCN_H)
 check_include_file(errno.h HAVE_ERRNO_H)




More information about the llvm-branch-commits mailing list