]>
Commit | Line | Data |
---|---|---|
427cc94b GKH |
1 | From 259799ea5a9aa099a267f3b99e1f7078bbaf5c5e Mon Sep 17 00:00:00 2001 |
2 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | |
3 | Date: Fri, 10 May 2019 21:00:25 +1200 | |
4 | Subject: gcc-plugins: arm_ssp_per_task_plugin: Fix for older GCC < 6 | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | |
10 | ||
11 | commit 259799ea5a9aa099a267f3b99e1f7078bbaf5c5e upstream. | |
12 | ||
13 | Use gen_rtx_set instead of gen_rtx_SET. The former is a wrapper macro | |
14 | that handles the difference between GCC versions implementing | |
15 | the latter. | |
16 | ||
17 | This fixes the following error on my system with g++ 5.4.0 as the host | |
18 | compiler | |
19 | ||
20 | HOSTCXX -fPIC scripts/gcc-plugins/arm_ssp_per_task_plugin.o | |
21 | scripts/gcc-plugins/arm_ssp_per_task_plugin.c:42:14: error: macro "gen_rtx_SET" requires 3 arguments, but only 2 given | |
22 | mask)), | |
23 | ^ | |
24 | scripts/gcc-plugins/arm_ssp_per_task_plugin.c: In function ‘unsigned int arm_pertask_ssp_rtl_execute()’: | |
25 | scripts/gcc-plugins/arm_ssp_per_task_plugin.c:39:20: error: ‘gen_rtx_SET’ was not declared in this scope | |
26 | emit_insn_before(gen_rtx_SET | |
27 | ||
28 | Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> | |
29 | Fixes: 189af4657186 ("ARM: smp: add support for per-task stack canaries") | |
30 | Cc: stable@vger.kernel.org | |
31 | Tested-by: Douglas Anderson <dianders@chromium.org> | |
32 | Signed-off-by: Kees Cook <keescook@chromium.org> | |
33 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
34 | ||
35 | --- | |
36 | scripts/gcc-plugins/arm_ssp_per_task_plugin.c | 2 +- | |
37 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
38 | ||
39 | --- a/scripts/gcc-plugins/arm_ssp_per_task_plugin.c | |
40 | +++ b/scripts/gcc-plugins/arm_ssp_per_task_plugin.c | |
41 | @@ -36,7 +36,7 @@ static unsigned int arm_pertask_ssp_rtl_ | |
42 | mask = GEN_INT(sext_hwi(sp_mask, GET_MODE_PRECISION(Pmode))); | |
43 | masked_sp = gen_reg_rtx(Pmode); | |
44 | ||
45 | - emit_insn_before(gen_rtx_SET(masked_sp, | |
46 | + emit_insn_before(gen_rtx_set(masked_sp, | |
47 | gen_rtx_AND(Pmode, | |
48 | stack_pointer_rtx, | |
49 | mask)), |