[Cc]ompiler[\s.]*:?\s+
/x;
next if $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex_full\s*$/o;
- # `moc-qt4`, contains '-I/usr/share/qt4/mkspecs/linux-g++' (or
- # similar for other architectures) which gets recognized as a
- # compiler line. Ignore it.
- next if $line =~ m{^/usr/bin/moc-qt4
+ # `moc-qt4`/`moc-qt5` contain '-I.../linux-g++' in their command
+ # line (or similar for other architectures) which gets recognized
+ # as a compiler line, but `moc-qt*` is only a preprocessor for Qt
+ # C++ files. No hardening flags are relevant during this step,
+ # thus ignore `moc-qt*` lines. The resulting files will be
+ # compiled in a separate step (and therefore checked).
+ next if $line =~ m{^\S+/bin/moc-qt[45]
\s.+\s
- -I/usr/share/qt4/mkspecs/[a-z]+-g\++(?:-64)?
+ -I\S+/mkspecs/[a-z]+-g\++(?:-64)?
\s}x;
# Ignore false positives when the line contains only CC=gcc but no
# other gcc command.
dpkg-buildpackage: source package test
-# Output by qt4 which should be ignored.
+# `moc-qt4`/`moc-qt5` are preprocessors and don't require any hardening flags.
/usr/bin/moc-qt4 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtDBus -I/include -I.. -I. -I. test.h -o moc_test.cpp
/usr/bin/moc-qt4 -DQT_NO_DEBUG_OUTPUT -DAPP_VERSION=1.1 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_DBUS_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/glibc-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtDBus -I/usr/include/qt4 -Ilocale -Ibuild/moc -o build/moc/moc_test.cpp
/usr/bin/moc-qt4 -DQT_NO_DEBUG_OUTPUT -DAPP_VERSION=1.1 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_DBUS_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtDBus -I/usr/include/qt4 -Ilocale -Ibuild/moc -o build/moc/moc_test.cpp
+
+# Tests for Debian bug #678616.
+
+/tmp/buildd/qt4-x11-4.8.3+dfsg/bin/moc-qt4 -DQT_OPENGL_SUPPORT -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_DECLARATIVE_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -DQT_SHARED -I../../mkspecs/linux-g++-64 -I. -I../../include/QtCore -I../../include/QtNetwork -I../../include/QtGui -I../../include/QtOpenGL -I../../include/QtXml -I../../include/QtSql -I../../include/QtDeclarative -I../../include -I../../include/QtHelp -I/usr/X11R6/include -I/usr/X11R6/include -I.moc/release-shared demoitemanimation.h -o .moc/release-shared/moc_demoitemanimation.cpp
+
+/tmp/buildd/qtbase-opensource-src-5.0.0~beta1/bin/moc-qt5 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++-64 -I. -I../../../../include -I../../../../include/QtWidgets -I../../../../include/QtGui -I../../../../include/QtCore -I.moc/release-shared norwegianwoodstyle.h -o .moc/release-shared/moc_norwegianwoodstyle.cpp
+/tmp/buildd/qtbase-opensource-src-5.0.0~beta1/bin/moc-qt5 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++-64 -I. -I../../../../include -I../../../../include/QtWidgets -I../../../../include/QtGui -I../../../../include/QtCore -I.moc/release-shared norwegianwoodstyle.h -o .moc/release-shared/moc_norwegianwoodstyle.cpp
+/tmp/buildd/qtbase-opensource-src-5.0.0~beta1/bin/moc-qt5 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++-64 -I. -I../../../../include -I../../../../include/QtWidgets -I../../../../include/QtGui -I../../../../include/QtCore -I.moc/release-shared norwegianwoodstyle.h -o .moc/release-shared/moc_norwegianwoodstyle.cpp