summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-05-11 10:03:49 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-11 12:52:21 +0200
commit7a67c822e3e552d0d881f0409a5316de07dbb8c7 (patch)
tree408565ec54a369869ea68433e68d62321e8b9c08 /config.tests
parent28dc0a0fa1f645d1d8d86abf2cf3df1913dc96c4 (diff)
configure: Remove the -dwarf2 argument for Mac OS X builds
Modern versions of Xcode properly support dwarf2, and as such dwarf2 is always enabled. This change removes the ability to turn it off, making dwarf2 non-optional. Change-Id: I149daeae6048ee8a1ed116363572173ad219102e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'config.tests')
-rwxr-xr-xconfig.tests/mac/dwarf2.test42
-rw-r--r--config.tests/mac/xcodeversion.cpp99
2 files changed, 0 insertions, 141 deletions
diff --git a/config.tests/mac/dwarf2.test b/config.tests/mac/dwarf2.test
deleted file mode 100755
index a640b113de..0000000000
--- a/config.tests/mac/dwarf2.test
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-
-DWARF2_SUPPORT=no
-DWARF2_SUPPORT_BROKEN=no
-COMPILER=$1
-VERBOSE=$2
-WORKDIR=$3
-
-touch dwarf2.c
-
-if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>/dev/null 1>&2; then
- if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>&1 | grep "unsupported" >/dev/null ; then
- true
- else
- DWARF2_SUPPORT=yes
- fi
-fi
-rm -f dwarf2.c dwarf2.o
-
-# Test for xcode 2.4.0, which has a broken implementation of DWARF
-"$COMPILER" $WORKDIR/xcodeversion.cpp -o xcodeversion -framework Carbon;
-./xcodeversion
-
-if [ "$?" == "1" ]; then
- DWARF2_SUPPORT_BROKEN=yes
-fi
-
-rm xcodeversion
-
-# done
-if [ "$DWARF2_SUPPORT" != "yes" ]; then
- [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled."
- exit 0
-else
- if [ "$DWARF2_SUPPORT_BROKEN" == "yes" ]; then
- [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled."
- exit 0
- else
- [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols enabled."
- exit 1
- fi
-fi
diff --git a/config.tests/mac/xcodeversion.cpp b/config.tests/mac/xcodeversion.cpp
deleted file mode 100644
index c5b945c14b..0000000000
--- a/config.tests/mac/xcodeversion.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the config.tests of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia 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.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <CoreFoundation/CoreFoundation.h>
-#include <Carbon/Carbon.h>
-
-int success = 0;
-int fail = 1;
-int internal_error = success; // enable dwarf on internal errors
-
-int main(int argc, const char **argv)
-{
- CFURLRef cfurl;
- OSStatus err = LSFindApplicationForInfo(0, CFSTR("com.apple.Xcode"), 0, 0, &cfurl);
- if (err != noErr)
- return internal_error;
-
- CFBundleRef bundle = CFBundleCreate(0, cfurl);
- if (bundle == 0)
- return internal_error;
-
- CFStringRef str = CFStringRef(CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString")));
- const char * ptr = CFStringGetCStringPtr(str, 0);
- if (ptr == 0)
- return internal_error;
-
- // self-test
- const char * fail1 = "2.4";
- const char * fail2 = "2.4.0";
- const char * fail3 ="2.3";
- const char * ok1 = "2.4.1";
- const char * ok2 ="2.5";
- const char * ok3 ="3.0";
-// ptr = fail1;
-// printf ("string: %s\n", ptr);
-
- int length = strlen(ptr);
- if (length < 3) // expect "x.y" at least
- return internal_error;
-
- // fail on 2.4 and below (2.4.1 is ok)
-
- if (ptr[0] < '2')
- return fail;
-
- if (ptr[0] >= '3')
- return success;
-
- if (ptr[2] < '4')
- return fail;
-
- if (length < 5)
- return fail;
-
- if (ptr[4] < '1')
- return fail;
-
- return success;
-} \ No newline at end of file