summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2016-02-24 22:14:07 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2016-05-02 22:20:11 +0000
commit2f90f27bd8f621f0f0d69c407bdd4c6b2af567c8 (patch)
treee4c468975b3bd5890348968b6ce52446f705b857
parentb0307054b25007cd5490a582b47079f47929315e (diff)
Add mkspecs for the PNaCl-native compilers
These are the native code producing compilers in the PNaCl toolchain. Create mkspec naming scheme extending pnacl-newlib-clang: pnacl-newlib-clang-x86_32 pnacl-newlib-clang-x86_64 pnacl-newlib-clang-arm Update nacl-configure to accept a pnacl variant ./nacl-configure mac_pnacl release x86_64 README.md: Bump required and tested SDK version to pepper_47. Change build instructions to mention nacl-x86_64 instead of x86_newlib. Change-Id: I9854041778b71660b0d9d68396f772dd7b9e4c4b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
-rw-r--r--README.md23
-rw-r--r--mkspecs/unsupported/pnacl-newlib-clang-arm/qmake.conf21
-rw-r--r--mkspecs/unsupported/pnacl-newlib-clang-arm/qplatformdefs.h49
-rw-r--r--mkspecs/unsupported/pnacl-newlib-clang-x86_32/qmake.conf21
-rw-r--r--mkspecs/unsupported/pnacl-newlib-clang-x86_32/qplatformdefs.h49
-rw-r--r--mkspecs/unsupported/pnacl-newlib-clang-x86_64/qmake.conf21
-rw-r--r--mkspecs/unsupported/pnacl-newlib-clang-x86_64/qplatformdefs.h49
-rwxr-xr-xnacl-configure35
8 files changed, 255 insertions, 13 deletions
diff --git a/README.md b/README.md
index c6d4a1b5bd..0dbcf8788b 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ below) as a starting point.
branch : nacl-5.6 (github)
qtdeclarative:
patch: https://codereview.qt-project.org/#/c/114670/
- dev: pepper_44
+ dev: pepper_47
qtbase
branch: nacl-dev (github), wip/nacl (codereview)
qtdeclarative:
@@ -45,11 +45,11 @@ below) as a starting point.
The Native Client SDK provides several toolchains. Qt provides a script for
configuring to use one of them:
- qtbase/nacl-configure <toolchain> <release|debug> [32|64]
+ qtbase/nacl-configure <toolchain> <release|debug> [variant]
The script expects a standard Qt module checkout. Example nacl-configure usage:
- /path/to/qt/qtbase/nacl-configure mac_x86_newlib release 64
+ /path/to/qt/qtbase/nacl-configure mac_pnacl release x86_64
Available toolchains include:
@@ -58,6 +58,12 @@ Available toolchains include:
mac_x86_newlib
mac_arm_newlib
+The pnacl toolchain has variants that generate native (NaCl) code directly:
+
+ x86_64
+ x86_32
+ arm
+
Linux systems have corresponding "linux_"-prefixed toolchains. Windows is not
supported as a host platform.
@@ -66,11 +72,11 @@ The glibc toolchain(s) and shared library builds are not currently supported.
Which toolchain should I use?
* pnacl is the "deployment" toolchain which produces .pexes which runs in most
Chrome Chrome browser (Android and iOS Chrome are not supported)
-* x86_newlib is a good choice for development since it avoids the run-time pnacl
- to native code translation step, which gives faster build-debug cycles. x86_newlib
- use requires enabling Native Client in Chrome's about:flags settings.
+* pnacl-x86_64 is a good choice for development since it avoids the run-time pnacl
+ to native code translation step, which gives faster build-debug cycles. Usage
+ requires enabling Native Client in Chrome's about:flags settings.
-The arch-specific toolchains have 32/64-bit flavors, which must match the target
+The native toolchains may have 32/64-bit flavors, which must match the target
Chrome installation. The pnacl toolchain is always 64-bit and is not restricted
in this way.
@@ -127,8 +133,7 @@ nacldeployqt performs the following steps:
Run-time behavior notes:
* pnacl translation delay: There is a ~10-30s delay the first time a pnacl
- executable is loaded. The loading screen is currently a blank white screen
- with no progress indicator.
+ executable is loaded.
* qmldir loading: Qt Quick looks for qmldir files using the standard search pattern:
first QtQuick.2.2/qmldir, then QtQuick.2/qmldir, then QtQuick/qmldir. This
generates several 404 error messages on the Javascript and terminal console.
diff --git a/mkspecs/unsupported/pnacl-newlib-clang-arm/qmake.conf b/mkspecs/unsupported/pnacl-newlib-clang-arm/qmake.conf
new file mode 100644
index 0000000000..32828a4d51
--- /dev/null
+++ b/mkspecs/unsupported/pnacl-newlib-clang-arm/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for building with arm-nacl-clang from the pnacl toolchain
+#
+
+load(device_config) # for NACL_SDK_BIN support.
+
+include(../../common/unix.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
+include(../../common/nacl/nacl-base.conf)
+include(../../common/nacl/nacl-newlib-static.conf)
+
+QMAKE_CC = $${NACL_SDK_BIN}arm-nacl-clang
+QMAKE_CXX = $${NACL_SDK_BIN}arm-nacl-clang++
+QMAKE_LINK = $${NACL_SDK_BIN}arm-nacl-clang++
+QMAKE_LINK_SHLIB = $${NACL_SDK_BIN}arm-nacl-clang++
+QMAKE_AR = $${NACL_SDK_BIN}arm-nacl-ar q
+QMAKE_OBJCOPY = noop
+QMAKE_STRIP = $${NACL_SDK_BIN}arm-nacl-strip
+
+load(qt_config)
diff --git a/mkspecs/unsupported/pnacl-newlib-clang-arm/qplatformdefs.h b/mkspecs/unsupported/pnacl-newlib-clang-arm/qplatformdefs.h
new file mode 100644
index 0000000000..4b8f8b322a
--- /dev/null
+++ b/mkspecs/unsupported/pnacl-newlib-clang-arm/qplatformdefs.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#define QT_NO_SOCKET_H
+
+#include "../../common/posix/qplatformdefs.h"
+#include "../../common/nacl/qplatformdefs.h"
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/pnacl-newlib-clang-x86_32/qmake.conf b/mkspecs/unsupported/pnacl-newlib-clang-x86_32/qmake.conf
new file mode 100644
index 0000000000..0fb1a5c839
--- /dev/null
+++ b/mkspecs/unsupported/pnacl-newlib-clang-x86_32/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for building with i686-nacl-clang from the pnacl toolchain
+#
+
+load(device_config) # for NACL_SDK_BIN support.
+
+include(../../common/unix.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
+include(../../common/nacl/nacl-base.conf)
+include(../../common/nacl/nacl-newlib-static.conf)
+
+QMAKE_CC = $${NACL_SDK_BIN}i686-nacl-clang
+QMAKE_CXX = $${NACL_SDK_BIN}i686-nacl-clang++
+QMAKE_LINK = $${NACL_SDK_BIN}i686-nacl-clang++
+QMAKE_LINK_SHLIB = $${NACL_SDK_BIN}i686-nacl-clang++
+QMAKE_AR = $${NACL_SDK_BIN}i686-nacl-ar q
+QMAKE_OBJCOPY = noop
+QMAKE_STRIP = $${NACL_SDK_BIN}i686-nacl-strip
+
+load(qt_config)
diff --git a/mkspecs/unsupported/pnacl-newlib-clang-x86_32/qplatformdefs.h b/mkspecs/unsupported/pnacl-newlib-clang-x86_32/qplatformdefs.h
new file mode 100644
index 0000000000..4b8f8b322a
--- /dev/null
+++ b/mkspecs/unsupported/pnacl-newlib-clang-x86_32/qplatformdefs.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#define QT_NO_SOCKET_H
+
+#include "../../common/posix/qplatformdefs.h"
+#include "../../common/nacl/qplatformdefs.h"
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/pnacl-newlib-clang-x86_64/qmake.conf b/mkspecs/unsupported/pnacl-newlib-clang-x86_64/qmake.conf
new file mode 100644
index 0000000000..ad06535422
--- /dev/null
+++ b/mkspecs/unsupported/pnacl-newlib-clang-x86_64/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for building with x86_64-nacl-clang from the pnacl toolchain
+#
+
+load(device_config) # for NACL_SDK_BIN support.
+
+include(../../common/unix.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
+include(../../common/nacl/nacl-base.conf)
+include(../../common/nacl/nacl-newlib-static.conf)
+
+QMAKE_CC = $${NACL_SDK_BIN}x86_64-nacl-clang
+QMAKE_CXX = $${NACL_SDK_BIN}x86_64-nacl-clang++
+QMAKE_LINK = $${NACL_SDK_BIN}x86_64-nacl-clang++
+QMAKE_LINK_SHLIB = $${NACL_SDK_BIN}x86_64-nacl-clang++
+QMAKE_AR = $${NACL_SDK_BIN}x86_64-nacl-ar q
+QMAKE_OBJCOPY = noop
+QMAKE_STRIP = $${NACL_SDK_BIN}x86_64-nacl-strip
+
+load(qt_config)
diff --git a/mkspecs/unsupported/pnacl-newlib-clang-x86_64/qplatformdefs.h b/mkspecs/unsupported/pnacl-newlib-clang-x86_64/qplatformdefs.h
new file mode 100644
index 0000000000..4b8f8b322a
--- /dev/null
+++ b/mkspecs/unsupported/pnacl-newlib-clang-x86_64/qplatformdefs.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#define QT_NO_SOCKET_H
+
+#include "../../common/posix/qplatformdefs.h"
+#include "../../common/nacl/qplatformdefs.h"
+
+#endif // QPLATFORMDEFS_H
diff --git a/nacl-configure b/nacl-configure
index d53bc6bec0..69438a1956 100755
--- a/nacl-configure
+++ b/nacl-configure
@@ -31,7 +31,7 @@ if [ $# -eq 0 ]
then
echo ""
echo "No arguments supplied. Usage:"
- echo "\"nacl-configure <tooolchain> [release|debug] [32|64]"
+ echo "\"nacl-configure <tooolchain> [release|debug] [32|64|PNACL_ARCH]"
echo "Toolchain is one of:"
echo " ${platform}_arm_newlib"
echo " ${platform}_pnacl"
@@ -40,6 +40,12 @@ if [ $# -eq 0 ]
echo " emscripten"
echo " host"
echo ""
+ echo "For the pnacl toolchain PNACL_ARCH can be empty for the default"
+ echo "PNaCl build, or one of:"
+ echo " x86-32"
+ echo " x86-64"
+ echo " arm"
+ echo ""
exit
fi
@@ -63,14 +69,17 @@ else
shift
fi
-# Argument 3: 32/64 bit build (64-bit default)
+# Argument 3: 32/64 bit build (64-bit default), or PNaCl native arch
BITS=$1
if [[ $BITS == "64" ]]; then
shift
elif [[ $BITS == "32" ]]; then
shift
+elif [[ $TOOLCHAIN == *pnacl ]]; then
+ shift
else
BITS=64
+ shift
fi
# set up for passing the rest of the args to configure
@@ -121,6 +130,9 @@ fi
# nacl-x86-newlib-g++-32
# nacl-x86-newlib-g++.-64
# pnacl-newlib-clang
+# pnacl-newlib-clang-x86_32
+# pnacl-newlib-clang-x86_64
+# pnacl-newlib-clang-arm
# Map the selected toolchain to a mkspec.
if [[ $TOOLCHAIN == *arm_newlib ]]
@@ -129,7 +141,12 @@ if [[ $TOOLCHAIN == *arm_newlib ]]
fi
if [[ $TOOLCHAIN == *pnacl ]]
then
- QT_MKSPEC="pnacl-newlib-clang"
+ if [[ -z "$BITS" ]]
+ then
+ QT_MKSPEC="pnacl-newlib-clang"
+ else
+ QT_MKSPEC="pnacl-newlib-clang-$BITS"
+ fi
fi
if [[ $TOOLCHAIN == *x86_glibc ]]
then
@@ -160,12 +177,22 @@ fi
# newlib_x86_32
# newlib_x86_64
# pnacl
+# clang-newlib_arm
+# clang-newlib_x86_32
+# clang-newlib_x86_64
+
if [[ $PNACL == pnacl ]]
then
- LIBDIR="pnacl"
+ if [[ -z "$BITS" ]]
+ then
+ LIBDIR="pnacl" # standard pnacl
+ else
+ LIBDIR="clang-newlib_${BITS}" # using one of the native compilers from the
+ fi # pnacl toolchain.
else
LIBDIR="${CLIB}_${ARCH}"
fi
+
if [[ $ARCH == x86 ]]
then
LIBDIR="${LIBDIR}_${BITS}"