fix-gcc15.diff 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index 938d4983..9ce08362 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -1,7 +1,7 @@
  6. # Keystone Assembler Engine (www.keystone-engine.org)
  7. # By Nguyen Anh Quynh, 2016
  8. -cmake_minimum_required(VERSION 2.8.7)
  9. +cmake_minimum_required(VERSION 3.10.0)
  10. project(keystone)
  11. set(KEYSTONE_VERSION_MAJOR 0)
  12. @@ -15,23 +15,6 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  13. set(CMAKE_BUILD_TYPE "Debug")
  14. endif()
  15. -if (POLICY CMP0022)
  16. - cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
  17. -endif()
  18. -
  19. -if (POLICY CMP0051)
  20. - # CMake 3.1 and higher include generator expressions of the form
  21. - # $<TARGETLIB:obj> in the SOURCES property. These need to be
  22. - # stripped everywhere that access the SOURCES property, so we just
  23. - # defer to the OLD behavior of not including generator expressions
  24. - # in the output for now.
  25. - cmake_policy(SET CMP0051 OLD)
  26. -endif()
  27. -
  28. -if (POLICY CMP0063)
  29. - set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) # automatic when 3.3.2 is required
  30. -endif()
  31. -
  32. if (CMAKE_VERSION VERSION_LESS 3.1.20141117)
  33. set(cmake_3_2_USES_TERMINAL)
  34. else()
  35. diff --git a/kstool/CMakeLists.txt b/kstool/CMakeLists.txt
  36. index d28da481..25113821 100644
  37. --- a/kstool/CMakeLists.txt
  38. +++ b/kstool/CMakeLists.txt
  39. @@ -1,7 +1,7 @@
  40. # Kstool for Keystone assembler engine.
  41. # By Nguyen Anh Quynh, 2016
  42. -cmake_minimum_required(VERSION 2.8)
  43. +cmake_minimum_required(VERSION 3.10.0)
  44. project(kstool)
  45. diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
  46. index d926b082..518613a5 100644
  47. --- a/llvm/CMakeLists.txt
  48. +++ b/llvm/CMakeLists.txt
  49. @@ -1,6 +1,6 @@
  50. # See docs/CMake.html for instructions about how to build LLVM with CMake.
  51. -cmake_minimum_required(VERSION 2.8.7)
  52. +cmake_minimum_required(VERSION 3.10.0)
  53. set(LLVM_INSTALL_TOOLCHAIN_ONLY ON)
  54. @@ -9,19 +9,6 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  55. set(CMAKE_BUILD_TYPE "Debug")
  56. endif()
  57. -if(POLICY CMP0022)
  58. - cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
  59. -endif()
  60. -
  61. -if (POLICY CMP0051)
  62. - # CMake 3.1 and higher include generator expressions of the form
  63. - # $<TARGETLIB:obj> in the SOURCES property. These need to be
  64. - # stripped everywhere that access the SOURCES property, so we just
  65. - # defer to the OLD behavior of not including generator expressions
  66. - # in the output for now.
  67. - cmake_policy(SET CMP0051 OLD)
  68. -endif()
  69. -
  70. if(CMAKE_VERSION VERSION_LESS 3.1.20141117)
  71. set(cmake_3_2_USES_TERMINAL)
  72. else()
  73. diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
  74. index 3346de93..a2adf853 100644
  75. --- a/llvm/include/llvm/ADT/STLExtras.h
  76. +++ b/llvm/include/llvm/ADT/STLExtras.h
  77. @@ -21,6 +21,7 @@
  78. #include <algorithm> // for std::all_of
  79. #include <cassert>
  80. #include <cstddef> // for std::size_t
  81. +#include <cstdint>
  82. #include <cstdlib> // for qsort
  83. #include <functional>
  84. #include <iterator>