Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=cf937387642fc527e7abe5f7024102a4d24530cf

commit cf937387642fc527e7abe5f7024102a4d24530cf
Author: crazy <[email protected]>
Date:   Sun Sep 4 11:38:45 2016 +0200

kf5 prepare for gcc6
* added an check for gcc version and append
* -fno-delete-null-pointer-check when gcc6 is found

diff --git a/source/include/kf5.sh b/source/include/kf5.sh
index 7f1fc8c..f324abd 100644
--- a/source/include/kf5.sh
+++ b/source/include/kf5.sh
@@ -186,6 +186,16 @@ if [ "$_F_kde_name" != 'extra-cmake-modules' ]; then
makedepends+=('extra-cmake-modules' 'qt5-tools')
fi

+## From gcc6 docs
+## Value range propagation now assumes that the this pointer of C++ member 
functions is non-null. This eliminates common
+## null pointer checks but also breaks some non-conforming code-bases (such as 
Qt-5, Chromium, KDevelop). As a temporary
+## work-around -fno-delete-null-pointer-checks can be used. Wrong code can be 
identified by using -fsanitize=undefined.
+
+_F_KDE_GCC_VER=$(gcc --version | head -n1 | cut -d" " -f4)
+
+case "$_F_KDE_GCC_VER" in
+6.*) _F_KDE_CXX_FLAGS+=" -fno-delete-null-pointer-checks";;
+esac

case "$_F_cmake_type" in
None)   _F_KDE_CXX_FLAGS+=" -DNDEBUG -DQT_NO_DEBUG";;
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to