Skip to content

Commit

Permalink
certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty
Browse files Browse the repository at this point in the history
Since b8c96a6 ("certs: simplify $(srctree)/ handling and remove
config_filename macro"), when CONFIG_MODULE_SIG_KEY is empty,
signing_key.x509 fails to build:

    CERT    certs/signing_key.x509
  Usage: extract-cert <source> <dest>
  make[1]: *** [certs/Makefile:78: certs/signing_key.x509] Error 2
  make: *** [Makefile:1831: certs] Error 2

Pass "" to the first argument of extract-cert to fix the build error.

Link: https://lore.kernel.org/linux-kbuild/[email protected]/T/#u
Fixes: b8c96a6 ("certs: simplify $(srctree)/ handling and remove config_filename macro")
Reported-by: Michal Kubecek <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Tested-by: Michal Kubecek <[email protected]>
  • Loading branch information
masahir0y committed Jan 22, 2022
1 parent ad29a2f commit e6340b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion certs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ endif
$(obj)/system_certificates.o: $(obj)/signing_key.x509

$(obj)/signing_key.x509: $(X509_DEP) $(obj)/extract-cert FORCE
$(call if_changed,extract_certs,$(if $(X509_DEP),$<,$(CONFIG_MODULE_SIG_KEY)))
$(call if_changed,extract_certs,$(if $(CONFIG_MODULE_SIG_KEY),$(if $(X509_DEP),$<,$(CONFIG_MODULE_SIG_KEY)),""))
endif # CONFIG_MODULE_SIG

targets += signing_key.x509
Expand Down

0 comments on commit e6340b6

Please sign in to comment.