Strange `find` syntax error in crosstool-ng

Michael Abbott michael@araneidae.co.uk
Mon Jan 28 18:59:00 GMT 2008


My crosstool build fails with the message

[INFO ]  Installing final compiler: done in 520.97s
[38:16] / find: missing argument to `-exec'
[ERROR]  Build failed in step "<none>"
[ERROR]  Error happened in "/scratch/crosstool-ng-1.0.0/scripts/crosstool.sh" in function "main" (line unknown, sorry)

and the error is clearly due to lines 400-402 in crosstool.sh which are of 
the form
 	find ... -name ... -exec rm -fv {} \+ | CT_DoLog DEBUG

Eh?  How on earth did \; become transformed into \+?  This is in both the 
1.0.0 tar bundle and the svn version (which seem to be identical apart 
from the .version file).

The attached patch should fix this, but I haven't tested it yet.
-------------- next part --------------
Index: scripts/crosstool.sh
===================================================================
--- scripts/crosstool.sh	(revision 534)
+++ scripts/crosstool.sh	(working copy)
@@ -397,9 +397,9 @@
     done
 
     CT_DoLog DEBUG "Removing access to the build system tools"
-    find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \+ |CT_DoLog DEBUG
-    find "${CT_PREFIX_DIR}/bin" -name "${CT_UNIQ_BUILD}-"'*' -exec rm -fv {} \+ |CT_DoLog DEBUG
-    find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \+ |CT_DoLog DEBUG
+    find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
+    find "${CT_PREFIX_DIR}/bin" -name "${CT_UNIQ_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
+    find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
 
     # Install the /populator/
     CT_DoLog EXTRA "Installing the populate helper"
-------------- next part --------------
--
For unsubscribe information see http://sourceware.org/lists.html#faq


More information about the crossgcc mailing list