Subversion Repositories DevTools

Rev

Rev 7322 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7322 Rev 7323
Line 17... Line 17...
17
our $ScmPlatform;
17
our $ScmPlatform;
18
our $ScmNoToolsTest;
18
our $ScmNoToolsTest;
19
 
19
 
20
#   Misc variables
20
#   Misc variables
21
my $UseGcov = 0;
21
my $UseGcov = 0;
-
 
22
my $UseProfile = 0;
22
my $LcovExplicitBranch = '';
23
my $LcovExplicitBranch = '';
23
my $UseCppcheck = 0;
24
my $UseCppcheck = 0;
24
my $GCCRPath;
25
my $GCCRPath;
25
my @ldFixups;
26
my @ldFixups;
26
 
27
 
Line 166... Line 167...
166
        VERSION      => '4.8.5',
167
        VERSION      => '4.8.5',
167
        MACHINE      => 'x86_64-redhat-linux',
168
        MACHINE      => 'x86_64-redhat-linux',
168
        COMPILER_OPTIONS =>  'pic'               # Always create PIC
169
        COMPILER_OPTIONS =>  'pic'               # Always create PIC
169
        },
170
        },
170
 
171
 
-
 
172
    # STIB Parkeon
-
 
173
    'arm-linux-gnueabi-4.6.3' => {
-
 
174
        ROOT         => '/opt/parkeon-arm-linux-gnueabi-4.6',
-
 
175
        BASE         => 'bin/arm-linux-gnueabi-',
-
 
176
        PACKAGE_ARCH => 'armel',
-
 
177
        #CXX_OPTS     => '',
-
 
178
        VERSION      => '4.6.3',
-
 
179
        MACHINE      => 'arm-linux-gnueabi',
-
 
180
        COMPILER_OPTIONS =>  'pic'               # Always create PIC
-
 
181
        },
-
 
182
 
-
 
183
 
171
    #
184
    #
172
    #   Old (not to be used) version of the embedded toolchain
185
    #   Old (not to be used) version of the embedded toolchain
173
    #   This was deprecated in favor of gcc-4.1.1-glibc-2.5
186
    #   This was deprecated in favor of gcc-4.1.1-glibc-2.5
174
    #   It is not possible to reproduce old packages using the old compiler
187
    #   It is not possible to reproduce old packages using the old compiler
175
    #   This is a known issue
188
    #   This is a known issue
Line 227... Line 240...
227
    my( $GCCXXFlags );
240
    my( $GCCXXFlags );
228
    my( $PkgArch);
241
    my( $PkgArch);
229
    my( $arg_alias, $tools_found, $compiler_tool );
242
    my( $arg_alias, $tools_found, $compiler_tool );
230
 
243
 
231
#.. Toolset configuration
244
#.. Toolset configuration
-
 
245
#   Also $::ScmToolsetProperties{}
232
#
246
#
233
    $::ScmToolsetVersion = "1.0.0";             # our version
247
    $::ScmToolsetVersion = "1.0.0";             # our version
234
    $::ScmToolsetGenerate = 0;                  # GEN generate optional
248
    $::ScmToolsetGenerate = 0;                  # GEN generate optional
235
    $::ScmToolsetCompilerPath = 1;              # Exports Compiler path to makefile via SCM_COMPILERPATH
249
    $::ScmToolsetCompilerPath = 1;              # Exports Compiler path to makefile via SCM_COMPILERPATH
236
    $::ScmToolsetProgDependancies = 0;          # handle Prog dependancies myself
250
    $::ScmToolsetProgDependancies = 0;          # handle Prog dependancies myself
Line 254... Line 268...
254
            $arg_alias = $1;
268
            $arg_alias = $1;
255
 
269
 
256
        } elsif (/^--UseGcov/) {                # Compile for code coverage
270
        } elsif (/^--UseGcov/) {                # Compile for code coverage
257
            $UseGcov = 1;
271
            $UseGcov = 1;
258
 
272
 
-
 
273
        } elsif (/^--UseProfile/) {             # Compile for profiling
-
 
274
            $UseProfile = 1;
-
 
275
 
259
        } elsif (/^--LcovExplicitBranch/) {     # Version of lcov requires explicit branch coverage
276
        } elsif (/^--LcovExplicitBranch/) {     # Version of lcov requires explicit branch coverage
260
            $LcovExplicitBranch = ' --rc lcov_branch_coverage=1';
277
            $LcovExplicitBranch = ' --rc lcov_branch_coverage=1';
261
 
278
 
262
        } elsif (/^--UseCppcheck/) {            # Use cppcheck as the lint tool
279
        } elsif (/^--UseCppcheck/) {            # Use cppcheck as the lint tool
263
            $UseCppcheck = 1;
280
            $UseCppcheck = 1;
Line 533... Line 550...
533
        'staticprogs'        => { 'STATIC_PROGS' , '1' },      # Progams link staticlly
550
        'staticprogs'        => { 'STATIC_PROGS' , '1' },      # Progams link staticlly
534
        'no_staticprogs'     => { 'STATIC_PROGS' , undef },    # Default
551
        'no_staticprogs'     => { 'STATIC_PROGS' , undef },    # Default
535
        'noversiondll'       => { 'NO_VERSIONED_DLLS', 1 },    # Matches usage elsewhere
552
        'noversiondll'       => { 'NO_VERSIONED_DLLS', 1 },    # Matches usage elsewhere
536
        'pic'                => { 'GEN_PIC' , '1' },           # Force PIC for static libs
553
        'pic'                => { 'GEN_PIC' , '1' },           # Force PIC for static libs
537
        'nopic'              => { 'GEN_PIC' , undef },         # No Pic on Static libs
554
        'nopic'              => { 'GEN_PIC' , undef },         # No Pic on Static libs
538
        'brokenldscripts'    => { 'BROKEN_LDSCRIPTS' , 1 },    # the linker is brken and cannot handle linker scripts
555
        'brokenldscripts'    => { 'BROKEN_LDSCRIPTS' , 1 },    # the linker is broken and cannot handle linker scripts
539
    );
