Merge branch 'fix-generic-cc' into 'develop'

Allow CC and other environment variables to contain space when building

Currently if the value of `CC` or the like contains a space (most notably, `CC=ccache gcc`) the build fails like so:
```
;;; Note:
;;;   Invoking external command:
;;;   ccache gcc -I. -I/home/iguananaut/src/ecl/ecl/build/ -DECL_API -I/home/iguananaut/src/ecl/ecl/build/c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -D_THREAD_SAFE -Dlinux -I/home/iguananaut/src/ecl/ecl/src/c -c lsp/export.c -o lsp/export.o exec: No such file or directory

Condition of type: SIMPLE-ERROR
Error code 6 when executing
(RUN-PROGRAM "ccache gcc" ("-I." "-I/home/iguananaut/src/ecl/ecl/build/" "-DECL_API" "-I/home/iguananaut/src/ecl/ecl/build/c" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" "-g" "-O2" "-fPIC" "-D_THREAD_SAFE" "-Dlinux" "-I/home/iguananaut/src/ecl/ecl/src/c" "-c" "lsp/export.c" "-o" "lsp/export.o"))

Available restarts:

1. (CONTINUE) Continues anyway.
2. (ABORT) ABORT

Top level in: #<process TOP-LEVEL>.
```

This fixes the issue generally by patching `safe-run-program` rather than checking for this case every time `*cc*`, `*ld*`, etc. are used.

See merge request !20
This commit is contained in:
Daniel Kochmański 2016-03-21 09:59:31 +00:00
commit 71f73a8981

View file

@ -54,7 +54,10 @@
(cmpnote "Invoking external command:~% ~A ~{~A ~}" program args)
(multiple-value-bind (stream result process)
(let* ((*standard-output* ext:+process-standard-output+)
(*error-output* ext:+process-error-output+))
(*error-output* ext:+process-error-output+)
(program (split-program-options program))
(args `(,@(cdr program) ,@args))
(program (car program)))
(with-current-directory
#-(and cygwin (not ecl-min))
(ext:run-program program args :input nil :output t :error t :wait t)