From 927f26c3512bbf5e17701eba6fd1de5bc7c0effa Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Thu, 9 Jun 2016 11:33:51 +0200 Subject: BSD mkspec cleanup for FreeBSD, NetBSD and OpenBSD to common namespace BSD OS mkspecs share mainly the same configurations except very few differences. Merge into a common/bsd/bsd.conf file to be used across all BSD OSes in their respective qmake.conf and add a qplatformdefs.h that contain the common defines to be re-used in the BSD mkspecs. The change includes the usage of also on NetBSD through the common qplatformdefs.h, which is intended for using NetBSD's version defines. Change-Id: Ibb0ac9e4c8bb5aff7d0febdcab1a4b9600a61117 Reviewed-by: Thiago Macieira --- mkspecs/common/bsd/bsd.conf | 26 ++++++++++++ mkspecs/common/bsd/qplatformdefs.h | 79 +++++++++++++++++++++++++++++++++++ mkspecs/freebsd-clang/qmake.conf | 24 ++--------- mkspecs/freebsd-clang/qplatformdefs.h | 43 +------------------ mkspecs/freebsd-g++/qmake.conf | 24 ++--------- mkspecs/freebsd-g++/qplatformdefs.h | 7 +++- mkspecs/netbsd-g++/qmake.conf | 29 ++++--------- mkspecs/netbsd-g++/qplatformdefs.h | 41 +----------------- mkspecs/openbsd-g++/qmake.conf | 30 ++++--------- mkspecs/openbsd-g++/qplatformdefs.h | 42 +------------------ 10 files changed, 136 insertions(+), 209 deletions(-) create mode 100644 mkspecs/common/bsd/bsd.conf create mode 100644 mkspecs/common/bsd/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/common/bsd/bsd.conf b/mkspecs/common/bsd/bsd.conf new file mode 100644 index 0000000000..a56a8203dd --- /dev/null +++ b/mkspecs/common/bsd/bsd.conf @@ -0,0 +1,26 @@ +# +# common qmake configuration for *BSD +# + +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM += bsd + +include(../unix.conf) + +QMAKE_CFLAGS_THREAD = -pthread + +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD + +QMAKE_LFLAGS_THREAD = -pthread + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_EXECINFO = -lexecinfo +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = + +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_NM = nm -P +QMAKE_RANLIB = diff --git a/mkspecs/common/bsd/qplatformdefs.h b/mkspecs/common/bsd/qplatformdefs.h new file mode 100644 index 0000000000..123155816f --- /dev/null +++ b/mkspecs/common/bsd/qplatformdefs.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef Q_BSD_PLATFORMDEFS_H +#define Q_BSD_PLATFORMDEFS_H + +// Get Qt defines/settings + +#include "qglobal.h" + +// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs + +#include + + +// We are hot - unistd.h should have turned on the specific APIs we requested + + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef QT_NO_IPV6IFNAME +#include +#endif + +#include "../posix/qplatformdefs.h" + +#undef QT_OPEN_LARGEFILE +#define QT_OPEN_LARGEFILE 0 + +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf + +#endif // QPLATFORMDEFS_H diff --git a/mkspecs/freebsd-clang/qmake.conf b/mkspecs/freebsd-clang/qmake.conf index 0d6401f2f5..10bb4a3723 100644 --- a/mkspecs/freebsd-clang/qmake.conf +++ b/mkspecs/freebsd-clang/qmake.conf @@ -3,34 +3,16 @@ # MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = freebsd bsd +QMAKE_PLATFORM = freebsd -include(../common/unix.conf) +include(../common/bsd/bsd.conf) -QMAKE_CFLAGS_THREAD = -pthread - -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -# Addon software goes into /usr/local on the BSDs, by default we will look there +# Addon software goes into /usr/local on FreeBSD, by default we will look there QMAKE_INCDIR = /usr/local/include QMAKE_LIBDIR = /usr/local/lib QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined -QMAKE_LFLAGS_THREAD = -pthread - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_EXECINFO = -lexecinfo -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = include(../common/gcc-base-unix.conf) include(../common/clang.conf) - load(qt_config) diff --git a/mkspecs/freebsd-clang/qplatformdefs.h b/mkspecs/freebsd-clang/qplatformdefs.h index 3a39b79c41..f70b9c0fa3 100644 --- a/mkspecs/freebsd-clang/qplatformdefs.h +++ b/mkspecs/freebsd-clang/qplatformdefs.h @@ -34,47 +34,6 @@ #ifndef QPLATFORMDEFS_H #define QPLATFORMDEFS_H -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE - -#define QT_OPEN_LARGEFILE 0 - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf +#include "../common/bsd/qplatformdefs.h" #endif // QPLATFORMDEFS_H diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf index 56529389f6..1f4448889e 100644 --- a/mkspecs/freebsd-g++/qmake.conf +++ b/mkspecs/freebsd-g++/qmake.conf @@ -3,32 +3,14 @@ # MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = freebsd bsd +QMAKE_PLATFORM = freebsd -include(../common/unix.conf) +include(../common/bsd/bsd.conf) -QMAKE_CFLAGS_THREAD = -pthread - -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -# Addon software goes into /usr/local on the BSDs, by default we will look there +# Addon software goes into /usr/local on FreeBSD, by default we will look there QMAKE_INCDIR = /usr/local/include QMAKE_LIBDIR = /usr/local/lib -QMAKE_LFLAGS_THREAD = -pthread - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_EXECINFO = -lexecinfo -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) load(qt_config) diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h index aa51e08990..f70b9c0fa3 100644 --- a/mkspecs/freebsd-g++/qplatformdefs.h +++ b/mkspecs/freebsd-g++/qplatformdefs.h @@ -31,4 +31,9 @@ ** ****************************************************************************/ -#include "../freebsd-clang/qplatformdefs.h" +#ifndef QPLATFORMDEFS_H +#define QPLATFORMDEFS_H + +#include "../common/bsd/qplatformdefs.h" + +#endif // QPLATFORMDEFS_H diff --git a/mkspecs/netbsd-g++/qmake.conf b/mkspecs/netbsd-g++/qmake.conf index ddd82326af..31005d9134 100644 --- a/mkspecs/netbsd-g++/qmake.conf +++ b/mkspecs/netbsd-g++/qmake.conf @@ -3,35 +3,20 @@ # MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = netbsd bsd +QMAKE_PLATFORM = netbsd -include(../common/unix.conf) -include(../common/gcc-base-unix.conf) -include(../common/g++-unix.conf) - -QMAKE_CFLAGS_THREAD = -pthread - -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +include(../common/bsd/bsd.conf) +# Addon software goes into /usr/pkg on NetBSD, by default we will look there QMAKE_INCDIR = /usr/pkg/include QMAKE_LIBDIR = /usr/pkg/lib + +# System provided X11 defaults to X11R7 path on NetBSD since 5.0 QMAKE_INCDIR_X11 = /usr/X11R7/include QMAKE_LIBDIR_X11 = /usr/X11R7/lib QMAKE_INCDIR_OPENGL = /usr/X11R7/include QMAKE_LIBDIR_OPENGL = /usr/X11R7/lib -QMAKE_LFLAGS_THREAD = -pthread - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_EXECINFO = -lexecinfo -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) load(qt_config) diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h index bcba448e2c..f70b9c0fa3 100644 --- a/mkspecs/netbsd-g++/qplatformdefs.h +++ b/mkspecs/netbsd-g++/qplatformdefs.h @@ -34,45 +34,6 @@ #ifndef QPLATFORMDEFS_H #define QPLATFORMDEFS_H -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#define QT_OPEN_LARGEFILE 0 - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf +#include "../common/bsd/qplatformdefs.h" #endif // QPLATFORMDEFS_H diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf index 9b280891df..e7ac523486 100644 --- a/mkspecs/openbsd-g++/qmake.conf +++ b/mkspecs/openbsd-g++/qmake.conf @@ -3,36 +3,24 @@ # MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = openbsd bsd +QMAKE_PLATFORM = openbsd -include(../common/unix.conf) -include(../common/gcc-base-unix.conf) -include(../common/g++-unix.conf) - -QMAKE_CFLAGS_THREAD = -pthread - -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +include(../common/bsd/bsd.conf) +# Addon software goes into /usr/local on OpenBSD, by default we will look there QMAKE_INCDIR = /usr/local/include QMAKE_LIBDIR = /usr/local/lib + +# System provided X11 defaults to X11R6 path on OpenBSD QMAKE_INCDIR_X11 = /usr/X11R6/include QMAKE_LIBDIR_X11 = /usr/X11R6/lib QMAKE_INCDIR_OPENGL = /usr/X11R6/include QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib -QMAKE_LFLAGS_THREAD = -pthread -QMAKE_LFLAGS_NOUNDEF = - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_EXECINFO = -lexecinfo -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = +include(../common/gcc-base-unix.conf) +include(../common/g++-unix.conf) -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = +# Reset g++-unix.conf's NOUNDEF flags as OpenBSD libc can't handle environ +QMAKE_LFLAGS_NOUNDEF = load(qt_config) diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h index 5776654121..f70b9c0fa3 100644 --- a/mkspecs/openbsd-g++/qplatformdefs.h +++ b/mkspecs/openbsd-g++/qplatformdefs.h @@ -34,46 +34,6 @@ #ifndef QPLATFORMDEFS_H #define QPLATFORMDEFS_H -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#define QT_OPEN_LARGEFILE 0 - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf +#include "../common/bsd/qplatformdefs.h" #endif // QPLATFORMDEFS_H -- cgit v1.2.3 From 23d08dec0b80a4e15f92bf54ff2ead1dffe8329e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 19 May 2016 16:57:09 +0200 Subject: Add Mesa VC4 based RPi3 device spec The rpi3 spec added previously is only half of the story now that we have the option to use another GL driver. Change-Id: I1b1edde77bcc6d2f382f1021de9c594c27c34d6f Reviewed-by: Andy Nichols --- mkspecs/devices/linux-rpi3-vc4-g++/qmake.conf | 44 ++++++++++++++++++++++ mkspecs/devices/linux-rpi3-vc4-g++/qplatformdefs.h | 34 +++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 mkspecs/devices/linux-rpi3-vc4-g++/qmake.conf create mode 100644 mkspecs/devices/linux-rpi3-vc4-g++/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-rpi3-vc4-g++/qmake.conf b/mkspecs/devices/linux-rpi3-vc4-g++/qmake.conf new file mode 100644 index 0000000000..75b6ad7db5 --- /dev/null +++ b/mkspecs/devices/linux-rpi3-vc4-g++/qmake.conf @@ -0,0 +1,44 @@ +# qmake configuration for the Raspberry Pi 3 (32-bit) using the +# *experimental* VC4 driver for Mesa and DRM. +# +# This should allow accelerated EGL and OpenGL with eglfs via +# KMS/DRM/GBM (instead of the Broadcom-specific backend), under X11 +# with xcb, and also enables (Qt)Wayland via the standard wayland-egl +# path. See https://dri.freedesktop.org/wiki/VC4 +# +# Note that this is not the same as the default, Broadcom proprietary +# driver. Some functionality and extensions may therefore be missing, +# in particular when it comes to accelerated multimedia (video, +# camera). +# +# At the time of writing Raspbian has to be switched explicitly to the +# experimental VC4 driver. To do this, run raspi-config and enable it +# in Advanced Options -> GL Driver. +# +# Example configure command below. We disable using the GNU gold +# linker as it apparently has issues with ARMv8. In the configure +# output check that "EGLFS GBM .......... yes" is present, otherwise +# eglfs will not be functional. +# +# ./configure -release -opengl es2 -device linux-rpi3-vc4-g++ \ +# -device-option CROSS_COMPILE=~/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \ +# -sysroot ~/raspbian/sysroot \ +# -prefix /usr/local/qt5pi -extprefix ~/raspbian/qt5pi -hostprefix ~/raspbian/qt5 \ +# -v -nomake examples -nomake tests -no-use-gold-linker + +include(../common/linux_device_pre.conf) + +QMAKE_LIBS_EGL += -lEGL +QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL + +QMAKE_CFLAGS = -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS + +DISTRO_OPTS += hard-float +DISTRO_OPTS += deb-multi-arch + +EGLFS_DEVICE_INTEGRATION = eglfs_kms + +include(../common/linux_arm_device_post.conf) + +load(qt_config) diff --git a/mkspecs/devices/linux-rpi3-vc4-g++/qplatformdefs.h b/mkspecs/devices/linux-rpi3-vc4-g++/qplatformdefs.h new file mode 100644 index 0000000000..6fe3b52454 --- /dev/null +++ b/mkspecs/devices/linux-rpi3-vc4-g++/qplatformdefs.h @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../linux-g++/qplatformdefs.h" -- cgit v1.2.3 From 91bf773b18438d8808bc673703fa9d863ccb64f5 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 19 May 2016 18:09:56 +0200 Subject: Fix the RPi3 spec a bit So that it actually compiles with gcc-linaro-arm-linux-gnueabihf-raspbian. Remove also flags a device spec should not set (like -std and -O). Change-Id: Ib7a3bc298e60715410d5c00fbc22199ab4711fa7 Reviewed-by: Andy Nichols --- mkspecs/devices/linux-rpi3-g++/qmake.conf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-rpi3-g++/qmake.conf b/mkspecs/devices/linux-rpi3-g++/qmake.conf index 600d3e7dc1..a660577565 100644 --- a/mkspecs/devices/linux-rpi3-g++/qmake.conf +++ b/mkspecs/devices/linux-rpi3-g++/qmake.conf @@ -1,4 +1,4 @@ -# qmake configuration for the Raspberry Pi 3 +# qmake configuration for the Raspberry Pi 3 (32-bit) using the Broadcom graphics stack include(../common/linux_device_pre.conf) @@ -27,9 +27,8 @@ QMAKE_LIBS_OPENGL_ES2 = $${VC_LINK_LINE} -lGLESv2 # The official opt vc EGL references GLESv2 symbols: need to link it QMAKE_LIBS_EGL = $${VC_LINK_LINE} -lEGL -lGLESv2 -# We deliberately override the existing Qt CFLAGS as they might be problematic -QMAKE_CFLAGS = -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=c++1z +QMAKE_CFLAGS = -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS DISTRO_OPTS += hard-float DISTRO_OPTS += deb-multi-arch -- cgit v1.2.3 From 712e43784930ca2bc562833cfec53ddc462516e7 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Tue, 14 Jun 2016 13:58:13 +0200 Subject: Common bsd.conf: add strip command support Add the strip commands for installation commonly used also on BSD systems. Change-Id: I4113ffa559a737ef92afb7c90ab5e1bff902b1bb Reviewed-by: Oswald Buddenhagen --- mkspecs/common/bsd/bsd.conf | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/common/bsd/bsd.conf b/mkspecs/common/bsd/bsd.conf index a56a8203dd..5af6ba66b7 100644 --- a/mkspecs/common/bsd/bsd.conf +++ b/mkspecs/common/bsd/bsd.conf @@ -24,3 +24,6 @@ QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy QMAKE_NM = nm -P QMAKE_RANLIB = + +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded -- cgit v1.2.3 From 3e2bde35786f503c9031c34454b741a02426bb9a Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 10 Jun 2016 21:13:35 -0700 Subject: Update for the newest Darwin-family operating systems. - Adapt to the OS X => macOS rename in Q_OS_ macros/docs, qmake scopes, file selectors, etc. - Add new QSysInfo values and MAC_OS_X / __MAC_ / __IPHONE_ values for macOS 10.12 and iOS 9.1 through 10.0. - Update prettyProductName with new macOS "Sierra" codename. Change-Id: Id976530beeafa01b648ebaa16f4a8f0613fcaf75 Reviewed-by: Thiago Macieira --- mkspecs/common/macx.conf | 2 +- mkspecs/darwin-g++/qmake.conf | 2 +- mkspecs/features/spec_post.prf | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf index ad54612f22..69d731b48a 100644 --- a/mkspecs/common/macx.conf +++ b/mkspecs/common/macx.conf @@ -2,7 +2,7 @@ # qmake configuration for common OS X # -QMAKE_PLATFORM += osx macx +QMAKE_PLATFORM += macos osx macx QMAKE_MAC_SDK = macosx include(mac.conf) diff --git a/mkspecs/darwin-g++/qmake.conf b/mkspecs/darwin-g++/qmake.conf index 79f81a990f..09c55456ec 100644 --- a/mkspecs/darwin-g++/qmake.conf +++ b/mkspecs/darwin-g++/qmake.conf @@ -5,7 +5,7 @@ # MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = osx macx mac darwin +QMAKE_PLATFORM = macos osx macx mac darwin CONFIG += native_precompiled_headers DEFINES += __USE_WS_X11__ diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf index 4d398059b2..a09462639f 100644 --- a/mkspecs/features/spec_post.prf +++ b/mkspecs/features/spec_post.prf @@ -26,16 +26,16 @@ isEmpty(QMAKE_PLATFORM) { equals(TARGET_PLATFORM, unix): \ QMAKE_PLATFORM = unix else:equals(TARGET_PLATFORM, macx): \ - QMAKE_PLATFORM = osx macx mac darwin unix + QMAKE_PLATFORM = macos osx macx mac darwin unix else:equals(TARGET_PLATFORM, win32): \ QMAKE_PLATFORM = win32 else: \ error("Qmake spec sets an invalid TARGET_PLATFORM.") } -contains(QMAKE_PLATFORM, macx):!contains(QMAKE_PLATFORM, osx) { - warning("qmake spec specifies platform macx, but not osx.") - QMAKE_PLATFORM = osx $$QMAKE_PLATFORM +if(contains(QMAKE_PLATFORM, macx)|contains(QMAKE_PLATFORM, osx)):!contains(QMAKE_PLATFORM, macos) { + warning("qmake spec specifies platform macx or osx, but not macos.") + QMAKE_PLATFORM = macos $$QMAKE_PLATFORM } CONFIG += $$QMAKE_PLATFORM -- cgit v1.2.3 From 792947da7e366c30ce1ecf0a365de6cf113fc35e Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Wed, 15 Jun 2016 18:19:39 +0200 Subject: Common BSD: Add --gc-sections ld flags As common bsd's are using the -ffunction-sections flags from mkspecs/common/gcc-base.conf, also use the --gc-sections ld flags like Linux as all are using GNU ld as their linker and all are capable of using it. The last remaining problems with --gc-sections removing the .name sections providing the OS tags for distinction of the execution layer were solved with NetBSD 6.0 and OpenBSD 5.4, see http://gnats.netbsd.org/40401 and http://www.openbsd.org/plus54.html so this option can safely be used now to reduce the size of moc and rcc tools. Change-Id: I74ccd4f6bc607f6d82d32fc864875f26b26bf167 Reviewed-by: Thiago Macieira --- mkspecs/common/bsd/bsd.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'mkspecs') diff --git a/mkspecs/common/bsd/bsd.conf b/mkspecs/common/bsd/bsd.conf index 5af6ba66b7..390dfc58d2 100644 --- a/mkspecs/common/bsd/bsd.conf +++ b/mkspecs/common/bsd/bsd.conf @@ -12,6 +12,7 @@ QMAKE_CFLAGS_THREAD = -pthread QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_LFLAGS_THREAD = -pthread +QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections QMAKE_LIBS = QMAKE_LIBS_DYNLOAD = -- cgit v1.2.3 From 1e147f446a098bf17c27e744a22e535a9e21c061 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Wed, 15 Jun 2016 15:47:29 -0700 Subject: Add back osx compatibility check in QMAKE_PLATFORM. If macx is present, osx AND macos should be required. Change-Id: I5cd9d41270c741dc314720a1119b163dd17fdfd7 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/spec_post.prf | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf index a09462639f..234189fed1 100644 --- a/mkspecs/features/spec_post.prf +++ b/mkspecs/features/spec_post.prf @@ -33,9 +33,16 @@ isEmpty(QMAKE_PLATFORM) { error("Qmake spec sets an invalid TARGET_PLATFORM.") } -if(contains(QMAKE_PLATFORM, macx)|contains(QMAKE_PLATFORM, osx)):!contains(QMAKE_PLATFORM, macos) { - warning("qmake spec specifies platform macx or osx, but not macos.") - QMAKE_PLATFORM = macos $$QMAKE_PLATFORM +contains(QMAKE_PLATFORM, macx) { + !contains(QMAKE_PLATFORM, osx) { + warning("qmake spec specified platform macx, but not osx."); + QMAKE_PLATFORM = osx $$QMAKE_PLATFORM + } + + !contains(QMAKE_PLATFORM, macos) { + warning("qmake spec specifies platform macx, but not macos.") + QMAKE_PLATFORM = macos $$QMAKE_PLATFORM + } } CONFIG += $$QMAKE_PLATFORM -- cgit v1.2.3