diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2013-04-02 19:50:14 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-04-02 20:36:19 +0800 |
commit | 06b207c97dfb0d70f1f2ef91b93b665dceae0d27 (patch) | |
tree | 2ab92aac52a08e9a77503150b512d609f44558a7 /gcc-4.8 | |
parent | feb0a69677101f361aaf5dbfcdd8b5a7a827900f (diff) | |
download | toolchain_gcc-06b207c97dfb0d70f1f2ef91b93b665dceae0d27.tar.gz toolchain_gcc-06b207c97dfb0d70f1f2ef91b93b665dceae0d27.tar.bz2 toolchain_gcc-06b207c97dfb0d70f1f2ef91b93b665dceae0d27.zip |
[4.8] Add mclinker support: -fuse-ld=mcld
See http://code.google.com/p/mclinker/
6502f082fed932c0609b475d5d6917103700e5a8
Change-Id: I3c782584f43a8216d868e016d5f416a574402702
Diffstat (limited to 'gcc-4.8')
-rw-r--r-- | gcc-4.8/gcc/collect2.c | 6 | ||||
-rw-r--r-- | gcc-4.8/gcc/doc/invoke.texi | 3 | ||||
-rw-r--r-- | gcc-4.8/gcc/gcc.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/gcc-4.8/gcc/collect2.c b/gcc-4.8/gcc/collect2.c index 99dd41dc1..dc094ed02 100644 --- a/gcc-4.8/gcc/collect2.c +++ b/gcc-4.8/gcc/collect2.c @@ -846,6 +846,7 @@ main (int argc, char **argv) USE_PLUGIN_LD, USE_GOLD_LD, USE_BFD_LD, + USE_MCLD_LD, USE_LD_MAX } selected_linker = USE_DEFAULT_LD; static const char *const ld_suffixes[USE_LD_MAX] = @@ -854,6 +855,7 @@ main (int argc, char **argv) PLUGIN_LD_SUFFIX, "ld.gold", "ld.bfd" + "ld.mcld" }; static const char *const real_ld_suffix = "real-ld"; static const char *const collect_ld_suffix = "collect-ld"; @@ -1020,6 +1022,8 @@ main (int argc, char **argv) selected_linker = USE_BFD_LD; else if (strcmp (argv[i], "-fuse-ld=gold") == 0) selected_linker = USE_GOLD_LD; + else if (strcmp (argv[i], "-fuse-ld=mcld") == 0) + selected_linker = USE_MCLD_LD; #ifdef COLLECT_EXPORT_LIST /* These flags are position independent, although their order @@ -1288,7 +1292,7 @@ main (int argc, char **argv) else if (!use_collect_ld && strncmp (arg, "-fuse-ld=", 9) == 0) { - /* Do not pass -fuse-ld={bfd|gold} to the linker. */ + /* Do not pass -fuse-ld={bfd|gold|mcld} to the linker. */ ld1--; ld2--; } diff --git a/gcc-4.8/gcc/doc/invoke.texi b/gcc-4.8/gcc/doc/invoke.texi index 9273d7d7c..6ef6039c5 100644 --- a/gcc-4.8/gcc/doc/invoke.texi +++ b/gcc-4.8/gcc/doc/invoke.texi @@ -8437,6 +8437,9 @@ Use the @command{bfd} linker instead of the default linker. @item -fuse-ld=gold Use the @command{gold} linker instead of the default linker. +@item -fuse-ld=mcld +Use the @command{mcld} linker instead of the default linker. + @item -fcprop-registers @opindex fcprop-registers After register allocation and post-register allocation instruction splitting, diff --git a/gcc-4.8/gcc/gcc.c b/gcc-4.8/gcc/gcc.c index 86077f8cf..f0b946e5e 100644 --- a/gcc-4.8/gcc/gcc.c +++ b/gcc-4.8/gcc/gcc.c @@ -537,7 +537,7 @@ proper position among the other output files. */ shared library ordering, and we keep the wrapper function in libgcc. This is not yet a real spec, though it could become one; it is currently just stuffed into LINK_SPEC. FIXME: This wrapping - only works with GNU ld and gold. FIXME: This is incompatible with + only works with GNU ld, gold and mcld. FIXME: This is incompatible with -fmudflap when linking statically, which wants to do its own wrapping. */ #define STACK_SPLIT_SPEC " %{fsplit-stack: --wrap=pthread_create}" |