bootstrap: Add support for CC/CXX containing flags
It's quite common these days (though annoying for obvious reasons) for some compiler options to be married to CC/CXX rather than CFLAGS/CXXFLAGS.
The most obvious example of this to me is clang's target option, commonly used as: CC="clang --target=arm64-apple-darwin"
. Another common one is CC=gcc -m32
for gcc multi-arch builds.
Currently the bootstrap script treats the CC/CXX variables as a space-separated list of compiler strings. I believe this is unintentional and it leads to odd breakages like dropped arguments and quoting issues.
My attempt at a fix is to special-case any user-provided CC/CXX variables and treat them as a single compiler as opposed to a list. With that done, quotes were removed in a few places in the second commit to avoid the invocation of an entire string rather than its components.
I suggest reviewing on the web interface with "Hide whitespace changes" or locally with git show -w
as there's a good bit of noisy whitespace change.
Topic-rename: bootstrap-compiler-env-args