1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
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,16 @@ 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 */
add_prefix (&exec_prefixes, standard_exec_prefix, "GCC",
PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
|