This is an optimization hack which should only be present
in a sparc 32bit driver of the compiler compiled with
host/target/build sparc64-redhat-linux --with-cpu=v7.
As long long HOST_WIDE_INT slows things down, we can have in
addition to the sparc64-*/3.2/{cc1,cc1plus}
sparc-*/3.2/{cc1,cc1plus} binaries which are suitable for compiling
-m32 code only, but use long HOST_WIDE_INT.
--- gcc/gcc.c.jj Thu Aug 1 17:41:31 2002
+++ gcc/gcc.c Fri Sep 6 16:48:10 2002
@@ -3184,6 +3184,8 @@ process_command (argc, argv)
int have_c = 0;
int have_o = 0;
int lang_n_infiles = 0;
+ int m64 = 0;
+ int used_B = 0;
#ifdef MODIFY_TARGET_NAME
int is_modify_target_name;
int j;
@@ -3565,6 +3567,7 @@ warranty; not even for MERCHANTABILITY o
spec_machine = p + 1;
warn_std_ptr = &warn_std;
+ used_B = 1;
break;
case 'B':
@@ -3627,6 +3630,7 @@ warranty; not even for MERCHANTABILITY o
PREFIX_PRIORITY_B_OPT, 0, &warn_B, 0);
add_prefix (&include_prefixes, concat (value, "include", NULL),
NULL, PREFIX_PRIORITY_B_OPT, 0, NULL, 0);
+ used_B = 1;
n_switches++;
}
break;
@@ -3731,6 +3735,13 @@ warranty; not even for MERCHANTABILITY o
#endif
goto normal_switch;
+ /* HACK START */
+ case 'm':
+ if (p[1] == '6' && p[2] == '4')
+ m64 = 1;
+ /* FALLTHROUGH */
+ /* HACK END */
+
default:
normal_switch:
@@ -3798,6 +3809,26 @@ warranty; not even for MERCHANTABILITY o
/* Use 2 as fourth arg meaning try just the machine as a suffix,
as well as trying the machine and the version. */
#ifndef OS2
+ /* HACK START */
+ if (!m64 && !used_B && !strncmp (spec_machine, "sparc64-", 8))
+ {
+ const char *sparc32_exec_prefix =
+ concat (standard_exec_prefix, "sparc-", spec_machine + 8,
+ dir_separator_str, spec_version, dir_separator_str, NULL);
+ add_prefix (&exec_prefixes, sparc32_exec_prefix, "GCC",
+ PREFIX_PRIORITY_LAST, 0, warn_std_ptr, 0);
+ }
+ /* HACK END */
+ /* HACK START */
+ if (!m64 && !used_B && !strncmp (spec_machine, "ppc64-", 6))
+ {
+ const char *ppc32_exec_prefix =
+ concat (standard_exec_prefix, "ppc-", spec_machine + 6,
+ dir_separator_str, spec_version, dir_separator_str, NULL);
+ add_prefix (&exec_prefixes, ppc32_exec_prefix, "GCC",
+ PREFIX_PRIORITY_LAST, 0, warn_std_ptr, 0);
+ }
+ /* HACK END */
add_prefix (&exec_prefixes, standard_exec_prefix, "GCC",
PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",