1 |
commit: 77ec8e9ee23def7148efe1cc1c7c49c3f9b895b3 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 29 23:17:24 2019 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 29 23:17:47 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77ec8e9e |
7 |
|
8 |
net-libs/xrootd: do not set -Werror in normal builds |
9 |
|
10 |
Backported to 4.8 and 4.9 from 4.10. Should allow these versions to |
11 |
build under gcc-9. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/703412 |
14 |
Package-Manager: Portage-2.3.79, Repoman-2.3.16 |
15 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
16 |
|
17 |
.../files/xrootd-4.8.3-Werror_only_Debug.patch | 22 ++++++++++++++++++++++ |
18 |
net-libs/xrootd/xrootd-4.8.3.ebuild | 5 ++++- |
19 |
net-libs/xrootd/xrootd-4.9.0.ebuild | 5 ++++- |
20 |
3 files changed, 30 insertions(+), 2 deletions(-) |
21 |
|
22 |
diff --git a/net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch b/net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..2f0a64b13fd |
25 |
--- /dev/null |
26 |
+++ b/net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch |
27 |
@@ -0,0 +1,22 @@ |
28 |
+Only set -Werror - which among other things prevents xrootd-4.8.3 from being |
29 |
+compiled with gcc-9 - either in debug mode or when explicitly requested. |
30 |
+Backport of the change made upstream in 4.10. |
31 |
+--- a/cmake/XRootDOSDefs.cmake |
32 |
++++ b/cmake/XRootDOSDefs.cmake |
33 |
+@@ -26,7 +26,15 @@ |
34 |
+ #------------------------------------------------------------------------------- |
35 |
+ if( CMAKE_COMPILER_IS_GNUCXX ) |
36 |
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" ) |
37 |
+- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror" ) |
38 |
++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" ) |
39 |
++ #----------------------------------------------------------------------------- |
40 |
++ # Set -Werror only for Debug (or undefined) build type or if we have been |
41 |
++ # explicitly asked to do so |
42 |
++ #----------------------------------------------------------------------------- |
43 |
++ if( ( CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "" |
44 |
++ OR FORCE_WERROR ) ) |
45 |
++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" ) |
46 |
++ endif() |
47 |
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter" ) |
48 |
+ # gcc 4.1 is retarded |
49 |
+ execute_process( COMMAND ${CMAKE_C_COMPILER} -dumpversion |
50 |
|
51 |
diff --git a/net-libs/xrootd/xrootd-4.8.3.ebuild b/net-libs/xrootd/xrootd-4.8.3.ebuild |
52 |
index 90f82f05b9a..df36a3d6213 100644 |
53 |
--- a/net-libs/xrootd/xrootd-4.8.3.ebuild |
54 |
+++ b/net-libs/xrootd/xrootd-4.8.3.ebuild |
55 |
@@ -42,7 +42,10 @@ REQUIRED_USE=" |
56 |
python? ( ${PYTHON_REQUIRED_USE} ) |
57 |
" |
58 |
|
59 |
-PATCHES=( "${FILESDIR}"/${P}-crc32.patch ) |
60 |
+PATCHES=( |
61 |
+ "${FILESDIR}"/${P}-crc32.patch |
62 |
+ "${FILESDIR}"/${PN}-4.8.3-Werror_only_Debug.patch |
63 |
+) |
64 |
|
65 |
# xrootd plugins are not intended to be linked with, |
66 |
# they are to be loaded at runtime by xrootd, |
67 |
|
68 |
diff --git a/net-libs/xrootd/xrootd-4.9.0.ebuild b/net-libs/xrootd/xrootd-4.9.0.ebuild |
69 |
index f42a32f1833..55c0653ee3b 100644 |
70 |
--- a/net-libs/xrootd/xrootd-4.9.0.ebuild |
71 |
+++ b/net-libs/xrootd/xrootd-4.9.0.ebuild |
72 |
@@ -42,7 +42,10 @@ REQUIRED_USE=" |
73 |
python? ( ${PYTHON_REQUIRED_USE} ) |
74 |
" |
75 |
|
76 |
-PATCHES=( "${FILESDIR}"/xrootd-4.8.3-crc32.patch ) |
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}"/xrootd-4.8.3-crc32.patch |
79 |
+ "${FILESDIR}"/${PN}-4.8.3-Werror_only_Debug.patch |
80 |
+) |
81 |
|
82 |
# xrootd plugins are not intended to be linked with, |
83 |
# they are to be loaded at runtime by xrootd, |