From: Ian Lance Taylor Date: Mon, 4 Feb 2008 17:26:12 +0000 (+0000) Subject: From Craig Silverstein: support @file expansion. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc955173bb408aa2485fdc9be73dcdcc9e353e4b;p=binutils-gdb.git From Craig Silverstein: support @file expansion. --- diff --git a/gold/main.cc b/gold/main.cc index a6c98721805..2f68e06ec5e 100644 --- a/gold/main.cc +++ b/gold/main.cc @@ -91,7 +91,10 @@ write_debug_script(std::string filename_str, FILE* fp = fopen(filename, "w"); if (fp) { - fprintf(fp, "[ \"$1\" = debug ] && PREFIX=\"${GDB-/home/build/static/projects/tools/gdb} --annotate=3 --fullname %s --args\" && shift\n", argv_0); + fprintf(fp, "[ \"$1\" = debug ]" + " && PREFIX=\"${GDB-gdb} --annotate=3 --fullname %s --args\"" + " && shift\n", + argv_0); fprintf(fp, "$PREFIX%s $*\n", args); fclose(fp); chmod(filename, 0755); @@ -132,6 +135,9 @@ main(int argc, char** argv) program_name = argv[0]; + // In libiberty; expands @filename to the args in "filename". + expandargv(&argc, &argv); + // This is used by write_debug_script(), which wants the unedited argv. std::string args = collect_argv(argc, argv);