From a43c3b456a9b0c341b05ac7bee07b863ebca3b7c Mon Sep 17 00:00:00 2001 From: Mikhail Svetkin Date: Mon, 19 Mar 2018 11:59:11 +0100 Subject: rtems: add mkspecs for new operation system RTEMS Change-Id: Idd01ccd69c296df1a67a90260fc4e5547acf3079 Reviewed-by: Volker Hilsheimer Reviewed-by: Ryan Chu --- mkspecs/common/rtems-base.conf | 73 ++++++++++++++++++++++++++++++++++++ mkspecs/common/rtems/qplatformdefs.h | 70 ++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 mkspecs/common/rtems-base.conf create mode 100644 mkspecs/common/rtems/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/common/rtems-base.conf b/mkspecs/common/rtems-base.conf new file mode 100644 index 0000000000..0a015c3173 --- /dev/null +++ b/mkspecs/common/rtems-base.conf @@ -0,0 +1,73 @@ +# +# Base qmake configuration for GCC on RTEMS +# +# +# +MAKEFILE_GENERATOR = UNIX + +QMAKE_PLATFORM = rtems + +include(unix.conf) +include(gcc-base-unix.conf) +include(g++-unix.conf) + +rtems_bsp = $$(RTEMS_BSP) +isEmpty(rtems_bsp) { + error("This qmakespec requires $RTEMS_BSP to be set") +} + +rtems_compiler = $$(RTEMS_COMPILER) +isEmpty(rtems_compiler) { + error("This qmakespec requires $RTEMS_COMPILER to be set") +} + +isEmpty(RTEMS_CPU_FLAGS) { + error("The qmakespec is expected to set \$\$RTEMS_CPU_FLAGS") +} + +RTEMS_FLAGS = \ + -B$$rtems_bsp \ + -specs bsp_specs \ + -qrtems \ + $$RTEMS_CPU_FLAGS + +QMAKE_CFLAGS_OPTIMIZE_FULL = $$QMAKE_CFLAGS_OPTIMIZE +QMAKE_CFLAGS_OPTIMIZE_DEBUG = -O0 -g + +QMAKE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_OPTIMIZE_DEBUG +QMAKE_CFLAGS_WARN_ON = -Wall +QMAKE_CFLAGS_PIC = +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = +QMAKE_CFLAGS_APP = +QMAKE_CFLAGS += $$RTEMS_FLAGS + +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_SHLIB = +QMAKE_CXXFLAGS_STATIC_LIB = +QMAKE_CXXFLAGS_APP = +QMAKE_CXXFLAGS += $$RTEMS_FLAGS + +QMAKE_CXXFLAGS_CXX11 = +QMAKE_CXXFLAGS_CXX14 = +QMAKE_CXXFLAGS_CXX1Z = + +QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections +QMAKE_LFLAGS += $$RTEMS_FLAGS $$QMAKE_LFLAGS_GCSECTIONS + +QMAKE_CC = $${rtems_compiler}-gcc +QMAKE_CXX = $${rtems_compiler}-g++ +QMAKE_AR = $${rtems_compiler}-ar cqs +QMAKE_OBJCOPY = $${rtems_compiler}-objcopy +QMAKE_NM = $${rtems_compiler}-nm -P +QMAKE_RANLIB = $${rtems_compiler}-ranlib +QMAKE_STRIP = $${rtems_compiler}-strip + +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = + +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = + +load(qt_config) diff --git a/mkspecs/common/rtems/qplatformdefs.h b/mkspecs/common/rtems/qplatformdefs.h new file mode 100644 index 0000000000..1baa7c7d74 --- /dev/null +++ b/mkspecs/common/rtems/qplatformdefs.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company. All rights reserved. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://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 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef Q_RTEMS_PLATFORMDEFS_H +#define Q_RTEMS_PLATFORMDEFS_H + +// Get Qt defines/settings + +#include "qglobal.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "../posix/qplatformdefs.h" + + +#ifdef __STRICT_ANSI__ +#undef __STRICT_ANSI__ +#endif + +#undef QT_OPEN_LARGEFILE +#define QT_OPEN_LARGEFILE 0 + +#endif // Q_RTEMS_PLATFORMDEFS_H -- cgit v1.2.3