Skip to content

Commit 295b4f2

Browse files
committed
Makefile: run Rust build on prepare
Some architectures add flags between `prepare0` and `prepare`. This makes e.g. `bindgen` think flags have changed. Thus, instead of running `build` in `prepare0`, do it a bit later in `prepare` since we do not need anything before. This solves the arm64 CI issues we were seeing since the container move: the CI now uses Clang 13 instead of 12, and Clang 13 introduced SysReg Stack Protector Guards which were being set. This also makes the PowerPC hack unnecessary, which was no longer needed anyway since commit 336868a ("powerpc: smp: remove hack to obtain offset of task_struct::cpu"). Signed-off-by: Miguel Ojeda <[email protected]>
1 parent eb2238d commit 295b4f2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,14 +1258,14 @@ archprepare: outputmakefile archheaders archscripts scripts include/config/kerne
12581258
prepare0: archprepare
12591259
$(Q)$(MAKE) $(build)=scripts/mod
12601260
$(Q)$(MAKE) $(build)=.
1261+
1262+
# All the preparing..
1263+
prepare: prepare0
12611264
ifdef CONFIG_RUST
12621265
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust-is-available.sh -v
12631266
$(Q)$(MAKE) $(build)=rust
12641267
endif
12651268

1266-
# All the preparing..
1267-
prepare: prepare0
1268-
12691269
PHONY += remove-stale-files
12701270
remove-stale-files:
12711271
$(Q)$(srctree)/scripts/remove-stale-files

rust/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ else
252252
bindgen_c_flags_lto = $(bindgen_c_flags)
253253
endif
254254

255-
# To avoid several recompilations in PowerPC, which inserts `-D_TASK_CPU`
256-
bindgen_c_flags_final = $(filter-out -D_TASK_CPU=%, $(bindgen_c_flags_lto))
255+
bindgen_c_flags_final = $(bindgen_c_flags_lto)
257256

258257
quiet_cmd_bindgen = BINDGEN $@
259258
cmd_bindgen = \

0 commit comments

Comments
 (0)