All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Dan Aloni <da-x@colinux.org>
Cc: 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 20:33:47 +0200	[thread overview]
Message-ID: <20040813183347.GA9098@mars.ravnborg.org> (raw)
In-Reply-To: <20040813092426.GA27895@callisto.yi.org>

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.

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.

Thanks,

	Sam

  reply	other threads:[~2004-08-13 18:31 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 [this message]
2004-08-13 19:09           ` Dan Aloni
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=20040813183347.GA9098@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=benjl@cse.unsw.edu.au \
    --cc=da-x@colinux.org \
    --cc=linux-kernel@vger.kernel.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.