[debrepatch] 01/01: toolchain-patches: gcc-7: more unbackporting
Ximin Luo
infinity0 at debian.org
Mon Aug 7 22:56:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository debrepatch.
commit 8de3aba85df240a1c957bc2352c7902961fad3fa
Author: Ximin Luo <infinity0 at debian.org>
Date: Tue Aug 8 00:53:50 2017 +0200
toolchain-patches: gcc-7: more unbackporting
---
toolchain-patches/gcc-7_BPPM.patch | 88 ++++++++++++++++++++------------------
1 file changed, 46 insertions(+), 42 deletions(-)
diff --git a/toolchain-patches/gcc-7_BPPM.patch b/toolchain-patches/gcc-7_BPPM.patch
index aa527cf..a2572d3 100644
--- a/toolchain-patches/gcc-7_BPPM.patch
+++ b/toolchain-patches/gcc-7_BPPM.patch
@@ -29,7 +29,7 @@ only in patch2:
unchanged:
--- gcc-7-7.1.0.orig/debian/patches/BPPM_env_FILE_macro.diff
+++ gcc-7-7.1.0/debian/patches/BPPM_env_FILE_macro.diff
-@@ -0,0 +1,229 @@
+@@ -0,0 +1,233 @@
+Subject: [PATCH 2/3] Use BUILD_PATH_PREFIX_MAP envvar to transform __FILE__
+
+Use the BUILD_PATH_PREFIX_MAP environment variable when expanding the __FILE__
@@ -54,7 +54,7 @@ unchanged:
+
+gcc/c-family/ChangeLog:
+
-+2017-03-27 Ximin Luo <infinity0 at pwned.gg>
++2017-07-21 Ximin Luo <infinity0 at pwned.gg>
+
+ * c-common.c (cb_get_build_path_prefix_map): Define new call target.
+ * c-common.h (cb_get_build_path_prefix_map): Declare call target.
@@ -62,7 +62,7 @@ unchanged:
+
+libcpp/ChangeLog:
+
-+2017-03-27 Ximin Luo <infinity0 at pwned.gg>
++2017-07-21 Ximin Luo <infinity0 at pwned.gg>
+
+ * include/cpplib.h (cpp_callbacks): Add get_build_path_prefix_map
+ callback.
@@ -73,15 +73,15 @@ unchanged:
+
+gcc/testsuite/ChangeLog:
+
-+2017-03-27 Ximin Luo <infinity0 at pwned.gg>
++2017-07-21 Ximin Luo <infinity0 at pwned.gg>
+
+ * gcc.dg/cpp/build_path_prefix_map-1.c: New test.
+ * gcc.dg/cpp/build_path_prefix_map-2.c: New test.
+
-+Index: b/src/gcc/c-family/c-common.c
++Index: x/src/gcc/c-family/c-common.c
+===================================================================
-+--- a/src/gcc/c-family/c-common.c
-++++ b/src/gcc/c-family/c-common.c
++--- x/src.orig/gcc/c-family/c-common.c
+++++ x/src/gcc/c-family/c-common.c
+@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.
+
+ #include "config.h"
@@ -90,7 +90,7 @@ unchanged:
+ #include "coretypes.h"
+ #include "target.h"
+ #include "function.h"
-+@@ -8005,4 +8006,23 @@ cb_get_source_date_epoch (cpp_reader *pf
++@@ -7905,6 +7906,25 @@ cb_get_source_date_epoch (cpp_reader *pf
+ return (time_t) epoch;
+ }
+
@@ -113,12 +113,14 @@ unchanged:
++ return NULL;
++}
++
-+ #include "gt-c-family-c-common.h"
-+Index: b/src/gcc/c-family/c-common.h
++ /* Callback for libcpp for offering spelling suggestions for misspelled
++ directives. GOAL is an unrecognized string; CANDIDATES is a
++ NULL-terminated array of candidate strings. Return the closest
++Index: x/src/gcc/c-family/c-common.h
+===================================================================
-+--- a/src/gcc/c-family/c-common.h
-++++ b/src/gcc/c-family/c-common.h
-+@@ -1085,6 +1085,11 @@ extern time_t cb_get_source_date_epoch (
++--- x/src.orig/gcc/c-family/c-common.h
+++++ x/src/gcc/c-family/c-common.h
++@@ -1084,6 +1084,11 @@ extern time_t cb_get_source_date_epoch (
+ __TIME__ can store. */
+ #define MAX_SOURCE_DATE_EPOCH HOST_WIDE_INT_C (253402300799)
+
@@ -127,38 +129,39 @@ unchanged:
++ Returns NULL if BUILD_PATH_PREFIX_MAP is badly formed. */
++extern prefix_map **cb_get_build_path_prefix_map (cpp_reader *pfile);
++
-+ /* In c-gimplify.c */
-+ extern void c_genericize (tree);
-+ extern int c_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
-+Index: b/src/gcc/c-family/c-lex.c
++ /* Callback for libcpp for offering spelling suggestions for misspelled
++ directives. */
++ extern const char *cb_get_suggestion (cpp_reader *, const char *,
++Index: x/src/gcc/c-family/c-lex.c
+===================================================================
-+--- a/src/gcc/c-family/c-lex.c
-++++ b/src/gcc/c-family/c-lex.c
++--- x/src.orig/gcc/c-family/c-lex.c
+++++ x/src/gcc/c-family/c-lex.c
+@@ -81,6 +81,7 @@ init_c_lex (void)
+ cb->read_pch = c_common_read_pch;
+ cb->has_attribute = c_common_has_attribute;
+ cb->get_source_date_epoch = cb_get_source_date_epoch;
++ cb->get_build_path_prefix_map = cb_get_build_path_prefix_map;
++ cb->get_suggestion = cb_get_suggestion;
+
+ /* Set the debug callbacks if we can use them. */
-+ if ((debug_info_level == DINFO_LEVEL_VERBOSE
-+Index: b/src/libcpp/include/cpplib.h
++Index: x/src/libcpp/include/cpplib.h
+===================================================================
-+--- a/src/libcpp/include/cpplib.h
-++++ b/src/libcpp/include/cpplib.h
-+@@ -607,5 +607,8 @@ struct cpp_callbacks
++--- x/src.orig/libcpp/include/cpplib.h
+++++ x/src/libcpp/include/cpplib.h
++@@ -607,6 +607,9 @@ struct cpp_callbacks
+ /* Callback to parse SOURCE_DATE_EPOCH from environment. */
+ time_t (*get_source_date_epoch) (cpp_reader *);
-++
++
++ /* Callback to parse BUILD_PATH_PREFIX_MAP from environment. */
++ struct prefix_map **(*get_build_path_prefix_map) (cpp_reader *);
-+ };
+++
++ /* Callback for providing suggestions for misspelled directives. */
++ const char *(*get_suggestion) (cpp_reader *, const char *, const char *const *);
+
-+ #ifdef VMS
-+Index: b/src/libcpp/init.c
++Index: x/src/libcpp/init.c
+===================================================================
-+--- a/src/libcpp/init.c
-++++ b/src/libcpp/init.c
++--- x/src.orig/libcpp/init.c
+++++ x/src/libcpp/init.c
+@@ -261,6 +261,9 @@ cpp_create_reader (enum c_lang lang, cpp
+ /* Initialize source_date_epoch to -2 (not yet set). */
+ pfile->source_date_epoch = (time_t) -2;
@@ -169,10 +172,10 @@ unchanged:
+ /* The expression parser stack. */
+ _cpp_expand_op_stack (pfile);
+
-+Index: b/src/libcpp/internal.h
++Index: x/src/libcpp/internal.h
+===================================================================
-+--- a/src/libcpp/internal.h
-++++ b/src/libcpp/internal.h
++--- x/src.orig/libcpp/internal.h
+++++ x/src/libcpp/internal.h
+@@ -507,6 +507,11 @@ struct cpp_reader
+ set to -1 to disable it or to a non-negative value to enable it. */
+ time_t source_date_epoch;
@@ -185,10 +188,10 @@ unchanged:
+ /* EOF token, and a token forcing paste avoidance. */
+ cpp_token avoid_paste;
+ cpp_token eof;
-+Index: b/src/libcpp/macro.c
++Index: x/src/libcpp/macro.c
+===================================================================
-+--- a/src/libcpp/macro.c
-++++ b/src/libcpp/macro.c
++--- x/src.orig/libcpp/macro.c
+++++ x/src/libcpp/macro.c
+@@ -26,6 +26,7 @@ along with this program; see the file CO
+ #include "system.h"
+ #include "cpplib.h"
@@ -227,10 +230,10 @@ unchanged:
+ len = strlen (name);
+ buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
+ result = buf;
-+Index: b/src/gcc/testsuite/gcc.dg/cpp/build_path_prefix_map-1.c
++Index: x/src/gcc/testsuite/gcc.dg/cpp/build_path_prefix_map-1.c
+===================================================================
+--- /dev/null
-++++ b/src/gcc/testsuite/gcc.dg/cpp/build_path_prefix_map-1.c
+++++ x/src/gcc/testsuite/gcc.dg/cpp/build_path_prefix_map-1.c
+@@ -0,0 +1,11 @@
++/* __FILE__ should strip BUILD_PATH_PREFIX_MAP if the latter is a prefix. */
++/* { dg-do run } */
@@ -243,19 +246,20 @@ unchanged:
++ __builtin_abort ();
++ return 0;
++}
-+Index: b/src/gcc/testsuite/gcc.dg/cpp/build_path_prefix_map-2.c
++Index: x/src/gcc/testsuite/gcc.dg/cpp/build_path_prefix_map-2.c
+===================================================================
+--- /dev/null
-++++ b/src/gcc/testsuite/gcc.dg/cpp/build_path_prefix_map-2.c
-+@@ -0,0 +1,11 @@
+++++ x/src/gcc/testsuite/gcc.dg/cpp/build_path_prefix_map-2.c
++@@ -0,0 +1,12 @@
++/* __FILE__ should not be relative if BUILD_PATH_PREFIX_MAP is not set, and gcc is
++ asked to compile an absolute filename as is the case with this test. */
++/* { dg-do run } */
+++/* { dg-set-compiler-env-var BUILD_PATH_PREFIX_MAP } */
++
++int
++main ()
++{
-++ if (__builtin_strcmp (__FILE__, "./gcc.dg/cpp/build_path_prefix_map-1.c") == 0)
+++ if (__builtin_strcmp (__FILE__, "./gcc.dg/cpp/build_path_prefix_map-2.c") == 0)
++ __builtin_abort ();
++ return 0;
++}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debrepatch.git
More information about the Reproducible-commits
mailing list