summaryrefslogtreecommitdiff
path: root/x11/qt4-tools/hacks.mk
diff options
context:
space:
mode:
authorapb <apb@pkgsrc.org>2012-09-25 08:07:31 +0000
committerapb <apb@pkgsrc.org>2012-09-25 08:07:31 +0000
commit26f2933485b510af7c8cbd398fb452672bf2e3cd (patch)
tree22024ea2a694f7ec8be455757ebb2fab12b54435 /x11/qt4-tools/hacks.mk
parent928183fbe157050fb7cdfe3c4f802b3027420fa1 (diff)
downloadpkgsrc-26f2933485b510af7c8cbd398fb452672bf2e3cd.tar.gz
qt4-tools needs the same workaround as qt4-libs for the compiler bug
in PR 46978. When building on NetBSD/i386 with gcc-4.5.*, use -O1 instead of -O2 for C++ files in the src/gui subdirectory.
Diffstat (limited to 'x11/qt4-tools/hacks.mk')
-rw-r--r--x11/qt4-tools/hacks.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/x11/qt4-tools/hacks.mk b/x11/qt4-tools/hacks.mk
new file mode 100644
index 00000000000..de2cf62bb13
--- /dev/null
+++ b/x11/qt4-tools/hacks.mk
@@ -0,0 +1,17 @@
+# $NetBSD: hacks.mk,v 1.1 2012/09/25 08:07:31 apb Exp $
+
+### [Sat Sep 22 11:21:06 UTC 2012 : apb]
+### g++-4.5.3 and 4.5.4 on NetBSD/i386 fails with an internal compiler error
+### when building gui/painting/qdrawhelper_mmx.cpp.
+### Building with -O1 instead of -O2 seems to work around the problem.
+.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386"
+. include "../../mk/compiler.mk"
+. if !empty(CC_VERSION:Mgcc-4.5.*)
+PKG_HACKS+= pr46978
+SUBST_CLASSES+= pr46978
+SUBST_STAGE.pr46978= post-configure
+SUBST_MESSAGE.pr46978= Working around optimizer bug (NetBSD PR 46978)
+SUBST_FILES.pr46978= src/gui/Makefile
+SUBST_SED.pr46978= -e '/^CXXFLAGS/s/-O2/-O1/'
+. endif
+.endif