[gcc-6] 391/401: * Allow to use lld with -fuse-ld=ld.lld.
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:50:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.
commit fa70f21da456002cf020ad9128f967b77b5d4e5e
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date: Wed Mar 15 13:02:30 2017 +0000
* Allow to use lld with -fuse-ld=ld.lld.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@9366 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
debian/changelog | 1 +
debian/patches/gcc-fuse-ld-lld-doc.diff | 17 +++++++
debian/patches/gcc-fuse-ld-lld.diff | 83 +++++++++++++++++++++++++++++++++
debian/rules.patch | 2 +
4 files changed, 103 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index e917fdd..d862a3b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,7 @@ gcc-6 (6.3.0-9) UNRELEASED; urgency=medium
* Don't ship the gnatgcc manpage symlink when building GFDL packages.
Closes: #857384.
* Install the gcov-dump utility.
+ * Allow to use lld with -fuse-ld=ld.lld.
-- Matthias Klose <doko at debian.org> Mon, 13 Mar 2017 12:57:04 +0100
diff --git a/debian/patches/gcc-fuse-ld-lld-doc.diff b/debian/patches/gcc-fuse-ld-lld-doc.diff
new file mode 100644
index 0000000..6483281
--- /dev/null
+++ b/debian/patches/gcc-fuse-ld-lld-doc.diff
@@ -0,0 +1,17 @@
+# DP: Allow to use lld with -fuse-ld=ld.lld (documentation)
+
+Index: gcc/doc/invoke.texi
+===================================================================
+--- a/src/gcc/doc/invoke.texi (revision 246158)
++++ a/src/gcc/doc/invoke.texi (working copy)
+@@ -10501,6 +10501,10 @@
+ @opindex fuse-ld=gold
+ Use the @command{gold} linker instead of the default linker.
+
++ at item -fuse-ld=lld
++ at opindex fuse-ld=lld
++Use the LLVM @command{lld} linker instead of the default linker.
++
+ @cindex Libraries
+ @item -l at var{library}
+ @itemx -l @var{library}
diff --git a/debian/patches/gcc-fuse-ld-lld.diff b/debian/patches/gcc-fuse-ld-lld.diff
new file mode 100644
index 0000000..1464267
--- /dev/null
+++ b/debian/patches/gcc-fuse-ld-lld.diff
@@ -0,0 +1,83 @@
+# DP: Allow to use lld with -fuse-ld=ld.lld
+
+Index: gcc/collect2.c
+===================================================================
+--- a/src/gcc/collect2.c (revision 246158)
++++ a/src/gcc/collect2.c (working copy)
+@@ -831,6 +831,7 @@
+ USE_PLUGIN_LD,
+ USE_GOLD_LD,
+ USE_BFD_LD,
++ USE_LLD_LD,
+ USE_LD_MAX
+ } selected_linker = USE_DEFAULT_LD;
+ static const char *const ld_suffixes[USE_LD_MAX] =
+@@ -838,7 +839,8 @@
+ "ld",
+ PLUGIN_LD_SUFFIX,
+ "ld.gold",
+- "ld.bfd"
++ "ld.bfd",
++ "ld.lld"
+ };
+ static const char *const real_ld_suffix = "real-ld";
+ static const char *const collect_ld_suffix = "collect-ld";
+@@ -1004,6 +1006,8 @@
+ 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=lld") == 0)
++ selected_linker = USE_LLD_LD;
+
+ #ifdef COLLECT_EXPORT_LIST
+ /* These flags are position independent, although their order
+@@ -1093,7 +1097,8 @@
+ /* Maybe we know the right file to use (if not cross). */
+ ld_file_name = 0;
+ #ifdef DEFAULT_LINKER
+- if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD)
++ if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD ||
++ selected_linker == USE_LLD_LD)
+ {
+ char *linker_name;
+ # ifdef HOST_EXECUTABLE_SUFFIX
+@@ -1307,7 +1312,7 @@
+ 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|lld} to the linker. */
+ ld1--;
+ ld2--;
+ }
+Index: gcc/common.opt
+===================================================================
+--- a/src/gcc/common.opt (revision 246158)
++++ a/src/gcc/common.opt (working copy)
+@@ -2512,9 +2512,13 @@
+ Use the bfd linker instead of the default linker.
+
+ fuse-ld=gold
+-Common Driver Negative(fuse-ld=bfd)
++Common Driver Negative(fuse-ld=lld)
+ Use the gold linker instead of the default linker.
+
++fuse-ld=lld
++Common Driver Negative(fuse-ld=bfd)
++Use the lld LLVM linker instead of the default linker.
++
+ fuse-linker-plugin
+ Common Undocumented Var(flag_use_linker_plugin)
+
+Index: gcc/opts.c
+===================================================================
+--- a/src/gcc/opts.c (revision 246158)
++++ a/src/gcc/opts.c (working copy)
+@@ -2168,6 +2168,7 @@
+
+ case OPT_fuse_ld_bfd:
+ case OPT_fuse_ld_gold:
++ case OPT_fuse_ld_lld:
+ case OPT_fuse_linker_plugin:
+ /* No-op. Used by the driver and passed to us because it starts with f.*/
+ break;
diff --git a/debian/rules.patch b/debian/rules.patch
index df27211..5135ca4 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -32,6 +32,7 @@ ifneq ($(GFDL_INVARIANT_FREE),yes)
gcc-SOURCE_DATE_EPOCH-doc \
gcc-SOURCE_DATE_EPOCH-2-doc \
$(if $(with_linaro_branch),,vulcan-cpu-doc) \
+ gcc-fuse-ld-lld-doc \
# svn-doc-updates \
# $(if $(with_linaro_branch),,svn-doc-updates) \
@@ -110,6 +111,7 @@ debian_patches += \
mips-loongson3a-use-fused-madd.d \
mips-madd4 \
install-gcov-dump \
+ gcc-fuse-ld-lld \
ifeq ($(libstdcxx_abi),new)
debian_patches += libstdc++-functexcept
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git
More information about the Reproducible-commits
mailing list