Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Devoogdt <thomas@devoogdt.com>
Cc: Daniel Lang <dalang@gmx.at>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2, next] package/llvm-project/compiler-rt: fix circular dependency warning
Date: Mon, 14 Aug 2023 13:23:36 +0200	[thread overview]
Message-ID: <20230814112336.GC421096@scaer> (raw)
In-Reply-To: <20230814063639.1145396-1-thomas@devoogdt.com>

Thomas, All,

On 2023-08-14 08:36 +0200, Thomas Devoogdt spake thusly:
> make[4]: Circular include/sanitizer/allocator_interface.h <- include/sanitizer/allocator_interface.h dependency dropped.
> make[4]: Circular include/sanitizer/asan_interface.h <- include/sanitizer/asan_interface.h dependency dropped.
[--SNIP--]
> It's not clear why this cycle happens,

Well, it is rather easy to understand:

  - include/CMakeLists.txt unconditionally declares dependency rules
    between header files in ${output_dir} and ${CMAKE_CURRENT_SOURCE_DIR}
    without provision for them to be the same directories;

  - this triggers the above warnings from make, hich arbitrarily breaks
    circular dependencies, which in our case happens to be OK.

See how I extended the commit log for more details.

And this is actually a fix for an issue that already happens on master.
So: applied to master, thanks.

Regards,
Yann E. MORIN.

> but compiler-rt also proposes to
> create a separate build folder on their site: https://compiler-rt.llvm.org/.
> 
> Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
> ---
> v2:
>   - This patch was orignally submitted to fix the ninja build, which does a hard assert on circular dependencies.
>     Make is less strict on it, and retries with arbitrary dropping dependencies. The oringal git message was wrong
>     to mention that it fixes the ninja build since ninja is not enabled by default anyway. So in v2, I just
>     changed the git message to only mention the circular dependency warning.
> 
>   - Original Ninja error:
> 
>   ninja: error: dependency cycle: include/sanitizer/allocator_interface.h -> include/sanitizer/allocator_interface.h
> 
> ---
>  package/llvm-project/compiler-rt/compiler-rt.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/llvm-project/compiler-rt/compiler-rt.mk b/package/llvm-project/compiler-rt/compiler-rt.mk
> index 03dc76eaea..5d9c3d8fa8 100644
> --- a/package/llvm-project/compiler-rt/compiler-rt.mk
> +++ b/package/llvm-project/compiler-rt/compiler-rt.mk
> @@ -11,6 +11,7 @@ COMPILER_RT_LICENSE = NCSA MIT
>  COMPILER_RT_LICENSE_FILES = LICENSE.TXT
>  COMPILER_RT_CPE_ID_VENDOR = llvm
>  COMPILER_RT_DEPENDENCIES = host-clang llvm
> +COMPILER_RT_SUPPORTS_IN_SOURCE_BUILD = NO
>  
>  COMPILER_RT_INSTALL_STAGING = YES
>  COMPILER_RT_INSTALL_TARGET = NO
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-08-14 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08  9:04 [Buildroot] [PATCH v1, next] package/llvm-project/compiler-rt: fix build with Ninja Thomas Devoogdt
2023-08-08  9:20 ` Thomas Petazzoni via buildroot
2023-08-08 11:22   ` Thomas Devoogdt
2023-08-08 14:23     ` Thomas Petazzoni via buildroot
2023-08-08 18:02     ` Yann E. MORIN
2023-08-14  6:36       ` [Buildroot] [PATCH v2, next] package/llvm-project/compiler-rt: fix circular dependency warning Thomas Devoogdt
2023-08-14 11:23         ` Yann E. MORIN [this message]
2023-09-12 18:28           ` Peter Korsgaard

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=20230814112336.GC421096@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=dalang@gmx.at \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=thomas@devoogdt.com \
    /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