summaryrefslogtreecommitdiff
blob: 62490ef8ce46888ea92a3a86b81fa8f946dacb95 (plain)
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
Allow to fully disable LTO.

diff --git a/libstuff/lto.c b/libstuff/lto.c
index 6f5758d..5ba7996 100644
--- a/libstuff/lto.c
+++ b/libstuff/lto.c
@@ -381,4 +381,18 @@ void *mod)
 	lto_dispose(mod);
 }
 
+#else
+
+#include <stdlib.h>
+#include "stuff/ofile.h"
+
+__private_extern__
+int
+is_llvm_bitcode(
+    struct ofile *ofile,
+    char *addr,
+    size_t size)
+{
+  return 0;
+}
 #endif /* LTO_SUPPORT */
diff --git a/misc/libtool.c b/misc/libtool.c
index f9c7557..ff829cc 100644
--- a/misc/libtool.c
+++ b/misc/libtool.c
@@ -1370,8 +1370,11 @@ void)
 			    }
 			}
 		    }
-		    else if(ofiles[i].arch_type == OFILE_Mach_O ||
-		            ofiles[i].arch_type == OFILE_LLVM_BITCODE){
+		    else if(ofiles[i].arch_type == OFILE_Mach_O
+#ifdef LTO_SUPPORT
+                || ofiles[i].arch_type == OFILE_LLVM_BITCODE
+#endif
+                ){
 			if(cmd_flags.ranlib == TRUE){
 			    error("for architecture: %s file: %s is not an "
 				  "archive (no processing done on this file)",