[PATCH] buildsys: Preserve arguments passed on
Joseph Benden
joe at benden.us
Fri Mar 22 02:26:09 UTC 2019
This patch ensures all arguments are quoted, during command-line
construction.
This fixes compilation where spaces occur within the arguments.
Additional Information:
https://github.com/openwrt/openwrt/pull/1620
Signed-off-by: Joseph Benden <joe at benden.us>
---
bin/Makefile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/Makefile.in b/bin/Makefile.in
index 8d11316..17e0ae5 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -34,7 +34,7 @@ define do_wrapper
$(Q)echo 'WRAPPER_INCLIB="Y"' >> $@.tmp
$(Q)echo 'while [ -n "$$1" ]' >> $@.tmp
$(Q)echo 'do' >> $@.tmp
- $(Q)echo ' WRAPPER_OPTIONS="$$WRAPPER_OPTIONS $$1"' >> $@.tmp
+ $(Q)echo ' WRAPPER_OPTIONS="$$WRAPPER_OPTIONS '"'"'$$1'"'"'"' >> $@.tmp
$(Q)echo ' if [ "$$1" = "-c" -o "$$1" = "-E" -o "$$1" = "-S" ]' >> $@.tmp
$(Q)echo ' then' >> $@.tmp
$(Q)echo ' WRAPPER_INCLIB="N"' >> $@.tmp
@@ -51,7 +51,7 @@ define do_wrapper
$(Q)echo 'fi' >> $@.tmp
$(Q)echo '' >> $@.tmp
$(Q)echo '[ -n "$$V" ] && [ $$V -gt 1 ] && echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$WRAPPER_OPTIONS' >> $@.tmp
- $(Q)echo 'exec $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$WRAPPER_OPTIONS' >> $@.tmp
+ $(Q)echo 'eval $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) "$$WRAPPER_INCLUDEDIR" "$$WRAPPER_OPTIONS"' >> $@.tmp
$(Q)echo '' >> $@.tmp
$(Q)chmod 0755 $@.tmp
$(Q)mv $@.tmp $@
--
2.7.4
More information about the uClibc
mailing list