a4f01ffca6
The hipcc script takes arguments and uses this to build up a new
command. Characters which are special to the shell need to be quoted
to prevent them being interpreted.
In particular adding
--Wl,--enable-new-dtags -Wl,--rpath,'$ORIGIN:$ORIGIN/../lib'
to the command should pass quoted dollar signs into the resulting
string so the shell passes them on, rather than substituting the
values.
The arguments are processed in a conventional loop, but can be altered
during the course of the loop, and also by linker response files.
Tested by running
HIPCC_VERBOSE=7 HIP_COMPILER=clang hipcc --cxxflags \
fred.c -Wl,,--rpath,'$ORIGIN:$ORIGIN:/../lib'
and observing "-Wl,--rpath,\$ORIGIN\:\$ORIGIN\:..\/lib" in the
displayed hipcc-cmd output (and ignoring the errors due to rocm not
being installed)
Change-Id: I26b62f09ff3518cceeb85fa8823bb12a95c1c78e
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>