Subversion Repositories DevTools

Rev

Rev 391 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 391 Rev 3965
Line 22... Line 22...
22
#          ROOT             => Root of compiler
22
#          ROOT             => Root of compiler
23
#          BASE             => Base for binaries
23
#          BASE             => Base for binaries
24
#       Optional
24
#       Optional
25
#          CC_OPTS          => Additonal Compiler options
25
#          CC_OPTS          => Additonal Compiler options
26
#          UNCONTROLLED     => Boolean to create warning
26
#          UNCONTROLLED     => Boolean to create warning
-
 
27
#          PACKAGE_ARCH     => Packageing architecture
-
 
28
#          VERSION          => Version reported by GCC
-
 
29
#          MACHINE          => Machine reported by GCC
27
 
30
 
28
my %ToolsetConfig = (
31
my %ToolsetConfig = (
29
 
32
 
30
    'i386-unknown-linux-gnu'    => {
33
    'i386-unknown-linux-gnu'    => {
31
        ROOT => '/opt/crosstool/gcc-4.1.1-glibc-2.5/i586-unknown-linux-gnu',
34
        ROOT => '/opt/crosstool/gcc-4.1.1-glibc-2.5/i586-unknown-linux-gnu',
32
        BASE => 'bin/i586-unknown-linux-gnu-',
35
        BASE => 'bin/i586-unknown-linux-gnu-',
-
 
36
       VERSION      => '4.1.1',
-
 
37
       MACHINE      => 'i586-unknown-linux-gnu'
33
    },
38
    },
34
 
39
 
35
    'arm-9tdmi-linux-gnu'       => {
40
    'arm-9tdmi-linux-gnu'       => {
36
        ROOT => '/opt/crosstool/gcc-4.1.1-glibc-2.5/arm-9tdmi-linux-gnu',
41
        ROOT => '/opt/crosstool/gcc-4.1.1-glibc-2.5/arm-9tdmi-linux-gnu',
37
        BASE => 'bin/arm-9tdmi-linux-gnu-'
42
        BASE => 'bin/arm-9tdmi-linux-gnu-',
-
 
43
        VERSION      => '4.1.1',
-
 
44
        MACHINE      => 'arm-9tdmi-linux-gnu'
38
        },
45
        },
39
 
46
 
40
    'powerpc-603e-linux-gnu'    => {
47
    'powerpc-603e-linux-gnu'    => {
41
       ROOT => '/opt/crosstool/gcc-4.1.1-glibc-2.5/powerpc-603e-linux-gnu',
48
       ROOT => '/opt/crosstool/gcc-4.1.1-glibc-2.5/powerpc-603e-linux-gnu',
42
       BASE => 'bin/powerpc-603e-linux-gnu-'
49
       BASE => 'bin/powerpc-603e-linux-gnu-',
-
 
50
       VERSION      => '4.1.1',
-
 
51
       MACHINE      => 'powerpc-603e-linux-gnu'
43
    },
52
    },
44
 
53
 
45
    'arm-926ejs-linux-gnueabi'  => {
54
    'arm-926ejs-linux-gnueabi'  => {
46
       ROOT => '/opt/crosstool/gcc-4.4.3-glibc-2.9/arm-926ejs-linux-gnueabi',
55
       ROOT => '/opt/crosstool/gcc-4.4.3-glibc-2.9/arm-926ejs-linux-gnueabi',
47
       BASE => 'bin/arm-926ejs-linux-gnueabi-',
56
       BASE => 'bin/arm-926ejs-linux-gnueabi-',
48
       CC_OPTS => '-Wno-psabi',
57
       CC_OPTS => '-Wno-psabi',
-
 
58
       VERSION      => '4.4.3',
-
 
59
       MACHINE      => 'arm-926ejs-linux-gnueabi'
-
 
60
    },
-
 
61
 
-
 
62
    'i686-linux-gnu'    => {
-
 
63
       ROOT         => '/usr',
-
 
64
       BASE         => 'bin/',
-
 
65
       PACKAGE_ARCH => 'i386',
-
 
66
       VERSION      => '4.6',
-
 
67
       MACHINE      => 'i686-linux-gnu'
49
    },
68
    },
50
 
69
 
51
    #
70
    #
52
    #   Old (not to be used) version of the embedded toolchain
71
    #   Old (not to be used) version of the embedded toolchain
53
    #   This was depricated in favor of gcc-4.1.1-glibc-2.5
72
    #   This was depricated in favor of gcc-4.1.1-glibc-2.5
Line 77... Line 96...
77
    #
96
    #
78
    'i386-unknown-linux-gcc' => {
97
    'i386-unknown-linux-gcc' => {
79
       ROOT => '/usr',
98
       ROOT => '/usr',
80
       BASE => 'bin/',
99
       BASE => 'bin/',
81
       UNCONTROLLED => 1,
100
       UNCONTROLLED => 1,
-
 
101
       PACKAGE_ARCH => 'i386',
82
    },
102
    },
83
);
103
);
84
 
104
 
85
#
105
#
86
#   Cross reference from GCCTarget to GBE_MACHTYPE for which it can
106
#   Cross reference from GCCTarget to GBE_MACHTYPE for which it can
Line 100... Line 120...
100
ToolsetInit();
120
ToolsetInit();
101
 
