diff options
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 357e8470..837d602e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,6 +72,11 @@ AM_CFLAGS += \ AM_CFLAGS += \ -fno-strict-aliasing +# We use a freestanding environment. +AM_CFLAGS += \ + -ffreestanding \ + -nostdlib + # The smashing stack protector might be enabled by default, but might emit # unsuitable code. if disable_smashing_stack_protector diff --git a/configure.ac b/configure.ac index bf74b88e..88f4d9a1 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,9 @@ if test -z "${CFLAGS+set}"; then # Use these CFLAGS by default if nothing is set. CFLAGS="-g -O2" fi -# We don't need glibc to compile gnumach. +saved_CFLAGS="$CFLAGS" +# We don't need glibc to compile gnumach so ensure we don't try to use it +# during configure. CFLAGS="$CFLAGS -ffreestanding -nostdlib" AC_CONFIG_AUX_DIR([build-aux]) @@ -268,6 +270,8 @@ AC_CONFIG_COMMANDS_POST([ [fi ]) + +CFLAGS="$saved_CFLAGS" # # Fire. # |