Maximilian Brune has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83377?usp=email )
Change subject: Makefile.mk: Remove bc dependency ......................................................................
Makefile.mk: Remove bc dependency
bc was added as dependency in commit 229e021110 ("Makefile.inc: Add left shift macro")
bc is not stated as dependency in our docs (e.g. package installation). If you don't have bc installed you can easily get false positives on coreboot builds. For example you build a mainboard and coreboot tells you the build succeeded, even though you don't have bc installed.
This patch uses the left shift operator inside arithmetic expansion. Every posix shell should support this.
Tested: Build amd/birman mainboard and check that the soft-fuse paramter doesn't change.
Signed-off-by: Maximilian Brune maximilian.brune@9elements.com
Signed-off-by: Maximilian Brune maximilian.brune@9elements.com Change-Id: If3b29dae727875b0788100a2cb02c86736ffaf8c --- M Makefile.mk 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/83377/1
diff --git a/Makefile.mk b/Makefile.mk index 68fc8c9..b4532c3 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -178,7 +178,7 @@ int-multiply=$(if $(filter 1,$(words $1)),$(strip $1),$(call int-multiply,$(call _int-multiply2,$(word 1,$1),$(word 2,$1)) $(wordlist 3,$(words $1),$1))) int-divide=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) / $(call _toint,$(word 2,$1)))) int-remainder=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) % $(call _toint,$(word 2,$1)))) -int-shift-left=$(shell echo "$(call _toint,$(word 1, $1)) * (2 ^ $(call _toint,$(word 2, $1)))" | bc) +int-shift-left=$(shell echo -n $$(($(call _toint,$(word 1, $1)) << $(call _toint,$(word 2, $1))))) int-lt=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) < $(call _toint,$(word 2,$1)))) int-gt=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) > $(call _toint,$(word 2,$1)))) int-eq=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) = $(call _toint,$(word 2,$1))))