Lines 345-352
Link Here
|
345 |
return 1 |
345 |
return 1 |
346 |
|
346 |
|
347 |
local PROG=$(tc-get${comp}) |
347 |
local PROG=$(tc-get${comp}) |
348 |
${PROG} ${flags} -S -o /dev/null -xc /dev/null \ |
348 |
local out # declare on separate line so exit status is correct |
349 |
> /dev/null 2>&1 |
349 |
out=$(${PROG} ${flags} -S -o /dev/null -xc /dev/null 2>&1) \ |
|
|
350 |
|| return 1 # PROG returned error status |
351 |
|
352 |
local f |
353 |
for f in $flags; do |
354 |
[[ $out == *"unrecognized option \`$f'"* ]] && return 1 |
355 |
done |
356 |
|
357 |
return 0 |
350 |
} |
358 |
} |
351 |
|
359 |
|
352 |
# Returns true if C compiler support given flag |
360 |
# Returns true if C compiler support given flag |