lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 02 Jul 2014 11:56:46 +0100
From:	David Howells <dhowells@...hat.com>
To:	torvalds@...ux-foundation.org
Cc:	dhowells@...hat.com, mmarek@...e.cz, sam@...nborg.org,
	linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: [PATCH] Fix compiler message generation

The following commit:

	commit 9da0763bdd82572be243fcf5161734f11568960f
	Author: Michal Marek <mmarek@...e.cz>
	Date:   Fri Apr 25 23:25:18 2014 +0200
	Subject: kbuild: Use relative path when building in a subdir of the source tree

makes compiler messages relative to the *build* tree if the build tree is a
subdirectory at the root of the source tree.

This is the wrong thing to do since the make command is issued in the *source*
tree and so any editor or IDE that issues the make command will likely expect
paths in warnings and errors to be relative either to the current directory at
the time the make was issued or to the directory in which make was run.

Certainly, this is something I'm seeing with emacs.  I do:

	LANG=C nice -19 make O=build -C /data/fs/linux-2.6-fscache -j4

And then I get error messages that look like:

	../fs/namei.c: In function 'SYSC_linkat':
	../fs/namei.c:4836:57: error: expected declaration specifiers before 'x'
		int, newdfd, const char __user *, newname, int, flags)x

which emacs can't find the source for because it doesn't relate to anything
emacs knows about.

As a temporary measure, fix this by substituting the full path of the source
as make knows it.

I suspect the correct fix from make's point of view is to issue the build
command in the build tree and use VPATH to refer to the source, but that would
likely involve making a lot of Makefiles and would involve a step equivalent
to autoconf - which is probably not what we want.

Signed-off-by: David Howells <dhowells@...hat.com>
cc: Michal Marek <mmarek@...e.cz>
cc: Sam Ravnborg <sam@...nborg.org>
---

 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/Makefile b/Makefile
index 1317563..def4a75 100644
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ ifeq ($(KBUILD_SRC),)
 else
         ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
                 # building in a subdirectory of the source tree
-                srctree := ..
+                srctree := $(realpath ..)
         else
                 srctree := $(KBUILD_SRC)
         endif

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