diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2013-02-21 15:51:55 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-02-21 18:55:45 +0800 |
commit | 6502f082fed932c0609b475d5d6917103700e5a8 (patch) | |
tree | 87e7ee280f219e6f5ef4aeb04e3a9a45c83bffa0 /gcc-4.4.3/gcc/collect2.c | |
parent | 0457b0db02c4b229eab11c01025df948032c31a7 (diff) | |
download | toolchain_gcc-6502f082fed932c0609b475d5d6917103700e5a8.tar.gz toolchain_gcc-6502f082fed932c0609b475d5d6917103700e5a8.tar.bz2 toolchain_gcc-6502f082fed932c0609b475d5d6917103700e5a8.zip |
Add mclinker support: -fuse-ld=mcld
http://code.google.com/p/mclinker/
Change-Id: Ic9d88a86298eddaccf3c7da8405efb2b2f0d3e70
Diffstat (limited to 'gcc-4.4.3/gcc/collect2.c')
-rw-r--r-- | gcc-4.4.3/gcc/collect2.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.4.3/gcc/collect2.c b/gcc-4.4.3/gcc/collect2.c index b7058154a..cb2028d96 100644 --- a/gcc-4.4.3/gcc/collect2.c +++ b/gcc-4.4.3/gcc/collect2.c @@ -767,6 +767,7 @@ main (int argc, char **argv) { static const char *const ld_suffix = "ld"; static const char *const gold_suffix = "ld.gold"; + static const char *const mcld_suffix = "ld.mcld"; static const char *const bfd_ld_suffix = "ld.bfd"; static const char *const real_ld_suffix = "real-ld"; static const char *const collect_ld_suffix = "collect-ld"; @@ -788,6 +789,8 @@ main (int argc, char **argv) concat(target_machine, "-", ld_suffix, NULL); const char *const full_gold_suffix = concat(target_machine, "-", gold_suffix, NULL); + const char *const full_mcld_suffix = + concat(target_machine, "-", mcld_suffix, NULL); const char *const full_bfd_ld_suffix = concat(target_machine, "-", bfd_ld_suffix, NULL); const char *const full_nm_suffix = @@ -805,6 +808,7 @@ main (int argc, char **argv) #else const char *const full_ld_suffix = ld_suffix; const char *const full_gold_suffix = gold_suffix; + const char *const full_mcld_suffix = mcld_suffix; const char *const full_bfd_ld_suffix = bfd_ld_suffix; const char *const full_nm_suffix = nm_suffix; const char *const full_gnm_suffix = gnm_suffix; @@ -830,6 +834,7 @@ main (int argc, char **argv) { DEF_LINKER, GOLD_LINKER, + MCLD_LINKER, BFD_LINKER } selected_linker = DEF_LINKER; @@ -892,6 +897,8 @@ main (int argc, char **argv) debug = 1; else if (! strcmp (argv[i], "-use-gold")) selected_linker = GOLD_LINKER; + else if (! strcmp (argv[i], "-use-mcld")) + selected_linker = MCLD_LINKER; else if (! strcmp (argv[i], "-use-ld")) selected_linker = BFD_LINKER; } @@ -983,6 +990,9 @@ main (int argc, char **argv) case GOLD_LINKER: ld_file_name = find_a_file (&cpath, gold_suffix); break; + case MCLD_LINKER: + ld_file_name = find_a_file (&cpath, mcld_suffix); + break; case BFD_LINKER: ld_file_name = find_a_file (&cpath, bfd_ld_suffix); break; @@ -999,6 +1009,9 @@ main (int argc, char **argv) case GOLD_LINKER: ld_file_name = find_a_file (&path, full_gold_suffix); break; + case MCLD_LINKER: + ld_file_name = find_a_file (&path, full_mcld_suffix); + break; case BFD_LINKER: ld_file_name = find_a_file (&path, full_bfd_ld_suffix); break; @@ -1027,6 +1040,7 @@ main (int argc, char **argv) default: case DEF_LINKER: s = ld_suffix; break; case GOLD_LINKER: s = gold_suffix; break; + case MCLD_LINKER: s = mcld_suffix; break; case BFD_LINKER: s = bfd_ld_suffix; break; } notice (" %s\n", s); @@ -1043,6 +1057,7 @@ main (int argc, char **argv) default: case DEF_LINKER: s = full_ld_suffix; break; case GOLD_LINKER: s = full_gold_suffix; break; + case MCLD_LINKER: s = full_mcld_suffix; break; case BFD_LINKER: s = full_bfd_ld_suffix; break; } notice (" %s\n", s); |