summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2019-12-30 00:17:24 +0100
committerMarek Szuba <marecki@gentoo.org>2019-12-30 00:17:47 +0100
commit77ec8e9ee23def7148efe1cc1c7c49c3f9b895b3 (patch)
treeea0ab96be585a8f0fe08d8cb98ca1c8234e4b9de /net-libs/xrootd
parentdev-util/meson: 0.52.1 bump (diff)
downloadgentoo-77ec8e9ee23def7148efe1cc1c7c49c3f9b895b3.tar.gz
gentoo-77ec8e9ee23def7148efe1cc1c7c49c3f9b895b3.tar.bz2
gentoo-77ec8e9ee23def7148efe1cc1c7c49c3f9b895b3.zip
net-libs/xrootd: do not set -Werror in normal builds
Backported to 4.8 and 4.9 from 4.10. Should allow these versions to build under gcc-9. Closes: https://bugs.gentoo.org/703412 Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'net-libs/xrootd')
-rw-r--r--net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch22
-rw-r--r--net-libs/xrootd/xrootd-4.8.3.ebuild5
-rw-r--r--net-libs/xrootd/xrootd-4.9.0.ebuild5
3 files changed, 30 insertions, 2 deletions
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
new file mode 100644
index 000000000000..2f0a64b13fd8
--- /dev/null
+++ b/net-libs/xrootd/files/xrootd-4.8.3-Werror_only_Debug.patch
@@ -0,0 +1,22 @@
+Only set -Werror - which among other things prevents xrootd-4.8.3 from being
+compiled with gcc-9 - either in debug mode or when explicitly requested.
+Backport of the change made upstream in 4.10.
+--- a/cmake/XRootDOSDefs.cmake
++++ b/cmake/XRootDOSDefs.cmake
+@@ -26,7 +26,15 @@
+ #-------------------------------------------------------------------------------
+ if( CMAKE_COMPILER_IS_GNUCXX )
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
+- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror" )
++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
++ #-----------------------------------------------------------------------------
++ # Set -Werror only for Debug (or undefined) build type or if we have been
++ # explicitly asked to do so
++ #-----------------------------------------------------------------------------
++ if( ( CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL ""
++ OR FORCE_WERROR ) )
++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" )
++ endif()
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter" )
+ # gcc 4.1 is retarded
+ execute_process( COMMAND ${CMAKE_C_COMPILER} -dumpversion
diff --git a/net-libs/xrootd/xrootd-4.8.3.ebuild b/net-libs/xrootd/xrootd-4.8.3.ebuild
index 90f82f05b9a5..df36a3d62137 100644
--- a/net-libs/xrootd/xrootd-4.8.3.ebuild
+++ b/net-libs/xrootd/xrootd-4.8.3.ebuild
@@ -42,7 +42,10 @@ REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
"
-PATCHES=( "${FILESDIR}"/${P}-crc32.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-crc32.patch
+ "${FILESDIR}"/${PN}-4.8.3-Werror_only_Debug.patch
+)
# xrootd plugins are not intended to be linked with,
# they are to be loaded at runtime by xrootd,
diff --git a/net-libs/xrootd/xrootd-4.9.0.ebuild b/net-libs/xrootd/xrootd-4.9.0.ebuild
index f42a32f1833b..55c0653ee3be 100644
--- a/net-libs/xrootd/xrootd-4.9.0.ebuild
+++ b/net-libs/xrootd/xrootd-4.9.0.ebuild
@@ -42,7 +42,10 @@ REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
"
-PATCHES=( "${FILESDIR}"/xrootd-4.8.3-crc32.patch )
+PATCHES=(
+ "${FILESDIR}"/xrootd-4.8.3-crc32.patch
+ "${FILESDIR}"/${PN}-4.8.3-Werror_only_Debug.patch
+)
# xrootd plugins are not intended to be linked with,
# they are to be loaded at runtime by xrootd,