public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: dhowells@redhat.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	paulus@samba.org, davem@davemloft.net, jaxboe@fusionio.com,
	tj@kernel.org, viro@zeniv.linux.org.uk,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] perf: Fix UAPI fallout
Date: Fri, 19 Oct 2012 14:35:37 +0100	[thread overview]
Message-ID: <30780.1350653737@warthog.procyon.org.uk> (raw)
In-Reply-To: <20121014085617.GA22544@gmail.com>

Ingo Molnar <mingo@kernel.org> wrote:

> What we want in .c files are not ../.. inclusions but the 
> 'seemless' <linux/abc.h> inclusions. Which is the overwhelming 
> majority, gladly. Do we want to make that the 100% majority?

I think this is going to be necessary for when x86 gets merged.  x86's
asm/unistd.h #includes uapi/asm/unistd.h, so you can't manually specify the
header without also specifying a -I flag.

I've been having a prod at it, and this seems to partially work:

	-BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)util -I$(TRACE_EVENT_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
	+$(info XXX $(srctree))
	+
	+BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I../../arch/$(ARCH)/include -I$(OUTPUT)util -I$(TRACE_EVENT_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE

However, I'm trying to work out what will happen if this is run in a separate
output dir, but if I do:

	make tools/perf O=build_dir

from the bottom directory, I get:

	scripts/Makefile.include:2: *** O=build_dir does not exist.  Stop.

The problem is that the bottom-level Makefile does this:

	tools/: FORCE
		$(Q)$(MAKE) LDFLAGS= MAKEFLAGS= -C $(src)/tools/
	tools/%: FORCE
		$(Q)$(MAKE) LDFLAGS= MAKEFLAGS= -C $(src)/tools/ $*

which changes the directory, rendering a relative O= that would be good for
building the normal kernel useless for building a tool.  Should these rules
respecify the O= flag here, or should we give an error if someone tries it?

David

  parent reply	other threads:[~2012-10-19 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13 10:48 [GIT PULL] UAPI disintegration for include/linux/{,byteorder/}*.h David Howells
2012-10-14  0:34 ` Linus Torvalds
2012-10-14  8:56   ` [PATCH] perf: Fix UAPI fallout Ingo Molnar
2012-10-14 15:38     ` David Miller
2012-10-15  8:56     ` David Howells
2012-10-19 13:35     ` David Howells [this message]
2012-10-15  8:52   ` [GIT PULL] UAPI disintegration for include/linux/{,byteorder/}*.h 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=30780.1350653737@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.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