...in case it contains addtional arguments like -fsized-deallocation besides the compiler's pathname, which would have caused failures like
basename: extra operand '-fsized-deallocation' Try 'basename --help' for more information. dirname: missing operand Try 'dirname --help' for more information. dirname: missing operand Try 'dirname --help' for more information.
(printf reuses the format operand to satisfy all argument operands, so that \n | head hack is needed to get just the first one, assuming that CXX did not contain any carefully crafted escape sequences inside that first argument that would expand to a newline when printing. Also, this does not cater for leading
var=value or (even more far-fetched) redirection words in CXX, but the original code did not, either.)
Change-Id: Iae4d1a0ae3b67cc5e8c7a8a36258230f8ab8fd70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94406
cce42f7de6bd Apply dirname to the first word of CXX
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)