buildgcc: Don't try to build gnat with a different version
Change-Id: I64a33d2cc4793e54a50fa439a4461c40d424b569 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/16676 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
156d87c024
commit
75797166ce
|
@ -225,6 +225,25 @@ hostcc_version() {
|
||||||
printf "%d.%d" "$(hostcc_major)" "$(hostcc_minor)"
|
printf "%d.%d" "$(hostcc_major)" "$(hostcc_minor)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hostcc_has_gnat1() {
|
||||||
|
[ -x "$(${CC} -print-prog-name=gnat1)" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
ada_requested() {
|
||||||
|
echo "${LANGUAGES}" | grep -q '\<ada\>'
|
||||||
|
}
|
||||||
|
|
||||||
|
check_gnat() {
|
||||||
|
if hostcc_has_gnat1; then
|
||||||
|
if [ "$(hostcc_version)" != "$(buildcc_version)" -a "${BOOTSTRAP}" != "1" ]; then
|
||||||
|
printf "\n${RED}ERROR:${red} Building the Ada compiler (gnat $(buildcc_version)) "
|
||||||
|
printf "with a different host compiler\n version ($(hostcc_version)) "
|
||||||
|
printf "requires bootstrapping (-b).${NC}\n\n"
|
||||||
|
HALT_FOR_TOOLS=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_cc() {
|
check_cc() {
|
||||||
if is_package_enabled "GCC"; then
|
if is_package_enabled "GCC"; then
|
||||||
if [ "$(hostcc_major)" != "$(buildcc_major)" -a "${BOOTSTRAP}" != "1" ]; then
|
if [ "$(hostcc_major)" != "$(buildcc_major)" -a "${BOOTSTRAP}" != "1" ]; then
|
||||||
|
@ -232,6 +251,9 @@ check_cc() {
|
||||||
printf "version ($(hostcc_version)).\n"
|
printf "version ($(hostcc_version)).\n"
|
||||||
printf " Bootstrapping (-b) is recommended.${NC}\n\n"
|
printf " Bootstrapping (-b) is recommended.${NC}\n\n"
|
||||||
fi
|
fi
|
||||||
|
if ada_requested; then
|
||||||
|
check_gnat
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue