meta-arm.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] arm/gn: don't build with clang
@ 2021-10-06 15:38 Ross Burton
  2021-10-06 15:38 ` [PATCH 2/4] arm/gn: remove nativesdk Ross Burton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ross Burton @ 2021-10-06 15:38 UTC (permalink / raw)
  To: meta-arm

It appears that GN doesn't like to be built with Clang, so disable that
for now.

Change-Id: I01d1d2bf0d646d0841c5f291f07de80837a9a998
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-arm/recipes-devtools/gn/gn_git.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta-arm/recipes-devtools/gn/gn_git.bb b/meta-arm/recipes-devtools/gn/gn_git.bb
index 5962b2d5..d20428b7 100644
--- a/meta-arm/recipes-devtools/gn/gn_git.bb
+++ b/meta-arm/recipes-devtools/gn/gn_git.bb
@@ -13,6 +13,11 @@ B = "${WORKDIR}/build"
 
 # TODO: os map like meson. mingw32 -> mingw
 
+# Currently fails to build with clang, eg:
+# https://errors.yoctoproject.org/Errors/Details/610602/
+# https://errors.yoctoproject.org/Errors/Details/610486/
+TOOLCHAIN = "gcc"
+
 do_configure[cleandirs] += "${B}"
 do_configure() {
     python3 ${S}/build/gen.py \
-- 
2.25.1



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

* [PATCH 2/4] arm/gn: remove nativesdk
  2021-10-06 15:38 [PATCH 1/4] arm/gn: don't build with clang Ross Burton
@ 2021-10-06 15:38 ` Ross Burton
  2021-10-06 15:38 ` [PATCH 3/4] arm/gn: map the platform identifiers Ross Burton
  2021-10-06 15:38 ` [PATCH 4/4] arm/gn: don't statically link libstdc++ Ross Burton
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2021-10-06 15:38 UTC (permalink / raw)
  To: meta-arm

Building GN in a SDK environment isn't as trivial, as it needs to know
the target configuration it should inherit cross-canadian. Also, building
for mingw32 hosts breaks the build.

For now there's no immediate need for GN in nativesdk, so remove it.

Change-Id: I3b969639fa8ad7780c53ae2bc8a3f166773ee4b9
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-arm/recipes-devtools/gn/gn_git.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta-arm/recipes-devtools/gn/gn_git.bb b/meta-arm/recipes-devtools/gn/gn_git.bb
index d20428b7..93c3dc01 100644
--- a/meta-arm/recipes-devtools/gn/gn_git.bb
+++ b/meta-arm/recipes-devtools/gn/gn_git.bb
@@ -22,7 +22,6 @@ do_configure[cleandirs] += "${B}"
 do_configure() {
     python3 ${S}/build/gen.py \
         --platform=${TARGET_OS} \
-        --host=${HOST_OS} \
         --out-path=${B} \
         --no-strip
 }
@@ -36,4 +35,4 @@ do_install() {
     install ${B}/gn ${D}${bindir}
 }
 
-BBCLASSEXTEND = "native nativesdk"
+BBCLASSEXTEND = "native"
-- 
2.25.1



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

* [PATCH 3/4] arm/gn: map the platform identifiers
  2021-10-06 15:38 [PATCH 1/4] arm/gn: don't build with clang Ross Burton
  2021-10-06 15:38 ` [PATCH 2/4] arm/gn: remove nativesdk Ross Burton
@ 2021-10-06 15:38 ` Ross Burton
  2021-10-06 15:38 ` [PATCH 4/4] arm/gn: don't statically link libstdc++ Ross Burton
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2021-10-06 15:38 UTC (permalink / raw)
  To: meta-arm

GN uses its own platform identifiers, so map from our GNU-style names to
the names it expects.

Change-Id: I361536c43f2a9cc5c6dc0a9ad4138433399781d2
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-arm/recipes-devtools/gn/gn_git.bb | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/meta-arm/recipes-devtools/gn/gn_git.bb b/meta-arm/recipes-devtools/gn/gn_git.bb
index 93c3dc01..522a7efe 100644
--- a/meta-arm/recipes-devtools/gn/gn_git.bb
+++ b/meta-arm/recipes-devtools/gn/gn_git.bb
@@ -11,17 +11,25 @@ PV = "0+git${SRCPV}"
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"
 
-# TODO: os map like meson. mingw32 -> mingw
-
 # Currently fails to build with clang, eg:
 # https://errors.yoctoproject.org/Errors/Details/610602/
 # https://errors.yoctoproject.org/Errors/Details/610486/
 TOOLCHAIN = "gcc"
 
+# Map from our _OS strings to the GN's platform values.
+def gn_platform(variable, d):
+    os = d.getVar(variable)
+    if "linux" in os:
+        return "linux"
+    elif "mingw" in os:
+        return "mingw"
+    else:
+        return os
+
 do_configure[cleandirs] += "${B}"
 do_configure() {
     python3 ${S}/build/gen.py \
-        --platform=${TARGET_OS} \
+        --platform=${@gn_platform("TARGET_OS", d)} \
         --out-path=${B} \
         --no-strip
 }
-- 
2.25.1



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

* [PATCH 4/4] arm/gn: don't statically link libstdc++
  2021-10-06 15:38 [PATCH 1/4] arm/gn: don't build with clang Ross Burton
  2021-10-06 15:38 ` [PATCH 2/4] arm/gn: remove nativesdk Ross Burton
  2021-10-06 15:38 ` [PATCH 3/4] arm/gn: map the platform identifiers Ross Burton
@ 2021-10-06 15:38 ` Ross Burton
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2021-10-06 15:38 UTC (permalink / raw)
  To: meta-arm

As we're building whole systems and not binaries that are expected to
be copied around, we can dynamically link to libstdc++.

Change-Id: I1e54ca519b069388226f40c489c9194b870a6d3c
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-arm/recipes-devtools/gn/gn_git.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-arm/recipes-devtools/gn/gn_git.bb b/meta-arm/recipes-devtools/gn/gn_git.bb
index 522a7efe..56002229 100644
--- a/meta-arm/recipes-devtools/gn/gn_git.bb
+++ b/meta-arm/recipes-devtools/gn/gn_git.bb
@@ -31,6 +31,7 @@ do_configure() {
     python3 ${S}/build/gen.py \
         --platform=${@gn_platform("TARGET_OS", d)} \
         --out-path=${B} \
+        --no-static-libstdc++ \
         --no-strip
 }
 
-- 
2.25.1



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

end of thread, other threads:[~2021-10-06 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 15:38 [PATCH 1/4] arm/gn: don't build with clang Ross Burton
2021-10-06 15:38 ` [PATCH 2/4] arm/gn: remove nativesdk Ross Burton
2021-10-06 15:38 ` [PATCH 3/4] arm/gn: map the platform identifiers Ross Burton
2021-10-06 15:38 ` [PATCH 4/4] arm/gn: don't statically link libstdc++ Ross Burton

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).