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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=VbR8GZ7V3RfDRRt_fFXa9aZK6joGgYPOMWTSVbhyvi3A@mail.gmail.com>
Date:	Mon, 7 Jul 2014 17:01:34 -0700
From:	Doug Anderson <dianders@...omium.org>
To:	Michal Marek <mmarek@...e.cz>
Cc:	David Howells <dhowells@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	sam@...nborg.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-kbuild@...r.kernel.org, Boaz Harrosh <boaz@...xistor.com>,
	Olof Johansson <olof@...om.net>,
	Andrew Bresticker <abrestic@...omium.org>,
	Mike Frysinger <vapier@...too.org>,
	Sonny Rao <sonnyrao@...omium.org>
Subject: Re: [PATCH] Fix compiler message generation

Michal

On Fri, Jul 4, 2014 at 5:38 AM, Michal Marek <mmarek@...e.cz> wrote:
> On Wed, Jul 02, 2014 at 02:34:10PM +0100, David Howells wrote:
>> Michal Marek <mmarek@...e.cz> wrote:
>>
>> > From 5b59dcacf358f143b9fb39d2f788142ab9ba3e00 Mon Sep 17 00:00:00 2001
>> > From: Michal Marek <mmarek@...e.cz>
>> > Date: Wed, 2 Jul 2014 14:28:26 +0200
>> > Subject: [PATCH] kbuild: Print the name of the build directory
>> >
>> > With commit 9da0763b (kbuild: Use relative path when building in a
>> > subdir of the source tree), the compiler messages include relative
>> > paths. These are however relative to the build directory, not the
>> > directory where make was started. Print the "Entering directory ..."
>> > message once, so that IDEs/editors can find the source files.
>> >
>> > Signed-off-by: Michal Marek <mmarek@...e.cz>
>> > ---
>> >  Makefile | 3 +++
>> >  1 file changed, 3 insertions(+)
>> >
>> > diff --git a/Makefile b/Makefile
>> > index 97b2861..40544a0 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -126,7 +126,10 @@ PHONY += $(MAKECMDGOALS) sub-make
>> >  $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
>> >     @:
>> >
>> > +# Fake the "Entering directory" message once, so that IDEs/editors are
>> > +# able to understand relative filenames.
>> >  sub-make: FORCE
>> > +   @echo "make[1]: Entering directory \`$(KBUILD_OUTPUT)'"
>> >     $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
>> >     KBUILD_SRC=$(CURDIR) \
>> >     KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \
>>
>> Works for me with emacs.
>>
>> Acked-by: David Howells <dhowells@...hat.com>
>
> I found a regression today... after I had sent a pull request to Linus
> yesterday :-/. The message is also printed by 'make -s', which is not
> what the user expects from a silent mode. The following patch fixes it:
>
>
> From 066b7ed9558087a7957a1128f27d7a3462ff117f Mon Sep 17 00:00:00 2001
> From: Michal Marek <mmarek@...e.cz>
> Date: Fri, 4 Jul 2014 14:29:30 +0200
> Subject: [PATCH] kbuild: Do not print the build directory with make -s
>
> Commit c2e28dc9 (kbuild: Print the name of the build directory) prints
> the name of the build directory for O= builds, but we should not be
> doing this in make -s mode, so that commands like
>
>   make -s O=<dir> kernelrelease
>
> can be used by scripts. This matches the behavior of make itself, where
> the -s option implies --no-print-directory.
>
> Signed-off-by: Michal Marek <mmarek@...e.cz>
> ---
>  Makefile | 97 +++++++++++++++++++++++++++++++++-------------------------------
>  1 file changed, 50 insertions(+), 47 deletions(-)

This fixes the build error I was running into.  Our build system
effectively calls "make -s kernelrelease" and was getting tripped up.
I haven't extensively reviewed your fix but I have tested it.

Tested-by: Doug Anderson <dianders@...omium.org>
--
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