summaryrefslogtreecommitdiff
path: root/package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch')
-rw-r--r--package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch b/package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch
new file mode 100644
index 000000000..4f6674472
--- /dev/null
+++ b/package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch
@@ -0,0 +1,38 @@
+Makefile: allow recursion
+
+When crosstool-NG is used standalone, we completely avoid recursion,
+because the Makefile calls itself only once.
+
+But when used as the buildroot toolchain backend, there is already
+one level of make recursion when we first call the crosstool-NG
+Makefile. And when buildroot is used out-of-tree, we are already
+at the second level of recursion when calling the crosstool-NG
+Makefile.
+
+So, to cope with the situation, just get rid of the recursion test.
+
+This probably won't go upstream.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
+
+diff -du crosstool-ng-1.12.0/Makefile.in host-crosstool-ng-1.12.0/Makefile.in
+--- crosstool-ng-1.12.0/Makefile.in 2011-08-01 01:21:34.000000000 +0200
++++ host-crosstool-ng-1.12.0/Makefile.in 2011-08-07 21:39:16.055958219 +0200
+@@ -95,9 +95,14 @@
+ # level.
+ # This has the side effect of only showing the real targets, and hiding our
+ # internal ones. :-)
+-ifneq ($(MAKELEVEL),0)
+-$(error Recursion detected, bailing out...)
+-endif
++#
++# NB: For buildroot, this has no importance:
++# - crosstool-NG should never ever be called manually
++# - thus auto-completion would never ever be attempted
++# - so we shouldn't have to detect it
++#ifneq ($(MAKELEVEL),0)
++#$(error Recursion detected, bailing out...)
++#endif
+
+ MAKEFLAGS += $(CT_MAKEFLAGS)
+ build install clean distclean uninstall: