Author: sje
Date: 2010-07-22 16:34:57 -0400 (Thu, 22 Jul 2010)
New Revision: 3293
Modified:
trunk/osprey/driver/opt_actions.c
Log:
Use the internal GCC to handle -print-file-name, -print-prog-name, and
-print-multi-lib flags instead of the system GCC.
Fixes: Bug 575
Approved by: Mike Murphy
Modified: trunk/osprey/driver/opt_actions.c
===================================================================
--- trunk/osprey/driver/opt_actions.c 2010-07-21 23:40:20 UTC (rev 3292)
+++ trunk/osprey/driver/opt_actions.c 2010-07-22 20:34:57 UTC (rev 3293)
@@ -1735,7 +1735,11 @@
/* not found, so ask gcc */
int m32 = check_for_saved_option("-m32");
char *argv[4];
- argv[0] = "gcc";
+ phases_t lang = (invoked_lang == L_CC) ? P_gcpp_plus : P_gcpp;
+ if (external_gcc == TRUE)
+ argv[0] = get_phase_name(lang);
+ else
+ argv[0] = get_full_phase_name (lang);
argv[1] = m32 ? "-m32" : "-m64";
asprintf(&argv[2], "-print-%s-name=%s", exe ? "prog" : "file", fname);
argv[3] = NULL;
@@ -1749,7 +1753,11 @@
print_multi_lib ()
{
char *argv[3];
- argv[0] = "gcc";
+ phases_t lang = (invoked_lang == L_CC) ? P_gcpp_plus : P_gcpp;
+ if (external_gcc == TRUE)
+ argv[0] = get_phase_name(lang);
+ else
+ argv[0] = get_full_phase_name (lang);
asprintf(&argv[1], "-print-multi-lib");
argv[2] = NULL;
/* MINGW doesn't support execvp, everyone supports execlp */
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel