diff mbox series

Use expandargv on gcc-ar [PR77576]

Message ID 76a71ea623f25a11b3e9bdeefcebe047@gcc.mail.kapsi.fi
State New
Headers show
Series Use expandargv on gcc-ar [PR77576] | expand

Commit Message

Pekka Seppänen May 24, 2023, 12:21 p.m. UTC
Call expandargv prior attempting to prepend a dash to the first
argument.  When using response files the first character is never a dash
but an at-sign.

	PR gcc/77576

gcc/ChangeLog:

	* gcc-ar.cc (main): Call expandargv.
---
  gcc/gcc-ar.cc | 2 ++
  1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/gcc/gcc-ar.cc b/gcc/gcc-ar.cc
index 5e5b63e1988..2a1e99cace7 100644
--- a/gcc/gcc-ar.cc
+++ b/gcc/gcc-ar.cc
@@ -136,6 +136,8 @@  main (int ac, char **av)
    int exit_code = FATAL_EXIT_CODE;
    int i;

+  expandargv(&ac, &av);
+
    setup_prefixes (av[0]);

    /* Not using getopt for now.  */