[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Update configure.ac so that we don't need glibc when running
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] Update configure.ac so that we don't need glibc when running ./configure. |
Date: |
Mon, 9 Jan 2023 19:52:21 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Flavio Cruz, le dim. 08 janv. 2023 21:49:40 -0500, a ecrit:
> 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"}
AIUI we can then drop these from Makefile.am?
(better not duplicate flags, that most often leads to cargo cult).
> 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
>
>