From 1e6985db50d8acf2ac0354efb406624f26ca7a75 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 17 May 2015 11:27:45 +0100 Subject: [PATCH] cctools (lib), libtool, lipo, nm, otool - Add build support for LTO --- cctools/misc/libtool.c | 4 ++++ cctools/misc/lipo.c | 2 ++ cctools/misc/nm.c | 2 ++ cctools/otool/main.c | 2 ++ 4 files changed, 10 insertions(+) diff --git a/cctools/misc/libtool.c b/cctools/misc/libtool.c index 809c0b7..8b076da 100644 --- a/cctools/misc/libtool.c +++ b/cctools/misc/libtool.c @@ -349,6 +349,8 @@ static uint32_t trnc( /* apple_version is in vers.c which is created by the libstuff/Makefile */ extern char apple_version[]; +/* likewise lto_suport */ +extern char lto_support[]; #define RSZ (sizeof("ranlib")-1) int @@ -1470,7 +1472,9 @@ void) do{ if(ofiles[i].mh != NULL || ofiles[i].mh64 != NULL || +#ifdef LTO_SUPPORT ofiles[i].lto != NULL || +#endif cmd_flags.ranlib == TRUE){ add_member(ofiles + i); } diff --git a/cctools/misc/lipo.c b/cctools/misc/lipo.c index 3013310..086882e 100644 --- a/cctools/misc/lipo.c +++ b/cctools/misc/lipo.c @@ -231,6 +231,8 @@ static struct thin_file *new_blank_dylib( /* apple_version is created by the libstuff/Makefile */ extern char apple_version[]; char *version = apple_version; +/* likewise lto_suport */ +extern char lto_support[]; int main( diff --git a/cctools/misc/nm.c b/cctools/misc/nm.c index 1a33fa1..5948bf1 100644 --- a/cctools/misc/nm.c +++ b/cctools/misc/nm.c @@ -243,6 +243,8 @@ static int value_diff_compare( /* apple_version is created by the libstuff/Makefile */ extern char apple_version[]; char *version = apple_version; +/* likewise lto_suport */ +extern char lto_support[]; int main( diff --git a/cctools/otool/main.c b/cctools/otool/main.c index c730349..9e27874 100644 --- a/cctools/otool/main.c +++ b/cctools/otool/main.c @@ -368,6 +368,8 @@ static void llvm_otool( /* apple_version is created by the libstuff/Makefile */ extern char apple_version[]; char *version = apple_version; +/* likewise lto_suport */ +extern char lto_support[]; int main( -- 2.11.4.GIT