Module Name:    src
Committed By:   christos
Date:           Sun Sep  3 18:47:45 UTC 2023

Modified Files:
        src/external/gpl3/gcc/dist/gcc: ubsan.cc

Log Message:
remap generated ubsan filename string labels. fixes reproducible builds.
reported by wiz@


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/ubsan.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/ubsan.cc
diff -u src/external/gpl3/gcc/dist/gcc/ubsan.cc:1.1.1.1 src/external/gpl3/gcc/dist/gcc/ubsan.cc:1.2
--- src/external/gpl3/gcc/dist/gcc/ubsan.cc:1.1.1.1	Sun Jul 30 01:20:53 2023
+++ src/external/gpl3/gcc/dist/gcc/ubsan.cc	Sun Sep  3 14:47:45 2023
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3.  
 #include "tree-cfg.h"
 #include "gimple-fold.h"
 #include "varasm.h"
+#include "file-prefix-map.h"
 
 /* Map from a tree to a VAR_DECL tree.  */
 
@@ -304,8 +305,9 @@ ubsan_source_location (location_t loc)
   else
     {
       /* Fill in the values from LOC.  */
-      size_t len = strlen (xloc.file) + 1;
-      str = build_string (len, xloc.file);
+      const char *file = remap_debug_filename (xloc.file);
+      size_t len = strlen (file) + 1;
+      str = build_string (len, file);
       TREE_TYPE (str) = build_array_type_nelts (char_type_node, len);
       TREE_READONLY (str) = 1;
       TREE_STATIC (str) = 1;

Reply via email to