]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set target-specific C compiler via SRC_CC
authorAlan T. DeKok <aland@freeradius.org>
Thu, 5 May 2022 12:47:05 +0000 (14:47 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 5 May 2022 12:47:05 +0000 (14:47 +0200)
which should usually be $(COMPILE.c)

scripts/boiler.mk

index cd40623faa30eb9d21da361c2e4d603a29cee6fe..3be6213519757f6649aaaeda4c903a89c108e6be 100644 (file)
@@ -325,7 +325,7 @@ ifeq "$(CPPCHECK)" ""
 define COMPILE_C_CMDS
        $(Q)mkdir -p $(dir $@)
        $(Q)$(ECHO) CC $<
-       $(Q)$(strip ${COMPILE.c} -o $@ -c -MD ${CPPFLAGS} ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
+       $(Q)$(strip ${SRC_CC} -o $@ -c -MD ${CPPFLAGS} ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
            $(addprefix -I, ${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} $<)
 endef
 else
@@ -391,6 +391,7 @@ define INCLUDE_SUBMAKEFILE
 
     SOURCES :=
     HEADERS :=
+    SRC_CC := $(COMPILE.c)
     SRC_CFLAGS :=
     SRC_CXXFLAGS :=
     SRC_DEFS :=
@@ -524,6 +525,7 @@ define INCLUDE_SUBMAKEFILE
         # A "hook" to define variables needed by the "legacy" makefiles.
         $$(eval $$(call ADD_LEGACY_VARIABLES,$$(dir ${1}),$${TGT}))
 
+        $${OBJS}: SRC_CC := $${SRC_CC}
         $${OBJS}: SRC_CFLAGS := $${SRC_CFLAGS}
         $${OBJS}: SRC_CXXFLAGS := $${SRC_CXXFLAGS}
         $${OBJS}: SRC_DEFS := $$(addprefix -D,$${SRC_DEFS})