aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-04-14 17:13:32 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-04-22 16:15:20 -0700
commit18a368063d073f4501176ca6d0a979896f11ba1c (patch)
treecba40e4b31952ec50acc2abe081b7a2361a2162e /gcc-4.9
parentf1dea06dc38aa8375598dc0db365a82f0596edac (diff)
downloadtoolchain_gcc-18a368063d073f4501176ca6d0a979896f11ba1c.tar.gz
toolchain_gcc-18a368063d073f4501176ca6d0a979896f11ba1c.tar.bz2
toolchain_gcc-18a368063d073f4501176ca6d0a979896f11ba1c.zip
[4.9] Add mclinker support: -fuse-ld=mcld
See 06b207c97dfb0d70f1f2ef91b93b665dceae0d27, 04288e6d5db307539ffc86eff17dc7fd5a2eb973 and 6914eb3758e3c3db5f50f89da12193c22a0531c4 Change-Id: I94f901d9187c9bc3a9f2f4e24795c4bf0f3a62c0
Diffstat (limited to 'gcc-4.9')
-rw-r--r--gcc-4.9/gcc/collect2.c8
-rw-r--r--gcc-4.9/gcc/common.opt8
-rw-r--r--gcc-4.9/gcc/doc/invoke.texi4
-rw-r--r--gcc-4.9/gcc/gcc.c2
-rw-r--r--gcc-4.9/gcc/opts.c1
5 files changed, 18 insertions, 5 deletions
diff --git a/gcc-4.9/gcc/collect2.c b/gcc-4.9/gcc/collect2.c
index f0ab6b8c8..5a2ec0b5d 100644
--- a/gcc-4.9/gcc/collect2.c
+++ b/gcc-4.9/gcc/collect2.c
@@ -861,6 +861,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] =
@@ -868,7 +869,8 @@ main (int argc, char **argv)
"ld",
PLUGIN_LD_SUFFIX,
"ld.gold",
- "ld.bfd"
+ "ld.bfd",
+ "ld.mcld"
};
static const char *const real_ld_suffix = "real-ld";
static const char *const collect_ld_suffix = "collect-ld";
@@ -1034,6 +1036,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
@@ -1337,7 +1341,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.9/gcc/common.opt b/gcc-4.9/gcc/common.opt
index 2259f29d1..86489996d 100644
--- a/gcc-4.9/gcc/common.opt
+++ b/gcc-4.9/gcc/common.opt
@@ -2254,13 +2254,17 @@ Common Report Var(flag_unwind_tables) Optimization
Just generate unwind tables for exception handling
fuse-ld=bfd
-Common Driver Negative(fuse-ld=gold)
+Common Negative(fuse-ld=gold)
Use the bfd linker instead of the default linker
fuse-ld=gold
-Common Driver Negative(fuse-ld=bfd)
+Common Negative(fuse-ld=mcld)
Use the gold linker instead of the default linker
+fuse-ld=mcld
+Common Negative(fuse-ld=bfd)
+Use the mcld linker instead of the default linker
+
fuse-linker-plugin
Common Undocumented Var(flag_use_linker_plugin)
diff --git a/gcc-4.9/gcc/doc/invoke.texi b/gcc-4.9/gcc/doc/invoke.texi
index 2d43457c2..8ecb44565 100644
--- a/gcc-4.9/gcc/doc/invoke.texi
+++ b/gcc-4.9/gcc/doc/invoke.texi
@@ -8784,6 +8784,10 @@ Use the @command{bfd} linker instead of the default linker.
@opindex fuse-ld=gold
Use the @command{gold} linker instead of the default linker.
+@item -fuse-ld=mcld
+@opindex 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.9/gcc/gcc.c b/gcc-4.9/gcc/gcc.c
index 5cb485acb..4becac64a 100644
--- a/gcc-4.9/gcc/gcc.c
+++ b/gcc-4.9/gcc/gcc.c
@@ -534,7 +534,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. */
+ only works with GNU ld, gold and mcld. */
#define STACK_SPLIT_SPEC " %{fsplit-stack: --wrap=pthread_create}"
#ifndef LIBASAN_SPEC
diff --git a/gcc-4.9/gcc/opts.c b/gcc-4.9/gcc/opts.c
index fdc903f92..d6c254802 100644
--- a/gcc-4.9/gcc/opts.c
+++ b/gcc-4.9/gcc/opts.c
@@ -1900,6 +1900,7 @@ common_handle_option (struct gcc_options *opts,
case OPT_fuse_ld_bfd:
case OPT_fuse_ld_gold:
+ case OPT_fuse_ld_mcld:
case OPT_fuse_linker_plugin:
/* No-op. Used by the driver and passed to us because it starts with f.*/
break;