[PATCH] drivers: staging: rtl8188eu: use 'ccflags-y' instead of EXTRA_CFLAGS in Makefile

Larry Finger Larry.Finger at lwfinger.net
Wed Oct 23 16:06:28 UTC 2013


On 10/23/2013 03:52 AM, Chen Gang wrote:
> If command line use EXTRA_CFLAGS (e.g. "EXTRA_CFLAGS=-mmedium-calls"
> for arc architecture, with allmodconfig), it can not pass compiling,
> the related error:
>
>    drivers/staging/rtl8188eu/core/rtw_ap.c:22:27: fatal error: osdep_service.h: No such file or directory
>
>
> Signed-off-by: Chen Gang <gang.chen at asianux.com>

The build fails for x86_64 if EXTRA_CFLAGS is added to the command line. I learn 
something new every day.

Your change is correct, but as we already have an addition to ccflags-y at the 
end of Makefile, I would prefer that the new one be combined with the old. The 
patch would look something like

diff --git a/drivers/staging/rtl8188eu/Makefile b/drivers/staging/rtl8188eu/Makefile
index 1639a45..d1173ab 100644
--- a/drivers/staging/rtl8188eu/Makefile
+++ b/drivers/staging/rtl8188eu/Makefile
@@ -1,5 +1,3 @@
-EXTRA_CFLAGS += -I$(src)/include
-
  r8188eu-y :=                           \
                 core/rtw_ap.o           \
                 core/rtw_br_ext.o       \
@@ -67,4 +65,4 @@ r8188eu-y :=                          \

  obj-$(CONFIG_R8188EU)  := r8188eu.o

-ccflags-y += -D__CHECK_ENDIAN__
+ccflags-y += -D__CHECK_ENDIAN__ -I$(src)/include

With that change, you may add

Acked-by: Larry Finger <Larry.Finger at lwfinger.net>

Thanks,

Larry



More information about the devel mailing list