Skip to content

Commit c0ee9bb

Browse files
committed
microblaze: use built-in function to get CPU_{MAJOR,MINOR,REV}
Use built-in functions instead of shell commands to avoid forking processes. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
1 parent 340a025 commit c0ee9bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/microblaze/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\"
66
# What CPU version are we building for, and crack it open
77
# as major.minor.rev
88
CPU_VER := $(CONFIG_XILINX_MICROBLAZE0_HW_VER)
9-
CPU_MAJOR := $(shell echo $(CPU_VER) | cut -d '.' -f 1)
10-
CPU_MINOR := $(shell echo $(CPU_VER) | cut -d '.' -f 2)
11-
CPU_REV := $(shell echo $(CPU_VER) | cut -d '.' -f 3)
9+
CPU_MAJOR := $(word 1, $(subst ., , $(CPU_VER)))
10+
CPU_MINOR := $(word 2, $(subst ., , $(CPU_VER)))
11+
CPU_REV := $(word 3, $(subst ., , $(CPU_VER)))
1212

1313
export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV
1414

0 commit comments

Comments
 (0)