We have a report (now entered as bug 575) that when open64 is given the -print-file-name, -print-prog-name, and -print-multi-lib it is calling the system GCC compiler to handle these instead of using the GCC that is shipped with open64.
This patch fixes that problem by using the internal GCC instead of the system one and thus gives a correct answer with something like: opencc -print-file-name=libstdc++.a Before it would return the path to the system libstdc++, now it will return the path to the one shipped with open64. Can a Gatekeeper approve this patch for checkin? Steve Ellcey s...@cup.hp.com Index: opt_actions.c =================================================================== --- opt_actions.c (revision 3290) +++ opt_actions.c (working copy) @@ -1735,7 +1735,11 @@ print_file_path (char *fname, int exe) /* 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 @@ void 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 Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel