summaryrefslogtreecommitdiff
path: root/debian/patches/pr91307.diff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-18 15:53:29 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-18 15:53:29 +0300
commit8f6c4b0033c72f8ac14694c419a99458339dd6a9 (patch)
tree06c106e622a58100aa85a381b9b65d222b076df4 /debian/patches/pr91307.diff
parent42156b5190f4fa150e1fab6777eb81e69d4db8c9 (diff)
downloadgcc-9-debian.tar.gz
Import gcc-9 (9.2.1-19)debian/9.2.1-19debian
Diffstat (limited to 'debian/patches/pr91307.diff')
-rw-r--r--debian/patches/pr91307.diff38
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/pr91307.diff b/debian/patches/pr91307.diff
new file mode 100644
index 0000000..f19dc83
--- /dev/null
+++ b/debian/patches/pr91307.diff
@@ -0,0 +1,38 @@
+# DP: Fix PR lto/91307, reproducible LTO builds, taken from the trunk.
+
+gcc/
+
+2019-08-20 Richard Biener <rguenther@suse.de>
+
+ PR lto/91307
+ * ipa.c (cgraph_build_static_cdtor_1): Use names not recognizable
+ by collect2 when targetm.have_ctors_dtors which avoids dragging
+ in temporary filenames from LTO input objects.
+
+--- a/src/gcc/ipa.c
++++ b/src/gcc/ipa.c
+@@ -836,13 +836,18 @@
+ /* The priority is encoded in the constructor or destructor name.
+ collect2 will sort the names and arrange that they are called at
+ program startup. */
+- if (final)
+- sprintf (which_buf, "%c_%.5d_%d", which, priority, counter++);
++ if (!targetm.have_ctors_dtors && final)
++ {
++ sprintf (which_buf, "%c_%.5d_%d", which, priority, counter++);
++ name = get_file_function_name (which_buf);
++ }
+ else
+- /* Proudce sane name but one not recognizable by collect2, just for the
+- case we fail to inline the function. */
+- sprintf (which_buf, "sub_%c_%.5d_%d", which, priority, counter++);
+- name = get_file_function_name (which_buf);
++ {
++ /* Proudce sane name but one not recognizable by collect2, just for the
++ case we fail to inline the function. */
++ sprintf (which_buf, "_sub_%c_%.5d_%d", which, priority, counter++);
++ name = get_identifier (which_buf);
++ }
+
+ decl = build_decl (input_location, FUNCTION_DECL, name,
+ build_function_type_list (void_type_node, NULL_TREE));