1
0
forked from brl/citadel
citadel/meta-citadel/recipes-kernel/citadel-kernel/files/ignore-sysroot-for-plugin-build.patch

187 lines
8.7 KiB
Diff
Raw Normal View History

2017-12-04 21:33:20 +00:00
diff -uprN a/scripts/gcc-plugins/checker_plugin.c b/scripts/gcc-plugins/checker_plugin.c
--- a/scripts/gcc-plugins/checker_plugin.c 2017-12-03 13:20:42.743986199 -0500
+++ b/scripts/gcc-plugins/checker_plugin.c 2017-12-03 13:33:14.506519393 -0500
@@ -457,7 +457,7 @@ __visible int plugin_init(struct plugin_
// PASS_INFO(context, "ssa", 1, PASS_POS_INSERT_AFTER);
PASS_INFO(context, "phiprop", 1, PASS_POS_INSERT_AFTER);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/colorize_plugin.c b/scripts/gcc-plugins/colorize_plugin.c
--- a/scripts/gcc-plugins/colorize_plugin.c 2017-12-03 13:20:42.743986199 -0500
+++ b/scripts/gcc-plugins/colorize_plugin.c 2017-12-03 13:33:43.865657576 -0500
@@ -121,7 +121,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(colorize_rearm, "*free_lang_data", 1, PASS_POS_INSERT_AFTER);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/constify_plugin.c b/scripts/gcc-plugins/constify_plugin.c
--- a/scripts/gcc-plugins/constify_plugin.c 2017-12-03 13:20:42.744986204 -0500
+++ b/scripts/gcc-plugins/constify_plugin.c 2017-12-03 13:31:56.239151019 -0500
@@ -546,7 +546,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(check_local_variables, "ssa", 1, PASS_POS_INSERT_BEFORE);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/cyc_complexity_plugin.c b/scripts/gcc-plugins/cyc_complexity_plugin.c
--- a/scripts/gcc-plugins/cyc_complexity_plugin.c 2017-12-03 13:20:42.744986204 -0500
+++ b/scripts/gcc-plugins/cyc_complexity_plugin.c 2017-12-03 13:34:33.724892242 -0500
@@ -55,7 +55,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(cyc_complexity, "ssa", 1, PASS_POS_INSERT_AFTER);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
--- a/scripts/gcc-plugins/gcc-common.h 2017-12-03 13:20:42.745986209 -0500
+++ b/scripts/gcc-plugins/gcc-common.h 2017-12-03 13:29:54.228576760 -0500
@@ -189,6 +189,26 @@ static inline tree build_const_char_stri
return cstr;
}
+static inline bool plugin_version_check_buildhack(struct plugin_gcc_version *gcc_version,
+ struct plugin_gcc_version *plugin_version)
+{
+
+ if (!gcc_version || !plugin_version)
+ return false;
+
+ if (strcmp (gcc_version->basever, plugin_version->basever))
+ return false;
+ if (strcmp (gcc_version->datestamp, plugin_version->datestamp))
+ return false;
+ if (strcmp (gcc_version->devphase, plugin_version->devphase))
+ return false;
+ if (strcmp (gcc_version->revision, plugin_version->revision))
+ return false;
+ // if (strcmp (gcc_version->configuration_arguments, plugin_version->configuration_arguments))
+ // return false;
+ return true;
+}
+
static inline void error_gcc_version(struct plugin_gcc_version *version)
{
error(G_("incompatible gcc/plugin versions: need '%s' '%s' '%s' '%s' but have '%s' '%s' '%s' '%s'\n'%s':\n'%s'"),
diff -uprN a/scripts/gcc-plugins/initify_plugin.c b/scripts/gcc-plugins/initify_plugin.c
--- a/scripts/gcc-plugins/initify_plugin.c 2017-12-03 13:20:42.744986204 -0500
+++ b/scripts/gcc-plugins/initify_plugin.c 2017-12-03 13:32:44.566378477 -0500
@@ -1819,7 +1819,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(initify, "inline", 1, PASS_POS_INSERT_AFTER);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/kallocstat_plugin.c b/scripts/gcc-plugins/kallocstat_plugin.c
--- a/scripts/gcc-plugins/kallocstat_plugin.c 2017-12-03 13:20:42.744986204 -0500
+++ b/scripts/gcc-plugins/kallocstat_plugin.c 2017-12-03 13:33:57.240720527 -0500
@@ -119,7 +119,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(kallocstat, "ssa", 1, PASS_POS_INSERT_AFTER);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/kernexec_plugin.c b/scripts/gcc-plugins/kernexec_plugin.c
--- a/scripts/gcc-plugins/kernexec_plugin.c 2017-12-03 13:20:42.744986204 -0500
+++ b/scripts/gcc-plugins/kernexec_plugin.c 2017-12-03 13:34:23.499844120 -0500
@@ -360,7 +360,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(kernexec_fptr, "pre", 1, PASS_POS_INSERT_AFTER);
PASS_INFO(kernexec_retaddr, "pro_and_epilogue", 1, PASS_POS_INSERT_AFTER);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/latent_entropy_plugin.c b/scripts/gcc-plugins/latent_entropy_plugin.c
--- a/scripts/gcc-plugins/latent_entropy_plugin.c 2017-12-03 13:20:42.745986209 -0500
+++ b/scripts/gcc-plugins/latent_entropy_plugin.c 2017-12-03 13:34:09.419777850 -0500
@@ -584,7 +584,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(latent_entropy, "optimized", 1, PASS_POS_INSERT_BEFORE);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/randomize_layout_plugin.c b/scripts/gcc-plugins/randomize_layout_plugin.c
--- a/scripts/gcc-plugins/randomize_layout_plugin.c 2017-12-03 13:20:42.745986209 -0500
+++ b/scripts/gcc-plugins/randomize_layout_plugin.c 2017-12-03 13:32:55.752431126 -0500
@@ -894,7 +894,7 @@ __visible int plugin_init(struct plugin_
find_bad_casts_pass_info.ref_pass_instance_number = 1;
find_bad_casts_pass_info.pos_op = PASS_POS_INSERT_AFTER;
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error(G_("incompatible gcc/plugin versions"));
return 1;
}
diff -uprN a/scripts/gcc-plugins/sancov_plugin.c b/scripts/gcc-plugins/sancov_plugin.c
--- a/scripts/gcc-plugins/sancov_plugin.c 2017-12-03 13:20:42.745986209 -0500
+++ b/scripts/gcc-plugins/sancov_plugin.c 2017-12-03 13:33:29.458589768 -0500
@@ -114,7 +114,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(sancov, "nrv", 1, PASS_POS_INSERT_BEFORE);
#endif
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/size_overflow_plugin/size_overflow_plugin.c b/scripts/gcc-plugins/size_overflow_plugin/size_overflow_plugin.c
--- a/scripts/gcc-plugins/size_overflow_plugin/size_overflow_plugin.c 2017-12-03 13:20:42.755986255 -0500
+++ b/scripts/gcc-plugins/size_overflow_plugin/size_overflow_plugin.c 2017-12-03 13:32:32.419321305 -0500
@@ -242,7 +242,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(disable_ubsan_si_overflow, "ubsan", 1, PASS_POS_REPLACE);
#endif
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/stackleak_plugin.c b/scripts/gcc-plugins/stackleak_plugin.c
--- a/scripts/gcc-plugins/stackleak_plugin.c 2017-12-03 13:20:42.745986209 -0500
+++ b/scripts/gcc-plugins/stackleak_plugin.c 2017-12-03 13:32:13.267231164 -0500
@@ -304,7 +304,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(stackleak_tree_instrument, "optimized", 1, PASS_POS_INSERT_BEFORE);
PASS_INFO(stackleak_final, "final", 1, PASS_POS_INSERT_BEFORE);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}
diff -uprN a/scripts/gcc-plugins/structleak_plugin.c b/scripts/gcc-plugins/structleak_plugin.c
--- a/scripts/gcc-plugins/structleak_plugin.c 2017-12-03 13:20:42.745986209 -0500
+++ b/scripts/gcc-plugins/structleak_plugin.c 2017-12-03 13:31:29.704026128 -0500
@@ -206,7 +206,7 @@ __visible int plugin_init(struct plugin_
PASS_INFO(structleak, "early_optimizations", 1, PASS_POS_INSERT_BEFORE);
- if (!plugin_default_version_check(version, &gcc_version)) {
+ if (!plugin_version_check_buildhack(version, &gcc_version)) {
error_gcc_version(version);
return 1;
}