diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 7b7247c5..fb557ba6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,7 +43,7 @@ AM_LDFLAGS = GCC_INSTALL = $(shell LANG=C gcc -print-search-dirs | sed -n -e 's/install: \(.*\)/\1/p') AM_CPPFLAGS += \ - -ffreestanding -nostdinc -imacros config.h -I $(GCC_INSTALL)/include + -imacros config.h -I $(GCC_INSTALL)/include AM_CPPFLAGS += \ -I$(systype) \ @@ -181,7 +181,7 @@ MOSTLYCLEANFILES += gnumach-undef-bad libgcc-routines.o: gnumach-undef gnumach-undef-bad $(AM_V_at) if test -s gnumach-undef-bad; \ then cat gnumach-undef-bad; exit 2; else true; fi - $(AM_V_CCLD) $(CCLD) $(LDFLAGS) -nostdlib -nostartfiles -r -static \ + $(AM_V_CCLD) $(CCLD) $(LDFLAGS) -r -static \ -o $@ `sed 's/^/-Wl,-u,/' < $<` -x c /dev/null -lgcc @if nm $@ | grep __init_cpu_features; \ then echo "Please install a 32bit libc without multiarch support (on Debian systems, the libc6-dev:i386 package containing /usr/lib/i386-linux-gnu/libc.a)". ; \ diff --git a/configure.ac b/configure.ac index 3aaa935c..8f10b5d5 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="$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 |