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>
This commit is contained in:
Ralf Nolden 2016-07-02 13:48:45 +02:00
parent abc29084fa
commit 3658354a7d

View File

@ -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 =