Skip to content

Commit d72e5ed

Browse files
committed
kbuild: avoid environment to set variables used by kbuild
A few of the variables used by kbuild has fixed naming. Make sure we do not pick up random values from the environment. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent 7015030 commit d72e5ed

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎scripts/Makefile.build‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ src := $(obj)
77
PHONY := __build
88
__build:
99

10+
# Init all relevant variables used in kbuild files so
11+
# 1) they have correct type
12+
# 2) they do not inherit any value from the environment
13+
obj-y :=
14+
obj-m :=
15+
lib-y :=
16+
lib-m :=
17+
always :=
18+
targets :=
19+
subdir-y :=
20+
subdir-m :=
21+
EXTRA_AFLAGS :=
22+
EXTRA_CFLAGS :=
23+
EXTRA_CPPFLAGS :=
24+
EXTRA_LDFLAGS :=
25+
1026
# Read .config if it exist, otherwise ignore
1127
-include include/config/auto.conf
1228

0 commit comments

Comments
 (0)