summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Config.in6
-rwxr-xr-xsupport/dependencies/dependencies.sh9
2 files changed, 15 insertions, 0 deletions
diff --git a/Config.in b/Config.in
index d87e0f0c54..677fff6204 100644
--- a/Config.in
+++ b/Config.in
@@ -20,6 +20,12 @@ config BR2_HOSTARCH
config BR2_HOSTARCH_NEEDS_IA32_LIBS
bool
+# Hidden boolean selected by packages that need to build 32 bits
+# binaries with the host compiler, even on 64 bits build machines (e.g
+# bootloaders).
+config BR2_HOSTARCH_NEEDS_IA32_COMPILER
+ bool
+
source "arch/Config.in"
menu "Build options"
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index b563f6096a..32b8feac53 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -186,6 +186,15 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BUILDROOT_CONFIG ; then
fi
fi
+if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BUILDROOT_CONFIG ; then
+ if ! echo "int main(void) {}" | gcc -m32 -x c - ; then
+ /bin/echo -e "\nYour Buildroot configuration needs a compiler capable of building 32 bits binaries."
+ /bin/echo -e "If you're running a Debian/Ubuntu distribution, install the gcc-multilib package."
+ /bin/echo -e "For other distributions, refer to their documentation."
+ exit 1
+ fi
+fi
+
# Check that the Perl installation is complete enough to build
# host-autoconf.
if ! perl -e "require Data::Dumper" > /dev/null 2>&1 ; then
OpenPOWER on IntegriCloud