From f946a1d0c16aec03364ef02f9f1708830bab0d79 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 11 Apr 2014 14:09:28 +0200 Subject: check qmake/make exit code instead of looking for an executable it's a bit braindead to look whether we managed to build an executable if we can simply use the exit codes of qmake and make to test for success. the windows equivalent is already doing that. this also allows us to do tests that can fail despite building an executable, or not build one in the first place. Change-Id: Ib69f9d005309d55a790dd3d89db1ee913e45b26b Reviewed-by: Wolfgang Bremer Reviewed-by: Thiago Macieira --- config.tests/unix/compile.test | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'config.tests') diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test index 22064b85e9..f99237cb50 100755 --- a/config.tests/unix/compile.test +++ b/config.tests/unix/compile.test @@ -69,15 +69,11 @@ rm -f "$EXE" "${EXE}.exe" set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" if [ "$VERBOSE" = "yes" ]; then - OUTDIR=$OUTDIR "$@" - $MAKE + OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes else - OUTDIR=$OUTDIR "$@" >/dev/null 2>&1 - $MAKE >/dev/null 2>&1 + OUTDIR=$OUTDIR "$@" >/dev/null 2>&1 && $MAKE >/dev/null 2>&1 && SUCCESS=yes fi -( [ -f "$EXE" ] || [ -f "${EXE}.exe" ] ) && SUCCESS=yes - # done if [ "$SUCCESS" != "yes" ]; then [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION disabled." -- cgit v1.2.3 From 865c181fbd4f34d6ecfbe5d2ced4dc36c02fc5fb Mon Sep 17 00:00:00 2001 From: Wolfgang Bremer Date: Fri, 11 Apr 2014 13:30:03 +0200 Subject: Make objcopy config test cross platform functional This removes the old objcopy.test script and adds a cross platform qmake project for auto detection. Change-Id: Icc7c40d72fb0ff751d214b7351e20652f7b15945 Reviewed-by: Oswald Buddenhagen --- config.tests/unix/objcopy.test | 29 ---------------------- config.tests/unix/objcopy/objcopy.cpp | 45 +++++++++++++++++++++++++++++++++++ config.tests/unix/objcopy/objcopy.pro | 10 ++++++++ 3 files changed, 55 insertions(+), 29 deletions(-) delete mode 100755 config.tests/unix/objcopy.test create mode 100644 config.tests/unix/objcopy/objcopy.cpp create mode 100644 config.tests/unix/objcopy/objcopy.pro (limited to 'config.tests') diff --git a/config.tests/unix/objcopy.test b/config.tests/unix/objcopy.test deleted file mode 100755 index 9eb6e22ab0..0000000000 --- a/config.tests/unix/objcopy.test +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -TEST_PATH=`dirname "$0"` -SEP_DEBUG_SUPPORT=no -COMPILER=$1 -QMAKE_OBJCOPY=$2 -VERBOSE=$3 - -if [ -n "$QMAKE_OBJCOPY" ]; then - echo "int main() { return 0; }" > objcopy_test.cpp - if $TEST_PATH/which.test "$QMAKE_OBJCOPY" >/dev/null 2>&1 && $COMPILER $SYSROOT_FLAG -g -o objcopy_test objcopy_test.cpp >/dev/null 2>&1; then - "$QMAKE_OBJCOPY" --only-keep-debug objcopy_test objcopy_test.debug >/dev/null 2>&1 \ - && "$QMAKE_OBJCOPY" --strip-debug objcopy_test >/dev/null 2>&1 \ - && "$QMAKE_OBJCOPY" --add-gnu-debuglink=objcopy_test.debug objcopy_test >/dev/null 2>&1 \ - && SEP_DEBUG_SUPPORT=yes - fi - rm -f objcopy_test objcopy_test.debug objcopy_test.cpp -else - [ "$VERBOSE" = "yes" ] && echo "Separate debug info check skipped, QMAKE_OBJCOPY is unset."; -fi - -# done -if [ "$SEP_DEBUG_SUPPORT" != "yes" ]; then - [ "$VERBOSE" = "yes" ] && echo "Separate debug info support disabled." - exit 0 -else - [ "$VERBOSE" = "yes" ] && echo "Separate debug info support enabled." - exit 1 -fi diff --git a/config.tests/unix/objcopy/objcopy.cpp b/config.tests/unix/objcopy/objcopy.cpp new file mode 100644 index 0000000000..66b261bd6d --- /dev/null +++ b/config.tests/unix/objcopy/objcopy.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2014 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the config.tests 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$ +** +****************************************************************************/ + +int main() +{ + return 0; +} diff --git a/config.tests/unix/objcopy/objcopy.pro b/config.tests/unix/objcopy/objcopy.pro new file mode 100644 index 0000000000..d2f9c738f6 --- /dev/null +++ b/config.tests/unix/objcopy/objcopy.pro @@ -0,0 +1,10 @@ +SOURCES = objcopy.cpp +CONFIG -= qt + +all.depends += only_keep_debug strip_debug add_gnu_debuglink + +only_keep_debug.commands = $$QMAKE_OBJCOPY --only-keep-debug objcopy objcopy.debug +strip_debug.commands = $$QMAKE_OBJCOPY --strip-debug objcopy +add_gnu_debuglink.commands = $$QMAKE_OBJCOPY --add-gnu-debuglink=objcopy.debug objcopy + +QMAKE_EXTRA_TARGETS += all only_keep_debug strip_debug add_gnu_debuglink -- cgit v1.2.3 From a75153f8d0ae2b1203f8341deb71d753be009efd Mon Sep 17 00:00:00 2001 From: Wolfgang Bremer Date: Tue, 15 Apr 2014 10:34:20 +0200 Subject: Fix objcopy config test for concurrent make processes The make targets had no dependency to the built binary. Therefore when building with multiple make processes(-j8) it was not guaranteed that the binary was available for the objcopy tests. Change-Id: Ifd04e3f49fdadf030e82e81498668899ad4e7fd3 Reviewed-by: Oswald Buddenhagen --- config.tests/unix/objcopy/objcopy.pro | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'config.tests') diff --git a/config.tests/unix/objcopy/objcopy.pro b/config.tests/unix/objcopy/objcopy.pro index d2f9c738f6..3c28b89ef3 100644 --- a/config.tests/unix/objcopy/objcopy.pro +++ b/config.tests/unix/objcopy/objcopy.pro @@ -1,10 +1,4 @@ SOURCES = objcopy.cpp CONFIG -= qt -all.depends += only_keep_debug strip_debug add_gnu_debuglink - -only_keep_debug.commands = $$QMAKE_OBJCOPY --only-keep-debug objcopy objcopy.debug -strip_debug.commands = $$QMAKE_OBJCOPY --strip-debug objcopy -add_gnu_debuglink.commands = $$QMAKE_OBJCOPY --add-gnu-debuglink=objcopy.debug objcopy - -QMAKE_EXTRA_TARGETS += all only_keep_debug strip_debug add_gnu_debuglink +QMAKE_POST_LINK += $$QMAKE_OBJCOPY --only-keep-debug objcopy objcopy.debug && $$QMAKE_OBJCOPY --strip-debug objcopy && $$QMAKE_OBJCOPY --add-gnu-debuglink=objcopy.debug objcopy -- cgit v1.2.3 From 159465536f0dd1a373f0c67e5530f9af6ccec433 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 24 Apr 2014 13:49:21 +0200 Subject: Allow building against static ICU libs also on Unix For dynamic builds of ICU, libicudata is an implicit dependency. Anyhow, it doesn't harm to explicitly link against it, either. So let's do this everywhere ... Task-number: QTBUG-38445 Change-Id: I420ba096e2ce5e1b8d81814ffb4aa7b300143b01 Reviewed-by: Thiago Macieira --- config.tests/unix/icu/icu.pro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'config.tests') diff --git a/config.tests/unix/icu/icu.pro b/config.tests/unix/icu/icu.pro index 2c1b431f92..16267ff827 100644 --- a/config.tests/unix/icu/icu.pro +++ b/config.tests/unix/icu/icu.pro @@ -1,6 +1,7 @@ SOURCES = icu.cpp CONFIG += console CONFIG -= qt dylib + win32 { CONFIG(static, static|shared) { CONFIG(debug, debug|release) { @@ -9,8 +10,8 @@ win32 { LIBS += -lsicuin -lsicuuc -lsicudt } } else { - LIBS += -licuin -licuuc + LIBS += -licuin -licuuc -licudt } } else { - LIBS += -licui18n -licuuc + LIBS += -licui18n -licuuc -licudata } -- cgit v1.2.3