Skip to content

Commit

Permalink
Change: [Build] prioritize cc-build over build (based on patch by wou…
Browse files Browse the repository at this point in the history
…tershep2) (OpenTTD#6716)

This closes OpenTTD#6414
  • Loading branch information
TrueBrain authored and glx22 committed Apr 14, 2018
1 parent 06911d4 commit 9c6fbf0
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions config.lib
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,22 @@ check_compiler() {
# $8 - "0" gcc, "1" g++, "2" windres, "3" strip, "4" lipo
# $9 - What the command is to check for

if [ -n "$3" ]; then
if [ -n "$4" ]; then
# Check for manual compiler
machine=`$4 $9 2>/dev/null`
ret=$?
eval "$2=\"$4\""

log 2 "executing $4 $9"
log 2 " returned $machine"
log 2 " exit code $ret"

if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
log 1 "checking $1... $4 not found"
log 1 "the selected binary doesn't seem to be a $6 binary"
exit 1
fi
elif [ -n "$3" ]; then
# Check for system
if [ -z "$6" ]; then
compiler="$3"
Expand Down Expand Up @@ -2020,21 +2035,6 @@ check_compiler() {
log 1 "the compiler suggests it doesn't build code for the machine you specified"
exit 1
fi
elif [ -n "$4" ]; then
# Check for manual compiler
machine=`$4 $9 2>/dev/null`
ret=$?
eval "$2=\"$4\""

log 2 "executing $4 $9"
log 2 " returned $machine"
log 2 " exit code $ret"

if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
log 1 "checking $1... $4 not found"
log 1 "the selected binary doesn't seem to be a $6 binary"
exit 1
fi
else
# Nothing given, autodetect

Expand Down

0 comments on commit 9c6fbf0

Please sign in to comment.