All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@vger.kernel.org, uclinux-dev@uclinux.org,
	Greg Ungerer <gerg@uclinux.org>
Subject: Re: [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles
Date: Mon, 15 Aug 2011 12:07:50 +1000	[thread overview]
Message-ID: <4E487F76.9060909@snapgear.com> (raw)
In-Reply-To: <CAMuHMdWKBP5waPOrOaHN2pbsUyrur07Ok2dHFiuZi2xzPmD2AQ@mail.gmail.com>

Hi Geert,

On 14/08/11 00:27, Geert Uytterhoeven wrote:
> On Thu, Aug 11, 2011 at 06:47,<gerg@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 Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

  reply	other threads:[~2011-08-15  2:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11  4:47 [PATCH] m68k: merge the mmu and non-mmu kernel/Makefiles gerg
2011-08-11  6:08 ` [uClinux-dev] " Sam Ravnborg
2011-08-11  6:45   ` Greg Ungerer
2011-08-13 14:27 ` Geert Uytterhoeven
2011-08-15  2:07   ` Greg Ungerer [this message]
2011-08-13 16:44 ` Andreas Schwab
2011-08-15  1:12   ` Greg Ungerer
  -- strict thread matches above, loose matches on Subject: below --
2011-06-23  2:08 gerg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E487F76.9060909@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=geert@linux-m68k.org \
    --cc=gerg@uclinux.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=uclinux-dev@uclinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.