Changeset 2395

Show
Ignore:
Timestamp:
08/14/07 13:07:21 (1 year ago)
Author:
taj
Message:

* apgcc: Apply patch from Unfleshed One for precompiled header support. Fixes #32.
* Apbuild/GCC.pm: Apply patch from Unfleshed One from precompiled header and SCons/Qt4 integration. Fixes #32.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apbuild/trunk/Apbuild/GCC.pm

    r2303 r2395  
    1515# Files with these extensions are objects 
    1616our $staticLibTypes = 'a|al'; 
    17 our $objectTypes = "o|so(\\.\\d+)*|la|lo|$staticLibTypes"; 
     17our $objectTypes = "o|os|so(\\.\\d+)*|la|lo|$staticLibTypes"; 
    1818our $headerTypes = 'h|hpp'; 
    1919# Source file types 
     
    459459sub situation { 
    460460        my ($self, $args) = @_; 
     461 
     462        my $files = 0; 
     463        for (@{$args}) { 
     464                $files++ if (!(/^-/)); 
     465        } 
     466 
     467        if ($files == 1) 
     468        { 
     469                my $i = 0; 
     470                for (@{$args}) 
     471                { 
     472                        if (!(/^-/) && (/\.($headerTypes)$/)) 
     473                        { 
     474                                print($args->[$i], "\n"); 
     475                                return 'precompiled header'; 
     476                        } 
     477                        $i++; 
     478                } 
     479        } 
     480 
    461481        for (@{$args}) { 
    462482                if (/^-c$/) { 
     
    483503        } 
    484504 
    485         my $files = 0; 
    486         for (@{$args}) { 
    487                 $files++ if (!(/^-/)); 
    488         } 
    489  
    490505        if ($files == 0) { 
    491506                # Situation 5 
  • apbuild/trunk/ChangeLog

    r2394 r2395  
     1Tue Aug 14 17:04:32 UTC 2007  Taj Morton  <tajmorton@gmail.com> 
     2        * apgcc: Apply patch from Unfleshed One for precompiled header support. Fixes #32. 
     3        * Apbuild/GCC.pm: Apply patch from Unfleshed One from precompiled header and 
     4          SCons/Qt4 integration. Fixes #32. 
     5 
    16Tue Aug 14 16:51:30 UTC 2007  Taj Morton  <tajmorton@gmail.com> 
    27        * relaytool: When running on unsupported arch, give correct 
  • apbuild/trunk/apgcc

    r2377 r2395  
    234234        } 
    235235        exit; 
    236  
     236} elsif ($situation eq 'precompiled header') { 
     237        # Extract the parameters and files 
     238        my (@files, @params); 
     239        $gcc->splitParams(\@ARGV, \@files, \@params); 
     240 
     241        # Compile each source file to an object file. 
     242        # Force GCC to compile C/C++ source files with older glibc symbols. 
     243        debug "\@files: is @files\n"; 
     244        foreach my $file (@files)  
     245        { 
     246                compileSource($file, \@ARGV); 
     247        } 
    237248} elsif ($situation eq 'compile and link') { 
    238249        # Extract the parameters and files