You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-devel/binutils-apple/files/binutils-apple-5.1-nolto.patch

44 lines
998 B

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)",