Ticket #19097: patch-Rakefile.diff

File patch-Rakefile.diff, 947 bytes (added by max@…, 16 years ago)

Patch to pickup CC env variable

  • Rakefile

    old new  
    3030NO_WARN_BUILD = !do_option('allow_build_warnings', false)
    3131ENABLE_STATIC_LIBRARY = do_option('enable_static_library', 'no') { 'yes' }
    3232ENABLE_DEBUG_LOGGING = do_option('enable_debug_logging', true) { |x| x == 'true' }
    33 
     33C_COMPILER =
     34    if cc = ENV['CC']
     35        $stderr.puts "getting C compiller form CC (#{cc})"
     36        cc
     37    else
     38        do_option('c_compiler', 'gcc')
     39    end
    3440# TODO: we should find a way to document these options in rake's --help
    3541
    3642# Everything below this comment should *not* be modified.
     
    416422  CONFIG["target_cpu"] = "i686"
    417423  CONFIG["target_vendor"] = "apple"
    418424  CONFIG["target_os"] = "darwin9.0"
    419   CONFIG["CC"] = "gcc"
     425  CONFIG["CC"] = "#{C_COMPILER}"
    420426  CONFIG["CFLAGS"] = "-fno-common -pipe $(cflags)"
    421427  CONFIG["LDFLAGS"] = ""
    422428  CONFIG["CPPFLAGS"] = "$(cppflags)"