Sha256: a4352666d911201a39be7b195482d2d2f03e42ad057979a20e3a4187b4256670

Contents?: true

Size: 1.77 KB

Versions: 35

Compression:

Stored size: 1.77 KB

Contents

require 'common/utils'
require 'bake/toolchain/provider'
require 'bake/toolchain/errorparser/error_parser'
require 'bake/toolchain/errorparser/gcc_compiler_error_parser'
require 'bake/toolchain/errorparser/gcc_linker_error_parser'

module Bake
  module Toolchain

    GCCChain = Provider.add("GCC")

    GCCChain[:COMPILER][:CPP].update({
      :COMMAND => "g++",
      :DEFINE_FLAG => "-D",
      :OBJECT_FILE_FLAG => "-o",
      :OBJ_FLAG_SPACE => true,
      :INCLUDE_PATH_FLAG => "-I",
      :COMPILE_FLAGS => "-c ",
      :DEP_FLAGS => "-MD -MF",
      :DEP_FLAGS_SPACE => true,
      :PREPRO_FLAGS => "-E -P"
    })

    GCCChain[:COMPILER][:C] = Utils.deep_copy(GCCChain[:COMPILER][:CPP])
    GCCChain[:COMPILER][:C][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:C][:SOURCE_FILE_ENDINGS]
    GCCChain[:COMPILER][:C][:COMMAND] = "gcc"

    GCCChain[:COMPILER][:ASM] = Utils.deep_copy(GCCChain[:COMPILER][:C])
    GCCChain[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS]

    GCCChain[:ARCHIVER][:COMMAND] = "ar"
    GCCChain[:ARCHIVER][:ARCHIVE_FLAGS] = "-rc"

    GCCChain[:LINKER][:COMMAND] = "g++"
    GCCChain[:LINKER][:SCRIPT] = "-T"
    GCCChain[:LINKER][:USER_LIB_FLAG] = "-l:"
    GCCChain[:LINKER][:EXE_FLAG] = "-o"
    GCCChain[:LINKER][:LIB_FLAG] = "-l"
    GCCChain[:LINKER][:LIB_PATH_FLAG] = "-L"

    gccCompilerErrorParser =                   GCCCompilerErrorParser.new
    GCCChain[:COMPILER][:C][:ERROR_PARSER] =   gccCompilerErrorParser
    GCCChain[:COMPILER][:CPP][:ERROR_PARSER] = gccCompilerErrorParser
    GCCChain[:COMPILER][:ASM][:ERROR_PARSER] = gccCompilerErrorParser
    GCCChain[:ARCHIVER][:ERROR_PARSER] =       gccCompilerErrorParser
    GCCChain[:LINKER][:ERROR_PARSER] =         GCCLinkerErrorParser.new

  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
bake-toolkit-2.18.0 lib/bake/toolchain/gcc.rb
bake-toolkit-2.17.4 lib/bake/toolchain/gcc.rb
bake-toolkit-2.17.3 lib/bake/toolchain/gcc.rb
bake-toolkit-2.17.2 lib/bake/toolchain/gcc.rb
bake-toolkit-2.17.1 lib/bake/toolchain/gcc.rb
bake-toolkit-2.16.1 lib/bake/toolchain/gcc.rb
bake-toolkit-2.15.0 lib/bake/toolchain/gcc.rb
bake-toolkit-2.14.0 lib/bake/toolchain/gcc.rb
bake-toolkit-2.13.1 lib/bake/toolchain/gcc.rb
bake-toolkit-2.13.0 lib/bake/toolchain/gcc.rb
bake-toolkit-2.12.2 lib/bake/toolchain/gcc.rb
bake-toolkit-2.12.1 lib/bake/toolchain/gcc.rb
bake-toolkit-2.12.0 lib/bake/toolchain/gcc.rb
bake-toolkit-2.11.4 lib/bake/toolchain/gcc.rb
bake-toolkit-2.11.3 lib/bake/toolchain/gcc.rb
bake-toolkit-2.11.2 lib/bake/toolchain/gcc.rb
bake-toolkit-2.11.1 lib/bake/toolchain/gcc.rb
bake-toolkit-2.11.0 lib/bake/toolchain/gcc.rb
bake-toolkit-2.10.3 lib/bake/toolchain/gcc.rb
bake-toolkit-2.10.2 lib/bake/toolchain/gcc.rb