summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMikhail Svetkin <mikhail.svetkin@qt.io>2018-03-19 11:59:11 +0100
committerMikhail Svetkin <mikhail.svetkin@qt.io>2019-05-06 06:56:33 +0000
commita43c3b456a9b0c341b05ac7bee07b863ebca3b7c (patch)
tree84ae345f88a03f948bb66fda49082c89cc858f22 /mkspecs
parent298ab596a1e1fb147fde6d3c0d6c859d1e045781 (diff)
rtems: add mkspecs for new operation system RTEMS
Change-Id: Idd01ccd69c296df1a67a90260fc4e5547acf3079 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/rtems-base.conf73
-rw-r--r--mkspecs/common/rtems/qplatformdefs.h70
2 files changed, 143 insertions, 0 deletions
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 <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/select.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+
+#include <pwd.h>
+#include <grp.h>
+
+#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