For x86_64-pc-gnu we still do not have a working glibc so ./configure will fail under a freestanding environment. We force ./configure to avoid running compiled C programs as a test which it is not needed when compiling a kernel. --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/configure.ac b/configure.ac index 3aaa935c..06a243a2 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,9 @@ AC_INIT([AC_PACKAGE_NAME], [AC_PACKAGE_VERSION], [AC_PACKAGE_BUGREPORT], [AC_PACKAGE_TARNAME]) AC_CONFIG_SRCDIR([kern/ipc_kobject.c]) +# We don't need glibc to compile gnumach. +: ${CFLAGS="-ffreestanding -nostdlib"} + AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE( @@ -79,7 +82,12 @@ AC_SUBST([systype]) # AC_PROG_AWK +# Temporarily force cross compiling mode to make sure the configure script +# does not try to run compiled binaries. +save_cross_compiling=$cross_compiling +cross_compiling=yes AM_PROG_AS +cross_compiling=$save_cross_compiling AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL -- 2.39.0