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
67
68
69
|
handles the libexecdir for as and other fixes
--- cctools-698/as/driver.c
+++ cctools-698/as/driver.c
@@ -27,6 +27,9 @@
char **envp)
{
const char *LIB =
+#ifdef ASLIBEXECDIR
+ ASLIBEXECDIR;
+#else
#if defined(__OPENSTEP__) || defined(__HERA__) || \
defined(__GONZO_BUNSEN_BEAKER__) || defined(__KODIAK__)
"/usr/libexec/";
@@ -40,6 +42,7 @@
#else
"/usr/local/libexec/gcc/darwin/";
#endif
+#endif
const char *AS = "/as";
int i;
@@ -170,7 +170,11 @@
}
}
+#ifndef ASLIBEXECDIR
as = makestr(prefix, LIB, arch_name, AS, NULL);
+#else
+ as = makestr(LIB, arch_name, AS, NULL);
+#endif
/*
* If this assembler exist try to run it else print an error message.
@@ -182,6 +182,10 @@
else
exit(1);
}
+#ifdef ASLIBEXECDIR
+ as_local = "";
+ {
+#else
as_local = makestr(prefix, LOCALLIB, arch_name, AS, NULL);
if(access(as_local, F_OK) == 0){
argv[0] = as_local;
@@ -193,6 +198,7 @@
exit(1);
}
else{
+#endif
printf("%s: assembler (%s or %s) for architecture %s not "
"installed\n", progname, as, as_local, arch_name);
arch_flags = get_arch_flags();
@@ -183,6 +190,7 @@
printf("%s for architecture %s\n", as, arch_flags[i].name);
count++;
}
+#ifndef ASLIBEXECDIR
else{
as_local = makestr(LOCALLIB, arch_flags[i].name, AS, NULL);
if(access(as_local, F_OK) == 0){
@@ -193,6 +201,7 @@
count++;
}
}
+#endif
}
if(count == 0)
printf("%s: no assemblers installed\n", progname);
|