From 3658354a7de9615bdf03b49736fea3ec41cecd77 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Sat, 2 Jul 2016 13:48:45 +0200 Subject: [PATCH] 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 --- mkspecs/openbsd-g++/qmake.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf index e7ac523486c..42327599978 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 =