All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sam Ravnborg <sam@ravnborg.org>, Paul Mundt <lethal@linux-sh.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [GIT] kbuild
Date: Mon, 20 Apr 2009 03:49:54 +0100	[thread overview]
Message-ID: <20090420024954.GW26366@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20090420014158.GV26366@ZenIV.linux.org.uk>

On Mon, Apr 20, 2009 at 02:41:58AM +0100, Al Viro wrote:
> On Sun, Apr 19, 2009 at 05:52:32PM -0700, Linus Torvalds wrote:
> > 
> > 
> > On Mon, 20 Apr 2009, Sam Ravnborg wrote:
> > > 
> > > You will soon see a path from me where I fix sh too.
> > 
> > Can we do a global 'sed s:asm/asm-offsets.h:generated/asm-offsets.h:g' 
> > thing too? And then get rid of the include/asm symlink?
> > 
> > That asm-offsets.h mess is scary. I don't quite know why kvm on ia64 seems 
> > to do it's own asm-offsets.h file, for example. And arch/blackfin/Makefile 
> > mentions arch/$(ARCH)/include/asm/asm-offsets.h (but does it actually do 
> > one?).
> 
> We'll need to update uml as well (contents of shared/kern_constants.h)

BTW, while we are at it...  There's a way to deal with arch/um without
that kind of contortions, provided that we are willing to use -idirafter.

For the current tree the minimal patch would be just this, and after that
we can simply replace all kern_constants.h includes with asm/asm-offsets.h
or generated/asm-offsets.h.  And remove kern_constants.h completely once
that is done.

Moreover, once include/generated gets in, we can move user_constants.h
over there and lose the "add -I$(SHARED_HEADERS) to ARCH_INCLUDE for
O=... builds bit" in arch/um/Makefile as well.


diff --git a/arch/um/Makefile b/arch/um/Makefile
index 0728def..dce2d7f 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -47,7 +47,7 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE)
 
 USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
 	$(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
-	$(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64
+	$(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include
 
 include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
 
@@ -150,6 +150,6 @@ $(SHARED_HEADERS)/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s
 
 $(SHARED_HEADERS)/kern_constants.h:
 	$(Q)mkdir -p $(dir $@)
-	$(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@
+	$(Q)echo '#include <asm/asm-offsets.h>' >$@
 
 export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH

  reply	other threads:[~2009-04-20  2:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-19  9:25 [GIT] kbuild Sam Ravnborg
2009-04-19 22:39 ` Paul Mundt
2009-04-19 23:45   ` Sam Ravnborg
2009-04-20  0:52     ` Linus Torvalds
2009-04-20  1:41       ` Al Viro
2009-04-20  2:49         ` Al Viro [this message]
2009-04-20  4:45           ` Sam Ravnborg
2009-04-20  5:15             ` Al Viro
2009-04-20  8:24               ` Sam Ravnborg
2009-04-20  4:42       ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2010-07-07  9:08 Michal Marek
2010-07-07 16:41 ` Linus Torvalds
2010-07-08  5:47   ` Michal Marek
2010-03-08 14:34 Michal Marek
2009-09-21 17:56 Sam Ravnborg
2009-06-14 21:09 Sam Ravnborg
2009-05-01 10:15 Sam Ravnborg
2009-04-11 19:45 Sam Ravnborg
2009-03-18 19:35 Sam Ravnborg
2009-03-11 19:24 Sam Ravnborg
2009-02-17 21:11 Sam Ravnborg

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=20090420024954.GW26366@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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.