GCC 10 fixes for gcc-plugins
- Adjust caller of cgraph_create_edge for GCC 10 argument usage - Update common headers to build under GCC 10 (Frédéric Pierret) -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAl6wVFcWHGtlZXNjb29r QGNocm9taXVtLm9yZwAKCRCJcvTf3G3AJnjUEACFtFxX4V7fVEfZuHeEuiIjiQVM 3QKsFMIoQLHo3brY/D+jUR2cFy+QgLLdfezY2noHBD14+fL9JBB90iGJHeZo5JWH r/5XRD2bh1YWd0lM+JZ4KvR09cy9qFIDaUXA0yfYklB2CxM6YQpWFIJ2+zqfjABj +WcJdPq++Y5MX1pj0metgE5YjCKybTV9UYqMskq1ScvP9l1Vxuw3lffccd5lMF5s +VZT+NpSX/LibWN5XeLJG14WFikrAW2J3ljRtCKU0mrdU7D7+jHPci9HEm4fbuAP xJYhNfb1c5Ngkd8mVrFZISVP245NI5DYEPD05IcZFOMj0GOkaJ1D/nEhwbkR35I8 ospCASimQm86cA4s+AWurn6zmxWJ0gFhqUplXKO3ra6A4nfwoJxLJ7kNw81GpEpo vpFtssihB7CMw6roDiXDwt0avByK9uxjKiwkZ8ibK65Tp3ZOzLQLRNn7BUlSdi0I FHjPoGSJmWxDetJCbHR7nquCkycnP7dr0aF3078CSOuVIOgroLiEGDT+QJ29QxhU FZIZmJclDr3XXb+GdAsGe2Kwotm8H/6DyrCnZwkSVsV2y5Y7qs8xUaUqDImIZOph lmMzxKWVhLaXvxGw5twXamT4eKU+Mk2ypVIXA/lv+GsbMn9mcLwanJWydtrp/jdA NnNB3QrzJNCdr7MDhg== =b6Xw -----END PGP SIGNATURE----- Merge tag 'gcc-plugins-v5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugins fixes from Kees Cook: "GCC 10 fixes for gcc-plugins: - Adjust caller of cgraph_create_edge for GCC 10 argument usage - Update common headers to build under GCC 10 (Frédéric Pierret)" * tag 'gcc-plugins-v5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-common.h: Update for GCC 10 gcc-plugins/stackleak: Avoid assignment for unused macro argument
This commit is contained in:
Коммит
9851a0dee7
|
@ -4,6 +4,7 @@ GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
|
|||
HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti
|
||||
HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb
|
||||
HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable -Wno-c++11-compat
|
||||
HOST_EXTRACXXFLAGS += -Wno-format-diag
|
||||
|
||||
$(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h
|
||||
quiet_cmd_create_randomize_layout_seed = GENSEED $@
|
||||
|
|
|
@ -35,7 +35,9 @@
|
|||
#include "ggc.h"
|
||||
#include "timevar.h"
|
||||
|
||||
#if BUILDING_GCC_VERSION < 10000
|
||||
#include "params.h"
|
||||
#endif
|
||||
|
||||
#if BUILDING_GCC_VERSION <= 4009
|
||||
#include "pointer-set.h"
|
||||
|
@ -847,6 +849,7 @@ static inline gimple gimple_build_assign_with_ops(enum tree_code subcode, tree l
|
|||
return gimple_build_assign(lhs, subcode, op1, op2 PASS_MEM_STAT);
|
||||
}
|
||||
|
||||
#if BUILDING_GCC_VERSION < 10000
|
||||
template <>
|
||||
template <>
|
||||
inline bool is_a_helper<const ggoto *>::test(const_gimple gs)
|
||||
|
@ -860,6 +863,7 @@ inline bool is_a_helper<const greturn *>::test(const_gimple gs)
|
|||
{
|
||||
return gs->code == GIMPLE_RETURN;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline gasm *as_a_gasm(gimple stmt)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,6 @@ static void stackleak_add_track_stack(gimple_stmt_iterator *gsi, bool after)
|
|||
gimple stmt;
|
||||
gcall *stackleak_track_stack;
|
||||
cgraph_node_ptr node;
|
||||
int frequency;
|
||||
basic_block bb;
|
||||
|
||||
/* Insert call to void stackleak_track_stack(void) */
|
||||
|
@ -68,9 +67,9 @@ static void stackleak_add_track_stack(gimple_stmt_iterator *gsi, bool after)
|
|||
bb = gimple_bb(stackleak_track_stack);
|
||||
node = cgraph_get_create_node(track_function_decl);
|
||||
gcc_assert(node);
|
||||
frequency = compute_call_stmt_bb_frequency(current_function_decl, bb);
|
||||
cgraph_create_edge(cgraph_get_node(current_function_decl), node,
|
||||
stackleak_track_stack, bb->count, frequency);
|
||||
stackleak_track_stack, bb->count,
|
||||
compute_call_stmt_bb_frequency(current_function_decl, bb));
|
||||
}
|
||||
|
||||
static bool is_alloca(gimple stmt)
|
||||
|
|
Загрузка…
Ссылка в новой задаче