commit:     2dfc27192fbe00e4661ca06a0b18f09a4137dd50
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  8 06:17:43 2021 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jun  8 06:17:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=2dfc2719

scripts/bootstrap-prefix: try to get gcc wrapper fixed on PATH

Bug: https://bugs.gentoo.org/794709
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 566d692a19..d1108e6eac 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1477,7 +1477,7 @@ bootstrap_stage1() {
                                cat >> "${ROOT}"/tmp/usr/local/bin/gcc <<-EOF
                                        #! /bin/sh
                                        PATH="${ORIGINAL_PATH}" export PATH
-                                       exec "\${0##*/}" "\$@"
+                                       exec "$(type -P gcc)" "\$@"
                                EOF
                                cp "${ROOT}"/tmp/usr/local/bin/g{cc,++}
                                chmod 755 "${ROOT}"/tmp/usr/local/bin/g{cc,++}

Reply via email to