From 3658354a7de9615bdf03b49736fea3ec41cecd77 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Sat, 2 Jul 2016 13:48:45 +0200 Subject: 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(+) (limited to 'mkspecs/openbsd-g++/qmake.conf') 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 = -- cgit v1.2.3 From d6177b55eaf2f6545af2e7b70def51940a1f3ab8 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Thu, 7 Jul 2016 13:35:35 +0200 Subject: OpenBSD: add X11R6/lib to QMAKE_RPATHDIR As OpenBSD ships its own X11, linker errors occur when not explicitly adding the X11R6/lib dir to rpath dirs. Change-Id: I75991e9d7de115d2d212a017d9c8f9aa93cecc27 Reviewed-by: Oswald Buddenhagen --- mkspecs/openbsd-g++/qmake.conf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkspecs/openbsd-g++/qmake.conf') diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf index 4232759997..6124d31439 100644 --- a/mkspecs/openbsd-g++/qmake.conf +++ b/mkspecs/openbsd-g++/qmake.conf @@ -17,6 +17,8 @@ QMAKE_LIBDIR_X11 = /usr/X11R6/lib QMAKE_INCDIR_OPENGL = /usr/X11R6/include QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_RPATHDIR += $$QMAKE_LIBDIR_X11 + include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) -- cgit v1.2.3