diff options
author | Jing Yu <jingyu@google.com> | 2012-03-01 13:39:20 -0800 |
---|---|---|
committer | Jing Yu <jingyu@google.com> | 2012-03-01 13:39:20 -0800 |
commit | 280e401df2f62bb7a18b03d9b5dcf49cb47446d6 (patch) | |
tree | d70588534178a4263d9ba34e2ad52731ff02392d /gcc-4.6 | |
parent | fb15b4c077bef8a9ee6c969273b05645ce4ed6a1 (diff) | |
download | toolchain_gcc-280e401df2f62bb7a18b03d9b5dcf49cb47446d6.tar.gz toolchain_gcc-280e401df2f62bb7a18b03d9b5dcf49cb47446d6.tar.bz2 toolchain_gcc-280e401df2f62bb7a18b03d9b5dcf49cb47446d6.zip |
Fix broken toolchain build on mac.
2012-03-01 Jing Yu <jingyu@google.com>
Backport r184577 from google/gcc-4_6 branch.
2012-02-25 Sriraman Tallam <tmsriram@google.com>
* function_reordering_plugin.c: Check for presence of elf.h.
Otherwise, redefine the elf macros used.
Diffstat (limited to 'gcc-4.6')
-rw-r--r-- | gcc-4.6/function_reordering_plugin/ChangeLog.google-4_6 | 7 | ||||
-rw-r--r-- | gcc-4.6/function_reordering_plugin/function_reordering_plugin.c | 14 |
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc-4.6/function_reordering_plugin/ChangeLog.google-4_6 b/gcc-4.6/function_reordering_plugin/ChangeLog.google-4_6 index 86ce33829..f5915b8bc 100644 --- a/gcc-4.6/function_reordering_plugin/ChangeLog.google-4_6 +++ b/gcc-4.6/function_reordering_plugin/ChangeLog.google-4_6 @@ -1,3 +1,10 @@ +2012-03-01 Jing Yu <jingyu@google.com> + Backport r184577 from google/gcc-4_6 branch. + + 2012-02-25 Sriraman Tallam <tmsriram@google.com> + * function_reordering_plugin.c: Check for presence of elf.h. + Otherwise, redefine the elf macros used. + 2011-09-27 Sriraman Tallam <tmsriram@google.com> * config.h.in: New file. diff --git a/gcc-4.6/function_reordering_plugin/function_reordering_plugin.c b/gcc-4.6/function_reordering_plugin/function_reordering_plugin.c index d5710c581..3362a989b 100644 --- a/gcc-4.6/function_reordering_plugin/function_reordering_plugin.c +++ b/gcc-4.6/function_reordering_plugin/function_reordering_plugin.c @@ -43,11 +43,23 @@ along with this program; see the file COPYING3. If not see #include <stdlib.h> #include <assert.h> #include <string.h> -#include <elf.h> +#if defined (__ELF__) + #include <elf.h> +#endif #include "config.h" #include "plugin-api.h" #include "callgraph.h" +/* #include <elf.h> Not available on Darwin. + Rather than dealing with cross-compilation includes, hard code the + values we need, as these will not change. */ +#ifndef SHT_NULL + #define SHT_NULL 0 +#endif +#ifndef SHT_PROGBITS + #define SHT_PROGBITS 1 +#endif + enum ld_plugin_status claim_file_hook (const struct ld_plugin_input_file *file, int *claimed); enum ld_plugin_status all_symbols_read_hook (); |