build system: verify configured host type is same as current host type

This commit is contained in:
Moritz Bunkus 2019-09-27 17:01:22 +02:00
parent 8ec4021610
commit af744cea80
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 8 additions and 0 deletions

View File

@ -277,6 +277,7 @@ def define_default_task
end
# main
verify_current_host_is_same_as_configured
setup_globals
setup_overrides
import_dependencies

View File

@ -287,6 +287,13 @@ def update_version_number_include
end
end
def verify_current_host_is_same_as_configured
current_host = `#{$source_dir}/config.guess 2> /dev/null`.chomp
return if !current_host || (current_host == c(:host))
fail "Error: The source tree was configured on a different host system type (#{c(:host)}) than the current one (#{current_host}). This is not supported."
end
class Rake::Task
def mo_all_prerequisites
todo = [name]