mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: jdike@addtoit.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] get rid of the last symlink in uml build
Date: Wed, 17 Dec 2008 09:55:39 +0100	[thread overview]
Message-ID: <20081217085539.GA4152@uranus.ravnborg.org> (raw)
In-Reply-To: <20081217083734.GA28946@ZenIV.linux.org.uk>

On Wed, Dec 17, 2008 at 08:37:34AM +0000, Al Viro wrote:
> On Wed, Dec 17, 2008 at 08:26:20AM +0100, Sam Ravnborg wrote:
> > On Wed, Dec 17, 2008 at 06:12:50AM +0000, Al Viro wrote:
> > > 	We need to make asm-offsets.h contents visible for objects built
> > > with userland headers.  Instead of creating a symlink, just have the
> > > file with equivalent include (relative to location of header) created
> > > once.
> > > 
> > > 	That kills the last symlink used in arch/um builds.  Have fun...
> > 
> > great!
> > Soon we have no more symlinks generated for a kernel build.
> > um used to be the worst of all but you have fixed it all up now.
> > 
> > Minor comment below.
> 
> > > -archprepare: $(ARCH_DIR)/include/shared/user_constants.h
> > > -prepare: $(ARCH_DIR)/include/shared/kern_constants.h
> > > +archprepare: $(SHARED_HEADERS)/user_constants.h
> > > +prepare: $(SHARED_HEADERS)/kern_constants.h
> > 
> > arch Makefiles should rely solely on the archprepare target.
> > That cleanup could come later as it is independent from
> > the purpose of this patch.
> 
> Actually, taking both to archprepare would work fine.  kern_constants.h
> used to be generated in very interesting ways before it became a copy
> of asm-offsets.h and that's what lead to this mess.
> 
> These days we can safely take the rudiments out.  Note that asm-offsets.h
> generation doesn't care about that file, be it a symlink or #include "....",
> for obvious reasons and neither does generation of user_constants.h.
> 
> The only remaining constraints are
> 	* asm-offsets.s needs user_constants.h already created.

This is guaranteed by:

    archprepare: $(SHARED_HEADERS)/user_constants.h

as everything dependent on archprepare are completed before we start
building asm-offsets.h


> 	* we want kern_constants.h available during the build itself (i.e.
> at the same kind of places where asm-offsets.h could be used).

This is guaranteed by:

    archprepare: $(SHARED_HEADERS)/kern_constants.h

because we complete all *prepare targets before we start the actual kernel build.

But I guess you already had analysed this and therefore knew this.

> AFAICS, having archprepare depend on user_constants.h and kern_constants.h
> would do just fine.  Note that we don't care how these two are ordered;
> it's asm-offsets.h that can't be created without user_constants.h.

Agreed.

Previously we had some race issues in the arch Makefile when they used
the prepare target and they were workaround in various ways.
This was why we introduced archprepare in the first place IIRC.
And I also recall that um was starnge but this is all cleaned up now - good.

	Sam

  reply	other threads:[~2008-12-17  8:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17  6:12 Al Viro
2008-12-17  7:26 ` Sam Ravnborg
2008-12-17  8:37   ` Al Viro
2008-12-17  8:55     ` Sam Ravnborg [this message]
2008-12-17  9:10       ` Al Viro
2008-12-17 11:27         ` Sam Ravnborg
2008-12-17 17:02           ` Al Viro
2008-12-17 17:18             ` Sam Ravnborg
2008-10-06  7:03               ` Greg Ungerer
2009-01-12 10:16                 ` Sam Ravnborg
2008-12-17 17:33               ` Al Viro
2008-12-17 17:35             ` David Howells

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=20081217085539.GA4152@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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

all inboxes | Powered by JetHome®