[uClinux-dev] Re: [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles

2011-08-14 Thread Greg Ungerer

Hi Andreas,

On 14/08/11 02:44, Andreas Schwab wrote:

g...@snapgear.com  writes:


+obj-y$(CONFIG_MMU_SUN3) += dma.o   # no, it's not a typo


I'd rather put ifndef CONFIG_MMU_SUN3 around it.


I agree. It is much more obvious what it is doing with the ifndef.
I'll change it over to that.

Regards
Greg



Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles

2011-08-14 Thread Greg Ungerer

Hi Geert,

On 14/08/11 00:27, Geert Uytterhoeven wrote:

On Thu, Aug 11, 2011 at 06:47,g...@snapgear.com  wrote:

--- a/arch/m68k/kernel/Makefile
+++ b/arch/m68k/kernel/Makefile
@@ -1,5 +1,20 @@
-ifdef CONFIG_MMU
-include arch/m68k/kernel/Makefile_mm
-else
-include arch/m68k/kernel/Makefile_no
+#
+# Makefile for the linux kernel.
+#
+
+extra-$(CONFIG_MMU) := head.o
+extra-$(CONFIG_SUN3) := sun3-head.o
+extra-y += vmlinux.lds
+
+obj-y := entry.o m68k_ksyms.o process.o ptrace.o setup.o signal.o \
+ sys_m68k.o syscalltable.o time.o traps.o
+
+obj-y$(CONFIG_MMU_SUN3) += dma.o  # no, it's not a typo
+obj-$(CONFIG_MMU) += ints.o module.o devres.o


On MMU, we unconditionally build module.c.


+devres-$(CONFIG_MMU)  = ../../../kernel/irq/devres.o
+
+ifndef CONFIG_MMU
+obj-y += init_task.o irq.o
+obj-$(CONFIG_MODULES) += module.o


On nommu, it depends on CONFIG_MODULES.

However, most inside module.c is already protected by #ifdef CONFIG_MODULES.
Except for module_fixup(), which is empty for nommu. After moving the whole
module_fixup() inside #ifdef CONFIG_MMU, you can consolidate the module.o
entry in the Makefile.


Actually you don't even need to modify module.c to always build
at the moment. I can move to always building module.o, it costs
an extra 2 bytes in the final non-MMU/no-modules case :-)

Regards
Greg



Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles

2011-08-13 Thread Geert Uytterhoeven
On Thu, Aug 11, 2011 at 06:47,  g...@snapgear.com wrote:
 --- a/arch/m68k/kernel/Makefile
 +++ b/arch/m68k/kernel/Makefile
 @@ -1,5 +1,20 @@
 -ifdef CONFIG_MMU
 -include arch/m68k/kernel/Makefile_mm
 -else
 -include arch/m68k/kernel/Makefile_no
 +#
 +# Makefile for the linux kernel.
 +#
 +
 +extra-$(CONFIG_MMU)    := head.o
 +extra-$(CONFIG_SUN3)   := sun3-head.o
 +extra-y                        += vmlinux.lds
 +
 +obj-y  := entry.o m68k_ksyms.o process.o ptrace.o setup.o signal.o \
 +          sys_m68k.o syscalltable.o time.o traps.o
 +
 +obj-y$(CONFIG_MMU_SUN3) += dma.o       # no, it's not a typo
 +obj-$(CONFIG_MMU)      += ints.o module.o devres.o

On MMU, we unconditionally build module.c.

 +devres-$(CONFIG_MMU)   = ../../../kernel/irq/devres.o
 +
 +ifndef CONFIG_MMU
 +obj-y                  += init_task.o irq.o
 +obj-$(CONFIG_MODULES)   += module.o

On nommu, it depends on CONFIG_MODULES.

However, most inside module.c is already protected by #ifdef CONFIG_MODULES.
Except for module_fixup(), which is empty for nommu. After moving the whole
module_fixup() inside #ifdef CONFIG_MMU, you can consolidate the module.o
entry in the Makefile.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say programmer or something like that.
                                -- Linus Torvalds
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev