diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index d34ec51e04..f6a15a01c6 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -34,6 +34,11 @@ replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0 CFLAGS="-DOPENSSL_NO_SSL3_METHOD" CXXFLAGS="-DOPENSSL_NO_SSL3_METHOD" +_gccver=$(gcc --version | awk '/^gcc \(GCC\)/ { print $3 }') +if [ "${_gccver%%.*}" -gt 5 ]; then + CXXFLAGS+=" -fno-delete-null-pointer-checks" +fi + if [ -n "$CROSS_BUILD" ]; then # Need some devel packages in the host to build qmake, moc, uic, rcc # wayland-devel contains /usr/bin/wayland-scanner