Skip to content

Commit

Permalink
chore(driver): pass also CC env variable if set.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Mar 8, 2024
1 parent 002af52 commit a5463db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions driver/configure/Makefile.inc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
MODULE_MAKEFILE_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

# Run the module build.sh (wrapper for make) script with an empty environment, but PATH
HAS_@CONFIGURE_MODULE@ := $(shell env -i KBUILD_MODPOST_WARN=$(KBUILD_MODPOST_WARN) PATH="$(PATH)" KERNELDIR="$(KERNELDIR)" sh $(MODULE_MAKEFILE_DIR)/build.sh ; echo $$?)
# Run the module build.sh (wrapper for make) script with an empty environment,
# but pass PATH, KERNELDIR and eventually (if set) CC and KBUILD_MODPOST_WARN.
# The latter ones are used by driverkit build templates.
HAS_@CONFIGURE_MODULE@ := $(shell env -i CC=$(CC) KBUILD_MODPOST_WARN=$(KBUILD_MODPOST_WARN) PATH="$(PATH)" KERNELDIR="$(KERNELDIR)" sh $(MODULE_MAKEFILE_DIR)/build.sh ; echo $$?)

ifeq ($(HAS_@CONFIGURE_MODULE@),0)
$(info [configure] Setting HAS_@CONFIGURE_MODULE@ flag)
Expand Down

0 comments on commit a5463db

Please sign in to comment.