]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
ninja: fix for llvm build when len(TMPDIR) == 410
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 15 Nov 2017 08:15:58 +0000 (16:15 +0800)
committerRobert Yang <liezhi.yang@windriver.com>
Thu, 30 Nov 2017 01:27:27 +0000 (09:27 +0800)
It is used for saving path components, 30 is a little small, use 100.

Fixed when build llvm:
ninja: fatal: path has too many components

[YOCTO #12347]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/recipes-devtools/ninja/ninja/0001-src-util.cc-use-larger-kMaxPathComponents.patch [new file with mode: 0644]
meta/recipes-devtools/ninja/ninja_1.7.2.bb

diff --git a/meta/recipes-devtools/ninja/ninja/0001-src-util.cc-use-larger-kMaxPathComponents.patch b/meta/recipes-devtools/ninja/ninja/0001-src-util.cc-use-larger-kMaxPathComponents.patch
new file mode 100644 (file)
index 0000000..64cac7b
--- /dev/null
@@ -0,0 +1,33 @@
+From 04534ec915e08f59b66bf6044290faeea4610394 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 15 Nov 2017 16:01:01 +0800
+Subject: [PATCH] src/util.cc: use larger kMaxPathComponents
+
+It is used for saving path components, 30 is a little small, use 100.
+
+Fixed when build llvm:
+ninja: fatal: path has too many components
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ src/util.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util.cc b/src/util.cc
+index e31fd1f..f84a12e 100644
+--- a/src/util.cc
++++ b/src/util.cc
+@@ -125,7 +125,7 @@ bool CanonicalizePath(char* path, size_t* len, unsigned int* slash_bits,
+     return false;
+   }
+-  const int kMaxPathComponents = 30;
++  const int kMaxPathComponents = 100;
+   char* components[kMaxPathComponents];
+   int component_count = 0;
+-- 
+2.7.4
+
index 4d3b272309da72b7fcdf185dc9c850b7b37b05e6..0ef2ea0fadcfd5392293ac8df28b75b8c97887b4 100644 (file)
@@ -7,7 +7,10 @@ DEPENDS = "re2c-native ninja-native"
 
 SRCREV = "717b7b4a31db6027207588c0fb89c3ead384747b"
 
-SRC_URI = "git://github.com/martine/ninja.git;branch=release"
+SRC_URI = "git://github.com/martine/ninja.git;branch=release \
+           file://0001-src-util.cc-use-larger-kMaxPathComponents.patch \
+"
+
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
 
 S = "${WORKDIR}/git"