121
 
102
sub ToolsetInit
122
sub ToolsetInit
103
{
123
{
104
    my( $GCCTarget, $GCCToolchain, $GCCRoot, $GCCBin, $GCCAr, $GCCFlags, $GCCObjCopy );
124
    my( $GCCTarget, $GCCToolchain, $GCCRoot, $GCCBin, $GCCAr, $GCCFlags, $GCCObjCopy );
-
 
125
    my( $PkgArch);
105
    my( $arg_alias, $tools_found );
126
    my( $arg_alias, $tools_found );
106
 
127
 
107
#.. Toolset configuration
128
#.. Toolset configuration
108
#
129
#
109
    $::ScmToolsetVersion = "1.0.0";             # our version
130
    $::ScmToolsetVersion = "1.0.0";             # our version
Line 202... Line 223...
202
        $GCCRoot = $GCCToolchain->{ROOT};
223
        $GCCRoot = $GCCToolchain->{ROOT};
203
        $GCCBin = '${GCC_ROOT}/' . $GCCToolchain->{BASE} . 'gcc';
224
        $GCCBin = '${GCC_ROOT}/' . $GCCToolchain->{BASE} . 'gcc';
204
        $GCCAr =  '${GCC_ROOT}/' . $GCCToolchain->{BASE} . 'ar';
225
        $GCCAr =  '${GCC_ROOT}/' . $GCCToolchain->{BASE} . 'ar';
205
        $GCCObjCopy =  '${GCC_ROOT}/' . $GCCToolchain->{BASE} . 'objcopy';
226
        $GCCObjCopy =  '${GCC_ROOT}/' . $GCCToolchain->{BASE} . 'objcopy';
206
        $GCCFlags = $GCCToolchain->{CC_OPTS};
227
        $GCCFlags = $GCCToolchain->{CC_OPTS};
-
 
228
        $PkgArch = $GCCToolchain->{PACKAGE_ARCH};
207
    }
229
    }
208
    else
230
    else
209
    {
231
    {
210
        $GCCRoot = '/usr';
232
        $GCCRoot = '/usr';
211
        $GCCBin = 'gcc';
233
        $GCCBin = 'gcc';
Line 223... Line 245...
223
    PlatformDefine( "GCC_TARGET         := $GCCTarget" );
245
    PlatformDefine( "GCC_TARGET         := $GCCTarget" );
224
    PlatformDefine( "GCC_ROOT           := $GCCRoot" );
246
    PlatformDefine( "GCC_ROOT           := $GCCRoot" );
225
    PlatformDefine( "GCC_CC             := $GCCBin" );
247
    PlatformDefine( "GCC_CC             := $GCCBin" );
226
    PlatformDefine( "GCC_AR             := $GCCAr" );
248
    PlatformDefine( "GCC_AR             := $GCCAr" );
227
    PlatformDefine( "GCC_OBJCOPY        := $GCCObjCopy" );
249
    PlatformDefine( "GCC_OBJCOPY        := $GCCObjCopy" );
228
    PlatformDefine( "" );
-
 
229
 
-
 
230
    PlatformDefine( "GCC_CFLAGS         := $GCCFlags" ) if defined $GCCFlags;
250
    PlatformDefine( "GCC_CFLAGS         := $GCCFlags" ) if defined $GCCFlags;
231
 
251
 
232
 
-
 
233
    #
252
    #
234
    #   Required since this toolset advertises: ScmToolsetCompilerPath
253
    #   Required since this toolset advertises: ScmToolsetCompilerPath
235
    #
254
    #
236
    PlatformDefine( "SCM_COMPILERPATH   := \$\{GCC_CC\}" );
255
    PlatformDefine( "SCM_COMPILERPATH   := \$\{GCC_CC\}" );
237
    PlatformDefine( "" );
-
 
238
 
256
 
-
 
257
    #
-
 
258
    #   Sanity checking
-
 
259
    #
-
 
260
    PlatformDefine( "GCC_EVERSION       := " . $GCCToolchain->{VERSION} ) if defined $GCCToolchain->{VERSION};
-
 
261
    PlatformDefine( "GCC_EMACHINE       := " . $GCCToolchain->{MACHINE} ) if defined $GCCToolchain->{MACHINE};
-
 
262
 
-
 
263
    #
-
 
264
    #   Option indication of packaging architecture
-
 
265
    #   Used by non-embedded systems for packaging. See debian_packager
-
 
266
    #
-
 
267
    PlatformDefine( "PACKAGE_ARCH       := $PkgArch" ) if (defined $PkgArch);
-
 
268
    PlatformDefine( "" );
239
 
269
 
240
#.. Piece the world together
270
#.. Piece the world together
241
#
271
#
242
    Init( "gcc" );
272
    Init( 'gcc' );
243
    ToolsetDefines( "gcc.def" );
273
    ToolsetDefines( "gcc.def" );
244
    ToolsetRules( "gcc.rul" );
274
    ToolsetRules( "gcc.rul" );
245
    ToolsetRules( "standard.rul" );
275
    ToolsetRules( "standard.rul" );
246
 
276
 
247
#   Create a standard data structure
277
#   Create a standard data structure