All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/go: enable ARMv7 optimizations for ARMv8 target
@ 2020-12-18 10:00 Michael Baudino
  2020-12-19 11:23 ` Yann E. MORIN
  2020-12-22 10:42 ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Baudino @ 2020-12-18 10:00 UTC (permalink / raw)
  To: buildroot

Go doesn't support ARMv8 optimizations yet (see this GitHub
issue: https://github.com/golang/go/issues/29373) but can still
benefit from ARMv7 optimizations.

A comment is left in `go.mk` to mention this and avoid any
confusion when reading "ifeq ARMv8 ? GOARM = 7".

Signed-off-by: Michael Baudino <michael@baudi.no>
---
 package/go/go.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git package/go/go.mk package/go/go.mk
index d9f4905..55964cb 100644
--- package/go/go.mk
+++ package/go/go.mk
@@ -39,6 +39,8 @@ else ifeq ($(BR2_ARM_CPU_ARMV6),y)
 GO_GOARM = 6
 else ifeq ($(BR2_ARM_CPU_ARMV7A),y)
 GO_GOARM = 7
+else ifeq ($(BR2_ARM_CPU_ARMV8A),y)
+GO_GOARM = 7 # Go doesn't support GOARM=8 yet (see https://github.com/golang/go/issues/29373)
 endif
 else ifeq ($(BR2_aarch64),y)
 GO_GOARCH = arm64
--
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/go: enable ARMv7 optimizations for ARMv8 target
  2020-12-18 10:00 [Buildroot] [PATCH] package/go: enable ARMv7 optimizations for ARMv8 target Michael Baudino
@ 2020-12-19 11:23 ` Yann E. MORIN
  2020-12-22 10:42 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2020-12-19 11:23 UTC (permalink / raw)
  To: buildroot

Michael, All,

On 2020-12-18 10:00 +0000, Michael Baudino spake thusly:
> Go doesn't support ARMv8 optimizations yet (see this GitHub
> issue: https://github.com/golang/go/issues/29373) but can still
> benefit from ARMv7 optimizations.
> 
> A comment is left in `go.mk` to mention this and avoid any
> confusion when reading "ifeq ARMv8 ? GOARM = 7".
> 
> Signed-off-by: Michael Baudino <michael@baudi.no>

Applied to master, with a few tweaks:

  - move the comment to its own line, expand and reword it a bit
  - reword the commit log

Also, see below...

> ---
>  package/go/go.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git package/go/go.mk package/go/go.mk
> index d9f4905..55964cb 100644
> --- package/go/go.mk
> +++ package/go/go.mk
> @@ -39,6 +39,8 @@ else ifeq ($(BR2_ARM_CPU_ARMV6),y)
>  GO_GOARM = 6
>  else ifeq ($(BR2_ARM_CPU_ARMV7A),y)
>  GO_GOARM = 7
> +else ifeq ($(BR2_ARM_CPU_ARMV8A),y)
> +GO_GOARM = 7 # Go doesn't support GOARM=8 yet (see https://github.com/golang/go/issues/29373)

Adding a comment at the end of a variable assignment can cause quite
some surprising behaviours:

    $ cat Makefile
    FOO = 1 # Bleah...
    $(info "$(FOO)")
    all:
        @printf '"%s"\n' "$(FOO)"

    $ make
    "1 "
    "1 "

So I moved the comment to its own line...

Regards,
Yann E. MORIN.

>  endif
>  else ifeq ($(BR2_aarch64),y)
>  GO_GOARCH = arm64
> --
> 2.7.4
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/go: enable ARMv7 optimizations for ARMv8 target
  2020-12-18 10:00 [Buildroot] [PATCH] package/go: enable ARMv7 optimizations for ARMv8 target Michael Baudino
  2020-12-19 11:23 ` Yann E. MORIN
@ 2020-12-22 10:42 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2020-12-22 10:42 UTC (permalink / raw)
  To: buildroot

>>>>> "Michael" == Michael Baudino <michael@baudi.no> writes:

 > Go doesn't support ARMv8 optimizations yet (see this GitHub
 > issue: https://github.com/golang/go/issues/29373) but can still
 > benefit from ARMv7 optimizations.

 > A comment is left in `go.mk` to mention this and avoid any
 > confusion when reading "ifeq ARMv8 ? GOARM = 7".

 > Signed-off-by: Michael Baudino <michael@baudi.no>

Committed to 2020.11.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/go: enable ARMv7 optimizations for ARMv8 target
  2020-12-12 20:54 [Buildroot] [PATCH v3] package/ninja: fix to be cmake-3.10 compatible again Peter Seiderer
@ 2020-12-25 15:28 ` Yann E. MORIN
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2020-12-25 15:28 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2020-12-12 21:54 +0100, Peter Seiderer spake thusly:
> Use cmake-3.10 conform COMPILE_FLAGS instead of 3.15 INCLUDE_DIRECTORIES
> property (as this one is unknown/unused for older cmake versions and
> has no effect, resuling in a build failure because of missing extra
> include path).
> 
> Fixes:
> 
>   - http://lists.busybox.net/pipermail/buildroot/2020-December/298159.html
> 
>   [ 96%] Building CXX object CMakeFiles/ninja.dir/src/browse.cc.o
>   .../build/host-ninja-1.10.2/src/browse.cc:23:10: fatal error: build/browse_py.h: No such file or directory
>      23 | #include "build/browse_py.h"
>         |          ^~~~~~~~~~~~~~~~~~~
>   compilation terminated.
> 
> Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>

