76 |
|
|
77 |
# execute the compiler |
# execute the compiler |
78 |
verbose "Compiling for the host using: $CC $INCLUDES $LIBS $compline" 2 |
verbose "Compiling for the host using: $CC $INCLUDES $LIBS $compline" 2 |
79 |
set status [catch "exec $CC $INCLUDES $LIBS $compline" comp_output]; |
set status [catch "exec $CC $INCLUDES $LIBS $compline" comp_output] |
80 |
verbose "Compiler returned $comp_output" 2 |
verbose "Compiler returned $comp_output" 2 |
81 |
|
|
82 |
# prune common warnings and other stuff we can safely ignore |
# prune common warnings and other stuff we can safely ignore |
83 |
set comp_output [prune_warnings $comp_output]; |
set comp_output [prune_warnings $comp_output] |
84 |
|
|
85 |
# Trim multiple CR/LF pairs out to keep things consistant |
# Trim multiple CR/LF pairs out to keep things consistant |
86 |
regsub "^\[\r\n\]+" $comp_output "" comp_output; |
regsub "^\[\r\n\]+" $comp_output "" comp_output |
87 |
|
|
88 |
# if we got a compiler error, log it |
# if we got a compiler error, log it |
89 |
if { [lindex $status 0] != 0 } { |
if { [lindex $status 0] != 0 } { |
90 |
verbose -log "compiler exited with status [lindex $status 0]"; |
verbose -log "compiler exited with status [lindex $status 0]" |
91 |
} |
} |
92 |
if { [lindex $status 1] != "" } { |
if { [lindex $status 1] != "" } { |
93 |
verbose -log "output is:\n[lindex $status 1]" 2; |
verbose -log "output is:\n[lindex $status 1]" 2 |
94 |
} |
} |
95 |
|
|
96 |
# return the filtered output |
# return the filtered output |