upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / xrootd / repos / community-x86_64 / cxx17.patch
blob98532a40bac5dd53e886d000a4fd818bb19a9d6b
1 diff --color -aur xrootd-5.4.3-old/bindings/python/setup.py.in xrootd-5.4.3-new/bindings/python/setup.py.in
2 --- xrootd-5.4.3-old/bindings/python/setup.py.in 2022-06-13 16:17:49.244651243 +0300
3 +++ xrootd-5.4.3-new/bindings/python/setup.py.in 2022-06-13 16:19:50.844651430 +0300
4 @@ -24,15 +24,15 @@
5 # Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++.
6 cfg_vars = sysconfig.get_config_vars()
7 opt = cfg_vars["OPT"]
8 -cfg_vars["OPT"] = " ".join( flag for flag in opt.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++14"
9 +cfg_vars["OPT"] = " ".join( flag for flag in opt.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
11 cflags = cfg_vars["CFLAGS"]
12 -cfg_vars["CFLAGS"] = " ".join( flag for flag in cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++14"
13 +cfg_vars["CFLAGS"] = " ".join( flag for flag in cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
15 # pypy doesn't define PY_CFLAGS so skip it if it's missing
16 if "PY_CFLAGS" in cfg_vars:
17 py_cflags = cfg_vars["PY_CFLAGS"]
18 - cfg_vars["PY_CFLAGS"] = " ".join( flag for flag in py_cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++14"
19 + cfg_vars["PY_CFLAGS"] = " ".join( flag for flag in py_cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
21 ccl=cfg_vars["CC"].split()
22 ccl[0]="${CMAKE_C_COMPILER}"
23 diff --color -aur xrootd-5.4.3-old/cmake/XRootDOSDefs.cmake xrootd-5.4.3-new/cmake/XRootDOSDefs.cmake
24 --- xrootd-5.4.3-old/cmake/XRootDOSDefs.cmake 2022-06-13 16:17:49.247984576 +0300
25 +++ xrootd-5.4.3-new/cmake/XRootDOSDefs.cmake 2022-06-13 16:19:20.974651382 +0300
26 @@ -18,7 +18,7 @@
27 #-------------------------------------------------------------------------------
28 # Enable c++14
29 #-------------------------------------------------------------------------------
30 -set(CMAKE_CXX_STANDARD 14)
31 +set(CMAKE_CXX_STANDARD 17)
33 if( ENABLE_ASAN )
34 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
35 diff --color -aur xrootd-5.4.3-old/cmake/XRootDSystemCheck.cmake xrootd-5.4.3-new/cmake/XRootDSystemCheck.cmake
36 --- xrootd-5.4.3-old/cmake/XRootDSystemCheck.cmake 2022-06-13 16:17:49.247984576 +0300
37 +++ xrootd-5.4.3-new/cmake/XRootDSystemCheck.cmake 2022-06-13 16:22:48.487985058 +0300
38 @@ -144,7 +144,7 @@
39 #-------------------------------------------------------------------------------
40 function(check_working_cxx_atomics varname)
41 set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
42 - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11")
43 + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++17")
44 check_cxx_source_compiles("
45 #include <atomic>
46 #include <cstdint>
47 Only in xrootd-5.4.3-old: omg
48 diff --color -aur xrootd-5.4.3-old/src/XrdCeph/cmake/XRootDOSDefs.cmake xrootd-5.4.3-new/src/XrdCeph/cmake/XRootDOSDefs.cmake
49 --- xrootd-5.4.3-old/src/XrdCeph/cmake/XRootDOSDefs.cmake 2022-06-13 16:17:49.251317910 +0300
50 +++ xrootd-5.4.3-new/src/XrdCeph/cmake/XRootDOSDefs.cmake 2022-06-13 16:21:05.804651570 +0300
51 @@ -11,7 +11,7 @@
52 # GCC
53 #-------------------------------------------------------------------------------
54 if( CMAKE_COMPILER_IS_GNUCXX )
55 - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
56 + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" )
57 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror" )
58 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter" )
59 # gcc 4.1 is retarded
60 @@ -22,7 +22,7 @@
61 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing" )
62 endif()
64 - # for 4.9.3 or greater the 'omit-frame-pointer'
65 + # for 4.9.3 or greater the 'omit-frame-pointer'
66 # interfears with custom semaphore implementation
67 if( (GCC_VERSION VERSION_GREATER 4.9.2) AND (USE_LIBC_SEMAPHORE EQUAL 0) )
68 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer" )
69 diff --color -aur xrootd-5.4.3-old/src/XrdSsi/XrdSsiAtomics.hh xrootd-5.4.3-new/src/XrdSsi/XrdSsiAtomics.hh
70 --- xrootd-5.4.3-old/src/XrdSsi/XrdSsiAtomics.hh 2022-06-13 16:17:49.264651243 +0300
71 +++ xrootd-5.4.3-new/src/XrdSsi/XrdSsiAtomics.hh 2022-06-13 16:25:39.107985328 +0300
72 @@ -39,7 +39,7 @@
73 #if __cplusplus >= 201103L
74 #include <atomic>
75 #define Atomic(type) std::atomic<type>
76 -#define Atomic_IMP "C++11"
77 +#define Atomic_IMP "C++17"
78 #define Atomic_BEG(x)
79 #define Atomic_DEC(x) x.fetch_sub(1,std::memory_order_relaxed)
80 #define Atomic_GET(x) x.load(std::memory_order_relaxed)