summaryrefslogtreecommitdiffstats
path: root/mkspecs/openbsd-g++
diff options
context:
space:
mode:
authorRalf Nolden <nolden@kde.org>2016-07-02 13:48:45 +0200
committerRalf Nolden <nolden@kde.org>2016-07-07 09:24:53 +0000
commit3658354a7de9615bdf03b49736fea3ec41cecd77 (patch)
tree47935d167d8638211dfd8bc511a34c1e3526f224 /mkspecs/openbsd-g++
parentabc29084fadf9c7d936fca55d02323090d9986cc (diff)
OpenBSD: redefine g++/gcc commands to eg++/egcc to use newer gcc 4.9
On OpenBSD, the system compiler shipped is still gcc 4.2.1 but for proper C++11 support in Qt, QtCreator and Qt-based projects we need to use the compilers provided in ports/packages which have the binaries renamed to eg++/egcc. Therefore, redefine the variables from g++-base.conf to use the newer compilers. Change-Id: Ic8ea1c5d2c2c0263dad5ae85c8c747bcd3985b7d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs/openbsd-g++')
-rw-r--r--mkspecs/openbsd-g++/qmake.conf15
1 files changed, 15 insertions, 0 deletions
diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf
index e7ac523486..4232759997 100644
--- a/mkspecs/openbsd-g++/qmake.conf
+++ b/mkspecs/openbsd-g++/qmake.conf
@@ -20,6 +20,21 @@ QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
+# System compiler is gcc 4.2.1 up to OpenBSD 6.0.
+# For proper C++11 support, we need to use a newer gcc from ports/packages,
+# where compiler commands are renamed to egcc/eg++. Therefore, redefine
+# mkspecs/common/g++-base.conf compiler commands
+QMAKE_CC = egcc
+
+QMAKE_LINK_C = $$QMAKE_CC
+QMAKE_LINK_C_SHLIB = $$QMAKE_CC
+
+QMAKE_CXX = eg++
+
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+
# Reset g++-unix.conf's NOUNDEF flags as OpenBSD libc can't handle environ
QMAKE_LFLAGS_NOUNDEF =