Thanks for the patch and the reviews and tests.

However, I've applied another patch that bumps our requirements over up
to cmake-3.15, as more and more packages are going to switch to it.
Since we already have two patches to allow ninja to build back to
cmake-3.10, I don't think it makes sense to add a third patch,
especially since a newer cmake is anyway required for other packages...

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v2:
>   - really use COMPILE_FLAGS (as the patch subject says)
>     (suggested by Yegor Yefremov)
> 
> Changes v2 -> v3:
>   - add reported-by, reviewed-by Yegor Yefremov
>   - update commit description
> ---
>  ...onform-COMPILE_FLAGS-instead-of-3.15.patch | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 package/ninja/0002-use-cmake-3.10-conform-COMPILE_FLAGS-instead-of-3.15.patch
> 
> diff --git a/package/ninja/0002-use-cmake-3.10-conform-COMPILE_FLAGS-instead-of-3.15.patch b/package/ninja/0002-use-cmake-3.10-conform-COMPILE_FLAGS-instead-of-3.15.patch
> new file mode 100644
> index 0000000000..83ec77c76c
> --- /dev/null
> +++ b/package/ninja/0002-use-cmake-3.10-conform-COMPILE_FLAGS-instead-of-3.15.patch
> @@ -0,0 +1,40 @@
> +From 80c34cb11c093f3f0c4217ecf078a1a626da50bd Mon Sep 17 00:00:00 2001
> +From: Peter Seiderer <ps.report@gmx.net>
> +Date: Thu, 10 Dec 2020 20:29:19 +0100
> +Subject: [PATCH] use cmake-3.10 conform COMPILE_FLAGS instead of 3.15
> + INCLUDE_DIRECTORIES property
> +
> +Use cmake-3.10 conform COMPILE_FLAGS instead of 3.15 INCLUDE_DIRECTORIES
> +property (as this one is unknown/unused for older cmake versions and
> +has no effect, resuling in a build failure because of missing extra
> +include path).
> +
> +Fixes:
> +
> +  [ 96%] Building CXX object CMakeFiles/ninja.dir/src/browse.cc.o
> +  .../build/host-ninja-1.10.2/src/browse.cc:23:10: fatal error: build/browse_py.h: No such file or directory
> +     23 | #include "build/browse_py.h"
> +        |          ^~~~~~~~~~~~~~~~~~~
> +  compilation terminated.
> +
> +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> +---
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 7f03c35..f582d2f 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -156,7 +156,7 @@ if(platform_supports_ninja_browse)
> + 	set_source_files_properties(src/browse.cc
> + 		PROPERTIES
> + 			OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/build/browse_py.h"
> +-			INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}"
> ++			COMPILE_FLAGS "-I${CMAKE_BINARY_DIR}"
> + 			COMPILE_DEFINITIONS NINJA_PYTHON="python"
> + 	)
> + endif()
> +-- 
> +2.29.2
> +
> -- 
> 2.29.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-25 15:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-18 10:00 [Buildroot] [PATCH] package/go: enable ARMv7 optimizations for ARMv8 target Michael Baudino
2020-12-19 11:23 ` Yann E. MORIN
2020-12-22 10:42 ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2020-12-12 20:54 [Buildroot] [PATCH v3] package/ninja: fix to be cmake-3.10 compatible again Peter Seiderer
2020-12-25 15:28 ` [Buildroot] [PATCH] package/go: enable ARMv7 optimizations for ARMv8 target Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.