public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Josh Poimboeuf <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, torvalds@linux-foundation.org,
	jpoimboe@redhat.com, hpa@zytor.com, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, sudipm.mukherjee@gmail.com,
	mingo@kernel.org, akpm@linux-foundation.org, jolsa@kernel.org,
	sfr@canb.auug.org.au
Subject: [tip:core/objtool] tools: Support relative directory path for 'O='
Date: Thu, 3 Mar 2016 08:52:28 -0800	[thread overview]
Message-ID: <tip-e17cf3a80d4ba0c4e40bf1a89deb1354c2e10e14@git.kernel.org> (raw)
In-Reply-To: <94a078c6c998fac9f01a14f574008bf7dff40191.1457016803.git.jpoimboe@redhat.com>

Commit-ID:  e17cf3a80d4ba0c4e40bf1a89deb1354c2e10e14
Gitweb:     http://git.kernel.org/tip/e17cf3a80d4ba0c4e40bf1a89deb1354c2e10e14
Author:     Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Thu, 3 Mar 2016 08:53:43 -0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 3 Mar 2016 16:13:00 +0100

tools: Support relative directory path for 'O='

Running "make O=foo" (with a relative directory path) fails with:

  scripts/Makefile.include:3: *** O=foo does not exist.  Stop.
  /home/jpoimboe/git/linux/Makefile:1547: recipe for target 'tools/objtool' failed

The tools Makefile gets confused by the relative path and tries to build
objtool in tools/foo.  Convert the output directory to an absolute path
before passing it to the tools Makefile.

Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-next@vger.kernel.org
Cc: linux@roeck-us.net
Cc: live-patching@vger.kernel.org
Link: http://lkml.kernel.org/r/94a078c6c998fac9f01a14f574008bf7dff40191.1457016803.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 62be03b..2c27a01 100644
--- a/Makefile
+++ b/Makefile
@@ -1509,11 +1509,11 @@ image_name:
 # Clear a bunch of variables before executing the submake
 tools/: FORCE
 	$(Q)mkdir -p $(objtree)/tools
-	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/
+	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/
 
 tools/%: FORCE
 	$(Q)mkdir -p $(objtree)/tools
-	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ $*
+	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ $*
 
 # Single targets
 # ---------------------------------------------------------------------------

  reply	other threads:[~2016-03-03 16:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03  6:09 linux-next: Tree for Mar 3 Stephen Rothwell
2016-03-03 11:00 ` Sudip Mukherjee
2016-03-03 11:18   ` Sudip Mukherjee
2016-03-03 14:35     ` Josh Poimboeuf
2016-03-03 14:53       ` [PATCH] tools: Support relative directory path for 'O=' Josh Poimboeuf
2016-03-03 16:52         ` tip-bot for Josh Poimboeuf [this message]
2016-03-03 17:39       ` [PATCH] objtool: Warn if libelf is missing Josh Poimboeuf
2016-03-04 11:21         ` [tip:core/objtool] objtool: Detect and warn if libelf is missing anddon't break the build tip-bot for Josh Poimboeuf
2016-03-05  8:24         ` [tip:core/objtool] objtool: Detect and warn if libelf is missing and don't " tip-bot for Josh Poimboeuf
2016-03-03 12:04   ` linux-next: Tree for Mar 3 Guenter Roeck

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=tip-e17cf3a80d4ba0c4e40bf1a89deb1354c2e10e14@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=sudipm.mukherjee@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox