Re: [patch] Re: Kernels > 2.6.1-mm3 do not boot. - SOLVED

From: Andrew Morton
Date: Tue Jan 27 2004 - 18:51:58 EST


Andi Kleen <ak@xxxxxx> wrote:
>
> > I'll turn it on for gcc-3.3 and higher. We can change that if someone has
> > tested earlier compilers.
>
> Earlier compilers never supported -funit-at-a-time. The option
> was first implemented in gcc 3.3-hammer and later merged into 3.4.

OK, then let's use check-gcc again.

> > Also, I do think this should remain a per-arch decision. Other
> > architectures could well have similar problems to this and we don't want to
> > be mysteriously breaking their kernels for them.
>
> That's fine by me. While you're at it could you enable it for x86-64 too?

yup.


diff -puN arch/i386/Makefile~use-funit-at-a-time arch/i386/Makefile
--- 25/arch/i386/Makefile~use-funit-at-a-time Tue Jan 27 15:40:09 2004
+++ 25-akpm/arch/i386/Makefile Tue Jan 27 15:42:26 2004
@@ -73,6 +73,10 @@ cflags-$(CONFIG_X86_ELAN) := -march=i486
GCC_VERSION := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
cflags-$(CONFIG_REGPARM) += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)

+# Enable unit-at-a-time mode when possible. It shrinks the
+# kernel considerably.
+CFLAGS += $(call check_gcc,-funit-at-a-time,)
+
CFLAGS += $(cflags-y)

# Default subarch .c files
diff -puN arch/x86_64/Makefile~use-funit-at-a-time arch/x86_64/Makefile
--- 25/arch/x86_64/Makefile~use-funit-at-a-time Tue Jan 27 15:42:34 2004
+++ 25-akpm/arch/x86_64/Makefile Tue Jan 27 15:44:44 2004
@@ -52,7 +52,10 @@ CFLAGS += -Wno-sign-compare
ifneq ($(CONFIG_DEBUG_INFO),y)
CFLAGS += -fno-asynchronous-unwind-tables
endif
-#CFLAGS += $(call check_gcc,-funit-at-a-time,)
+
+# Enable unit-at-a-time mode when possible. It shrinks the
+# kernel considerably.
+CFLAGS += $(call check_gcc,-funit-at-a-time,)

head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o


_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/