public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Aloni <da-x@colinux.org>
To: Sam Ravnborg <sam@ravnborg.org>, Benno <benjl@cse.unsw.edu.au>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild)
Date: Fri, 13 Aug 2004 22:09:53 +0300	[thread overview]
Message-ID: <20040813190953.GA14504@callisto.yi.org> (raw)
In-Reply-To: <20040813183347.GA9098@mars.ravnborg.org>

On Fri, Aug 13, 2004 at 08:33:47PM +0200, Sam Ravnborg wrote:
> On Fri, Aug 13, 2004 at 12:24:26PM +0300, Dan Aloni wrote:
> > diff -urN linux-2.6.7/scripts/Makefile.build linux-2.6.7-work/scripts/Makefile.build
> > --- linux-2.6.7/scripts/Makefile.build	2004-08-13 12:18:52.000000000 +0300
> > +++ linux-2.6.7-work/scripts/Makefile.build	2004-08-13 12:19:00.000000000 +0300
> > @@ -194,11 +194,11 @@
> >  $(real-objs-m)      : modkern_aflags := $(AFLAGS_MODULE)
> >  $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
> >  
> > -quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
> > -cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
> > +quiet_cmd_as_lds_lds_S = CPP $(quiet_modtag) $@
> > +cmd_as_lds_lds_S       = $(CPP) $(a_flags)   -o $@ $< 
> >  
> > -%.s: %.S FORCE
> > -	$(call if_changed_dep,as_s_S)
> > +%.lds: %.lds.S FORCE
> > +	$(call if_changed_dep,as_lds_lds_S)
> 
> 
> This is not good.
> The .S -> .s is used for assembly.

Actually the only rule I saw that is being used for 
assembly is the .S -> .o rule (examples under 
arch/i386/kernel).
 
> An additional rule is needed:
> 
> Something like:
> quiet_cmd_cpp_lds_S    = LDS    $@
>       cmd_cpp_lds_S    = $(CPP) $(cpp_flags) -o $@ $<
> 
> %.lds: %.lds.S FORCE
> 	$(call if_changed_dep,cpp_lds_S)
>
> Adding a new rule it no longer are acceptable to misuse
> AFLAGS for this. So you have to add support for a new
> set of flags.
> Better name them with CPP so they can be used for other
> preprocessings tasks later if needed.
> 
> So in Makefile.lib you need to add cpp_flags like a_flags
> but using CPPFLAGS, EXTRA_CPPFLAGS, and CPPFLAGS_@
> 
> Try building a clean kernel after implementing this.

Okay, I'll send a patch when it's ready.

-- 
Dan Aloni
da-x@colinux.org

  reply	other threads:[~2004-08-13 19:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-12 19:25 Generation of *.s files from *.S files in kbuild Dan Aloni
2004-08-13  0:37 ` Benno
2004-08-13  5:04   ` Sam Ravnborg
2004-08-13  8:09     ` [PATCH 1/2] " Dan Aloni
2004-08-13  9:24       ` [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild) Dan Aloni
2004-08-13 18:33         ` Sam Ravnborg
2004-08-13 19:09           ` Dan Aloni [this message]
2004-08-13 19:17             ` Sam Ravnborg
2004-08-14 19:46           ` [PATCH] [#3 1/2] Generate vmlinux.lds instead of vmlinux.lds.s Dan Aloni
2004-08-15 18:35             ` Sam Ravnborg
2004-08-14 19:49           ` [PATCH] [#3 2/2] " Dan Aloni
2004-08-13  8:12     ` Generation of *.s files from *.S files in kbuild Dan Aloni

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=20040813190953.GA14504@callisto.yi.org \
    --to=da-x@colinux.org \
    --cc=benjl@cse.unsw.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox