diff mbox series

package/erlang: support aarch64 host-erlang builds

Message ID 20220921204916.3420825-1-fhunleth@troodon-software.com
State Changes Requested
Headers show
Series package/erlang: support aarch64 host-erlang builds | expand

Commit Message

Frank Hunleth Sept. 21, 2022, 8:49 p.m. UTC
This fixes the following warning when building erlang on aarch64
machines:

WARNING: unmet direct dependencies detected for BR2_PACKAGE_ERLANG
  Depends on [n]: BR2_USE_MMU [=y] && !BR2_STATIC_LIBS [=n] && BR2_TOOLCHAIN_HAS_THREADS [=y] && BR2_PACKAGE_ERLANG_ARCH_SUPPORTS [=n]

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
 package/erlang/Config.in | 1 +
 1 file changed, 1 insertion(+)

--
2.34.1

Comments

Thomas Petazzoni Sept. 23, 2022, 9:42 p.m. UTC | #1
Hello Frank,

On Wed, 21 Sep 2022 20:49:59 +0000
Frank Hunleth via buildroot <buildroot@buildroot.org> wrote:

> This fixes the following warning when building erlang on aarch64
> machines:
> 
> WARNING: unmet direct dependencies detected for BR2_PACKAGE_ERLANG
>   Depends on [n]: BR2_USE_MMU [=y] && !BR2_STATIC_LIBS [=n] && BR2_TOOLCHAIN_HAS_THREADS [=y] && BR2_PACKAGE_ERLANG_ARCH_SUPPORTS [=n]
> 
> Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
> ---
>  package/erlang/Config.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/erlang/Config.in b/package/erlang/Config.in
> index 15931b5896..5198f35efc 100644
> --- a/package/erlang/Config.in
> +++ b/package/erlang/Config.in
> @@ -2,6 +2,7 @@ config BR2_PACKAGE_HOST_ERLANG_ARCH_SUPPORTS
>  	bool
>  	default y if BR2_HOSTARCH = "x86_64"
>  	default y if BR2_HOSTARCH = "x86"
> +	default y if BR2_HOSTARCH = "aarch64"

While I appreciate that adding support for aarch64 as a host
architecture for Erlang is a good idea, this cannot be the proper fix
for the circular dependency you're seeing, as it means the same issue
will happen on another host architecture.

Do you have the example configuration that exhibits the problem? I
don't see any place that selects BR2_PACKAGE_ERLANG in the tree.
Perhaps you're seeing this with a custom package of yours that has
"select BR2_PACKAGE_ERLANG", but forgot "depends on
BR2_PACKAGE_ERLANG_ARCH_SUPPORTS" ?

Don't get me wrong: the patch is correct, but its commit log and the
reasoning looks suspicious.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/erlang/Config.in b/package/erlang/Config.in
index 15931b5896..5198f35efc 100644
--- a/package/erlang/Config.in
+++ b/package/erlang/Config.in
@@ -2,6 +2,7 @@  config BR2_PACKAGE_HOST_ERLANG_ARCH_SUPPORTS
 	bool
 	default y if BR2_HOSTARCH = "x86_64"
 	default y if BR2_HOSTARCH = "x86"
+	default y if BR2_HOSTARCH = "aarch64"

 config BR2_PACKAGE_ERLANG_ARCH_SUPPORTS
 	bool