From: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
To: linux-kernel@vger•kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
stable@vger•kernel.org,
Sudip Mukherjee <sudipm.mukherjee@gmail•com>,
Josh Poimboeuf <jpoimboe@redhat•com>,
Andrew Morton <akpm@linux-foundation•org>,
Jiri Olsa <jolsa@kernel•org>,
Linus Torvalds <torvalds@linux-foundation•org>,
Peter Zijlstra <peterz@infradead•org>,
Stephen Rothwell <sfr@canb•auug.org.au>,
Thomas Gleixner <tglx@linutronix•de>,
linux-next@vger•kernel.org, linux@roeck-us•net,
live-patching@vger•kernel.org, Ingo Molnar <mingo@kernel•org>
Subject: [PATCH 4.4 17/73] tools: Support relative directory path for O=
Date: Wed, 28 Sep 2016 11:04:47 +0200 [thread overview]
Message-ID: <20160928090435.763757231@linuxfoundation.org> (raw)
In-Reply-To: <20160928090434.509091655@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <jpoimboe@redhat•com>
commit e17cf3a80d4ba0c4e40bf1a89deb1354c2e10e14 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -1506,11 +1506,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
# ---------------------------------------------------------------------------
parent reply other threads:[~2016-09-28 9:06 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20160928090434.509091655@linuxfoundation.org>]
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=20160928090435.763757231@linuxfoundation.org \
--to=gregkh@linuxfoundation$(echo .)org \
--cc=akpm@linux-foundation$(echo .)org \
--cc=jolsa@kernel$(echo .)org \
--cc=jpoimboe@redhat$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linux@roeck-us$(echo .)net \
--cc=live-patching@vger$(echo .)kernel.org \
--cc=mingo@kernel$(echo .)org \
--cc=peterz@infradead$(echo .)org \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=stable@vger$(echo .)kernel.org \
--cc=sudipm.mukherjee@gmail$(echo .)com \
--cc=tglx@linutronix$(echo .)de \
--cc=torvalds@linux-foundation$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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