Use relative paths in copygcclib.sh deps files
Strip $PWD/ off the beginning of the path printed by gcc.
Bug: 68719465
Test: m checkbuild
Test: prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-${TARGET_PRODUCT}.ninja -t deps | grep -E '^[[:space:]]*/' | sort | uniq
diff --git a/scripts/copygcclib.sh b/scripts/copygcclib.sh
index 93c52cc..4bd6f9b 100755
--- a/scripts/copygcclib.sh
+++ b/scripts/copygcclib.sh
@@ -2,6 +2,6 @@
OUT=$1
shift
-LIBPATH=$($@)
+LIBPATH=$($@ | sed -e "s|^$PWD/||")
cp -f $LIBPATH $OUT
echo "$OUT: $LIBPATH" > ${OUT}.d