소스 검색

qcacmn: Use file for include path instead of environment variable

The include path passed to the CFLAGS may get very long in few cases
and passing them to the compiler results in the error
"arguments too long" from the shell.

We can pass the same argument by writing the include paths
to a file and avoid these errors when there are many include
paths added.

Change-Id: I2788d6e97a854ae6272d665943d56d581dc002bf
CRs-Fixed: 2999763
Vivek 3 년 전
부모
커밋
f4b29f3ad5
3개의 변경된 파일17개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 1
      iot_sim/Kbuild
  2. 5 1
      qdf/Kbuild
  3. 7 2
      spectral/Kbuild

+ 5 - 1
iot_sim/Kbuild

@@ -117,7 +117,11 @@ INCS += -I$(obj)/$(DEPTH)/cmn_dev/iot_sim/dispatcher/inc
 
 obj-m += qca_iot_sim.o
 
-ccflags-y+= $(INCS) $(COPTS)
+inc_file := $(obj)/$(DEPTH)/iot_inc_opts
+inc_var := $(shell echo $(INCS) > $(inc_file))
+var := "@$(inc_file)"
+
+ccflags-y+= $(var) $(COPTS)
 
 ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
 MOD_CFLAGS = -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(qca_iot_sim.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(qca_iot_sim)"

+ 5 - 1
qdf/Kbuild

@@ -31,7 +31,11 @@ INCS += -I$(obj)/$(HOST_CMN_CONVG_PTT)/inc \
 
 obj-m += qdf.o
 
-EXTRA_CFLAGS+= $(INCS) $(COPTS) -Wno-unused-function
+inc_file := $(obj)/$(DEPTH)/qdf_inc_opts
+inc_var := $(shell echo $(INCS) > $(inc_file))
+var := "@$(inc_file)"
+
+EXTRA_CFLAGS+= $(var) $(COPTS) -Wno-unused-function
 
 ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
 MOD_CFLAGS = -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(qdf.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(qdf)"

+ 7 - 2
spectral/Kbuild

@@ -197,14 +197,19 @@ endif
 
 obj-m += qca_spectral.o
 
-ccflags-y+= $(INCS) $(COPTS) -DSPECTRAL_USE_NETLINK_SOCKETS=1 -DWLAN_SPECTRAL_ENABLE=1
+INCS += -I$(obj)/$(DEPTH)/spectral/dispatcher/inc
+
+inc_file := $(obj)/$(DEPTH)/spectral_inc_opts
+inc_var := $(shell echo $(INCS) > $(inc_file))
+var := "@$(inc_file)"
+
+ccflags-y+= $(var) $(COPTS) -DSPECTRAL_USE_NETLINK_SOCKETS=1 -DWLAN_SPECTRAL_ENABLE=1
 ccflags-y+= -DSPECTRAL_USE_NL_BCAST=1
 
 ifeq ($(strip ${QCA_PARTNER_MAKE_F_SUPPORT}),1)
 MOD_CFLAGS = -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(qca_spectral.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(qca_spectral)"
 endif
 
-INCS += -I$(obj)/$(DEPTH)/spectral/dispatcher/inc
 
 SPECTRAL_TIF_OBJS +=  $(DEPTH)/cmn_dev/target_if/spectral/target_if_spectral.o \
                       $(DEPTH)/cmn_dev/target_if/spectral/target_if_spectral_netlink.o \