556
    );
540
 
557
 
541
    #
558
    #
542
    #   Set default options
559
    #   Set default options
543
    #
560
    #
544
    $::ScmCompilerOpts{'STATIC_PROGS'} = undef;
561
    $::ScmCompilerOpts{'STATIC_PROGS'} = undef;
545
    $::ScmCompilerOpts{'NO_VERSIONED_DLLS'} = undef;
562
    $::ScmCompilerOpts{'NO_VERSIONED_DLLS'} = undef;
-
 
563
    $::ScmCompilerOpts{'USE_PROFILE'} = 1 if $UseProfile;
546
 
564
 
547
    #
565
    #
548
    #   Process toolset-specfic compiler options
566
    #   Process toolset-specfic compiler options
549
    #
567
    #
550
    if ( exists $GCCToolchain->{COMPILER_OPTIONS} )
568
    if ( exists $GCCToolchain->{COMPILER_OPTIONS} )
Line 1063... Line 1081...
1063
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );
1081
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );
1064
    $io->Cmd( "-Wl,--end-group" ) if ($multi_scan);
1082
    $io->Cmd( "-Wl,--end-group" ) if ($multi_scan);
1065
 
1083
 
1066
    #   Add Compilers sysroot library path
1084
    #   Add Compilers sysroot library path
1067
    #   Only required for a 'native' compiler that is not fully installed on the host
1085
    #   Only required for a 'native' compiler that is not fully installed on the host
1068
    #   ie: The run-time can't locate the required glic components
1086
    #   ie: The run-time can't locate the required glibc components
1069
    if ($GCCRPath)
1087
    if ($GCCRPath)
1070
    {
1088
    {
1071
        $io->Cmd( "-Wl,-rpath=$GCCRPath" );
1089
        $io->Cmd( "-Wl,-rpath=$GCCRPath" );
1072
        $io->Cmd( "-Wl,--dynamic-linker=$GCCRPath/ld-linux.so.2" ) if ($GCCRPath);
1090
        $io->Cmd( "-Wl,--dynamic-linker=$GCCRPath/ld-linux.so.2" ) if ($GCCRPath);
1073
    }
1091
    }
Line 1156... Line 1174...
1156
        my $finaldir='$(LOCALDIR)/lcov/$(GBE_PLATFORM)$(GBE_TYPE)';
1174
        my $finaldir='$(LOCALDIR)/lcov/$(GBE_PLATFORM)$(GBE_TYPE)';
1157
        my $final=$finaldir . '/lcov-final.info';
1175
        my $final=$finaldir . '/lcov-final.info';
1158
        
1176
        
1159
        ToolsetAddUnitTestPreProcess($ruleName);
1177
        ToolsetAddUnitTestPreProcess($ruleName);
1160
        $io->PrtLn('.PHONY: ' . $ruleName );
1178
        $io->PrtLn('.PHONY: ' . $ruleName );
1161
        $io->PrtLn($ruleName . ':' );
1179
        $io->PrtLn($ruleName . ': $(OBJDIR)' );
1162
        $io->PrtLn("\t" . '${XX_PRE}$(rm) -f ${GCOV_PREFIX}/$(CURDIR)/$(OBJDIR)/*.gcda' );
1180
        $io->PrtLn("\t" . '${XX_PRE}$(rm) -f ${GCOV_PREFIX}/$(CURDIR)/$(OBJDIR)/*.gcda' );
1163
        $io->PrtLn("\t" . '${XX_PRE}$(rm) -f $(OBJDIR)/*.gcda' );
1181
        $io->PrtLn("\t" . '${XX_PRE}$(rm) -f $(OBJDIR)/*.gcda' );
1164
        $io->PrtLn("\t" . '${XX_PRE}$(rm) -f ' . $final);
1182
        $io->PrtLn("\t" . '${XX_PRE}$(rm) -f ' . $final);
1165
        $io->PrtLn("\t" . '${XX_PRE}lcov'
1183
        $io->PrtLn("\t" . '${XX_PRE}lcov'
1166
                        . ' $(GCOV_VERBOSE)'
1184
                        . ' $(GCOV_VERBOSE)'