linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Weinberger <richard.weinberger@gmail.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Michal Marek <michal.lkml@markovi.net>
Subject: Re: [PATCH v2 3/5] kbuild: Use relative path for $(objtree)
Date: Wed, 25 Oct 2017 21:21:48 +0900	[thread overview]
Message-ID: <CAK7LNAT8xu5UCsC3Y4GAjw6L-AT6O1RiEMM6YQCNVNFrDfh7cg@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdW8wT4NufHMS-AHGHf92VS-uBSHh=frTKGU60rHHszMrg@mail.gmail.com>

Hi Geert,

(+CC Michal's new address)


2017-10-16 19:26 GMT+09:00 Geert Uytterhoeven <geert@linux-m68k.org>:
> Hi Michal,
>
> On Thu, Jun 5, 2014 at 5:56 PM, Michal Marek <mmarek@suse.cz> wrote:
>> On Wed, Jun 04, 2014 at 03:12:33PM +0200, Michal Marek wrote:
>>> On 2014-06-04 11:43, Michal Marek wrote:
>>> > On 2014-06-04 11:03, Richard Weinberger wrote:
>>> >> To reproduce run:
>>> >> make defconfig ARCH=um O=/mnt/o && make linux ARCH=um O=/mnt/
>>> >>
>>> >> If there is anything in UML which needs fixing, please tell. :-)
>>> >
>>> > I'll have a look, thanks for the report.
>>>
>>> Findings so far: For some reason, syscalls_32.h is generated in the
>>> source tree (which is wrong) and syscalls_64.h is not generated at all.
>>> Looking further.
>>
>> Can you try the below patch? The same pattern is used in the rules for
>> tools/ and tools/% in the main Makefile, need to look into that as well.
>> But UML should work now.
>>
>> Michal
>>
>> From d4bc590f8716f7dde6b7bca319097ac30a8cb0b4 Mon Sep 17 00:00:00 2001
>> From: Michal Marek <mmarek@suse.cz>
>> Date: Thu, 5 Jun 2014 17:44:44 +0200
>> Subject: [PATCH] um: Fix for relative objtree when generating x86 headers
>>
>> In an O= build, rely on the generated Makefile to call the main Makefile
>> properly. When building in the source tree, we do not need to specify
>> the -C and O= either. This fixes the problem when $(objtree) is a
>> relative path and the -C changes the directory.
>>
>> Reported-by: Richard Weinberger <richard.weinberger@gmail.com>
>> Signed-off-by: Michal Marek <mmarek@suse.cz>
>> ---
>>  arch/um/Makefile | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/arch/um/Makefile b/arch/um/Makefile
>> index 36e658a..e4b1a96 100644
>> --- a/arch/um/Makefile
>> +++ b/arch/um/Makefile
>> @@ -111,8 +111,7 @@ endef
>>  KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig
>>
>>  archheaders:
>> -       $(Q)$(MAKE) -C '$(srctree)' KBUILD_SRC= \
>> -               ARCH=$(HEADER_ARCH) O='$(objtree)' archheaders
>> +       $(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders
>>
>>  archprepare: include/generated/user_constants.h
>
> This now commit d4bc590f8716f7dd ("um: Fix for relative objtree when
> generating x86 headers").
>
> When using O=, the build enters an infinite loop on v4.14-rc5.


Strange. I can not reproduce this.

For example, the following command works fine for me.

make ARCH=um  O=foo/bar  defconfig all


Could you share the command you input?



> With V=1:
>
>     make KBUILD_SRC= ARCH=x86 archheaders
>     make -C /scratch/geert/linux/linux
> O=/scratch/geert/build/linux-uml-amd64/. archheaders
>     make -C /scratch/geert/build/linux-uml-amd64
> KBUILD_SRC=/scratch/geert/linux/linux \
>     -f /scratch/geert/linux/linux/Makefile archheaders
>     make KBUILD_SRC= ARCH=x86 archheaders
>     make -C /scratch/geert/linux/linux
> O=/scratch/geert/build/linux-uml-amd64/. archheaders
>     make -C /scratch/geert/build/linux-uml-amd64
> KBUILD_SRC=/scratch/geert/linux/linux \
>     -f /scratch/geert/linux/linux/Makefile archheaders
>     ...
>
> As it's been a (long) while I buily UML, I started a bisect, which pointed to
> the commit above.
> The problem actually already happened on commit d4bc590f8716f7dd, so this
> has been broken since v3.16:
>
>     make KBUILD_SRC= ARCH=x86 archheaders
>     make -C /scratch/geert/linux/linux
> O=/scratch/geert/build/linux-uml-amd64/. archheaders
>     make -C /scratch/geert/build/linux-uml-amd64 \
>     KBUILD_SRC=/scratch/geert/linux/linux \
>     KBUILD_EXTMOD="" -f /scratch/geert/linux/linux/Makefile \
>     archheaders
>     make KBUILD_SRC= ARCH=x86 archheaders
>     make -C /scratch/geert/linux/linux
> O=/scratch/geert/build/linux-uml-amd64/. archheaders
>     make -C /scratch/geert/build/linux-uml-amd64 \
>     KBUILD_SRC=/scratch/geert/linux/linux \
>     KBUILD_EXTMOD="" -f /scratch/geert/linux/linux/Makefile \
>     archheaders
>     ...
>
> Unfortunately reverting that commit doesn't help, as that causes the
> failure that
> commit was supposed to fix:
>
>     /scratch/geert/linux/linux/arch/x86/um/user-offsets.c:19:29: fatal
> error: asm/syscalls_64.h: No such file or directory
>      #include <asm/syscalls_64.h>
>                                  ^
>     compilation terminated.
>     /scratch/geert/linux/linux/scripts/Makefile.build:154: recipe for
> target 'arch/x86/um/user-offsets.s' failed
>
> Do you have any clue? Thanks!
>
> Gr{oetje,eeting}s,



-- 
Best Regards
Masahiro Yamada

  parent reply	other threads:[~2017-10-25 12:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 12:52 [PATCH v2 0/5] kbuild: Use relative paths if possible Michal Marek
2014-05-09 12:52 ` [PATCH v2 1/5] firmware: Simplify directory creation Michal Marek
2014-05-09 16:51   ` Sam Ravnborg
2014-05-14 20:53     ` Michal Marek
2014-05-09 12:52 ` [PATCH v2 2/5] firmware: Use $(quote) in the Makefile Michal Marek
2014-05-09 12:52 ` [PATCH v2 3/5] kbuild: Use relative path for $(objtree) Michal Marek
2014-06-04  9:03   ` Richard Weinberger
2014-06-04  9:43     ` Michal Marek
2014-06-04 13:12       ` Michal Marek
2014-06-05 15:56         ` Michal Marek
2014-06-09 21:12           ` Michal Marek
2014-06-09 21:23           ` Randy Dunlap
2014-06-09 22:14             ` Michal Marek
2014-06-09 22:24               ` Randy Dunlap
2014-06-09 22:39                 ` Michal Marek
2014-06-09 23:47                   ` Randy Dunlap
2014-06-10  9:02                     ` Michal Marek
2014-06-10 14:09                       ` Randy Dunlap
2014-06-10 14:30                         ` Michal Marek
2014-06-10  7:40           ` Geert Uytterhoeven
2014-06-10  8:17             ` Michal Marek
2017-10-16 10:26           ` Geert Uytterhoeven
2017-10-16 10:28             ` Geert Uytterhoeven
2017-10-25 12:21             ` Masahiro Yamada [this message]
2014-05-09 12:52 ` [PATCH v2 4/5] kbuild: Use relative path when building in the source tree Michal Marek
2014-05-09 12:52 ` [PATCH v2 5/5] kbuild: Use relative path when building in a subdir of " Michal Marek

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=CAK7LNAT8xu5UCsC3Y4GAjw6L-AT6O1RiEMM6YQCNVNFrDfh7cg@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=rdunlap@infradead.org \
    --cc=richard.weinberger@gmail.com \
    --cc=sam@ravnborg.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;
as well as URLs for NNTP newsgroup(s).