build: bundle-libraries.sh: do not override argv[0] in inner exec calls
authorJo-Philipp Wich <jo@mein.io>
Mon, 24 Jul 2017 11:33:33 +0000 (13:33 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Dec 2017 15:23:39 +0000 (16:23 +0100)
commit2e1a87a3e11b6928b128fcf72570178a250ba072
treee8e1591706ed85b46ee3130343e3dc859e769c99
parenta37f8b0c6e92012277ba0f7c04ea6d2737544814
build: bundle-libraries.sh: do not override argv[0] in inner exec calls

Only mangle argv[0] of the first executed process and leave the argument
vector of subsequent invocations as-is to allow child programs to properly
discover resources relative to their binary locations.

Fixes "cc1" discovery when executing the host gcc through the bundled
"ccache" executable.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9e64874fb2508e49e52898c238d817bd152bf2c2)
scripts/bundle-libraries.sh