sbsv1/abld/toolinfo/gcce_plat2set.pm
author Mike Kinghan <mikek@symbian.org>
Thu, 25 Nov 2010 13:59:07 +0000
changeset 40 68f68128601f
permissions -rw-r--r--
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package. 2) Enhance romnibus.pl so that it generate the symbol file for the built rom when invoked by Raptor 3) Make the maksym.pl tool portable for Linux as well as Windows. 4) Remove the of armasm2as.pl from the e32tools component in favour of the copy now exported from sbsv1/e32util.

# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description:
# This module provides a mapping from build platforms (e.g. GCCE) to the
# corresponding GCC-E environment settings.
# Currently this module only provides very simple functionality. The intention is
# that if we're going to support different GCC-E versions for different build
# platforms (as we do for RVCT) this module should be extended to provide similar
# functionality to rvct_plat2set.
# 
#

package gcce_plat2set;


# Returns the GCCE version corresponding to the given build platform. The first
# function returns the data as a string (e.g. "4.2.3"); the second function
# returns the data as a list (e.g. [4,2,3]).
sub get_version_string($);
sub get_version_list($);

# Returns true if a GCC-E version for the given platform exists.
sub compiler_exists($);


my $g_version;


sub get_version_string($)
{
    return $g_version;
}

sub get_version_list($)
{
    return split(/\./, $g_version);
}

sub compiler_exists($)
{
    if ($g_version)
    {
        return 1;
    }
    else
    {
        return 0;
    }
}

BEGIN
{
    my $vers = qx/arm-none-symbianelf-gcc -dumpversion 2>&1/;

    if ($vers =~ /^\s*(\d+\.\d+.\d+)\s*$/)
    {
        $g_version = "$1";
    }
}


1;