linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: remove $(PWD) in ccflags-y
@ 2014-08-17 22:08 Philippe Reynes
  2014-08-18  1:56 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Reynes @ 2014-08-17 22:08 UTC (permalink / raw)
  To: linux-usb, linux-kernel; +Cc: balbi, gregkh, andrzej.p, Philippe Reynes

The variable $(PWD) is useless, and it may break the compilation.
For example, it breaks the kernel compilation when it's done with
buildroot :

  /home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/bin/ccache
/home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc
-Wp,-MD,drivers/usb/gadget/legacy/.hid.o.d  -nostdinc -isystem
/home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.7.3/include
-I./arch/arm/include -Iarch/arm/include/generated  -Iinclude
-I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi
-I./include/uapi -Iinclude/generated/uapi -include
./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
-funwind-tables -marm -D__LINUX_ARM_ARCH__=5 -march=armv5te
-mtune=arm9tdmi -msoft-float -Uarm -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -Wframe-larger-than=1024
-fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer
-fno-var-tracking-assignments -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack
-Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/udc/
-I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/function/
-DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hid)"
-D"KBUILD_MODNAME=KBUILD_STR(g_hid)" -c -o
drivers/usb/gadget/legacy/hid.o drivers/usb/gadget/legacy/hid.c
drivers/usb/gadget/epautoconf.c:23:26: erreur fatale: gadget_chips.h :
Aucun fichier ou dossier de ce type

This compilation line include :
..../buildroot/driver/usb/gadget
but the real path is :
..../buildroot/output/build/linux-3.17-rc1/driver/usb/gadget

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 drivers/usb/gadget/Makefile          |    2 +-
 drivers/usb/gadget/function/Makefile |    4 ++--
 drivers/usb/gadget/legacy/Makefile   |    6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index a186afe..9add915 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -3,7 +3,7 @@
 #
 subdir-ccflags-$(CONFIG_USB_GADGET_DEBUG)	:= -DDEBUG
 subdir-ccflags-$(CONFIG_USB_GADGET_VERBOSE)	+= -DVERBOSE_DEBUG
-ccflags-y				+= -I$(PWD)/drivers/usb/gadget/udc
+ccflags-y				+= -Idrivers/usb/gadget/udc
 
 obj-$(CONFIG_USB_LIBCOMPOSITE)	+= libcomposite.o
 libcomposite-y			:= usbstring.o config.o epautoconf.o
diff --git a/drivers/usb/gadget/function/Makefile b/drivers/usb/gadget/function/Makefile
index 6d91f21..83ae106 100644
--- a/drivers/usb/gadget/function/Makefile
+++ b/drivers/usb/gadget/function/Makefile
@@ -2,8 +2,8 @@
 # USB peripheral controller drivers
 #
 
-ccflags-y			:= -I$(PWD)/drivers/usb/gadget/
-ccflags-y			+= -I$(PWD)/drivers/usb/gadget/udc/
+ccflags-y			:= -Idrivers/usb/gadget/
+ccflags-y			+= -Idrivers/usb/gadget/udc/
 
 # USB Functions
 usb_f_acm-y			:= f_acm.o
diff --git a/drivers/usb/gadget/legacy/Makefile b/drivers/usb/gadget/legacy/Makefile
index a11aad5..edba2d1 100644
--- a/drivers/usb/gadget/legacy/Makefile
+++ b/drivers/usb/gadget/legacy/Makefile
@@ -2,9 +2,9 @@
 # USB gadget drivers
 #
 
-ccflags-y			:= -I$(PWD)/drivers/usb/gadget/
-ccflags-y			+= -I$(PWD)/drivers/usb/gadget/udc/
-ccflags-y			+= -I$(PWD)/drivers/usb/gadget/function/
+ccflags-y			:= -Idrivers/usb/gadget/
+ccflags-y			+= -Idrivers/usb/gadget/udc/
+ccflags-y			+= -Idrivers/usb/gadget/function/
 
 g_zero-y			:= zero.o
 g_audio-y			:= audio.o
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: gadget: remove $(PWD) in ccflags-y
  2014-08-17 22:08 [PATCH] usb: gadget: remove $(PWD) in ccflags-y Philippe Reynes
@ 2014-08-18  1:56 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-08-18  1:56 UTC (permalink / raw)
  To: Philippe Reynes; +Cc: linux-usb, linux-kernel, balbi, andrzej.p

On Mon, Aug 18, 2014 at 12:08:07AM +0200, Philippe Reynes wrote:
> The variable $(PWD) is useless, and it may break the compilation.
> For example, it breaks the kernel compilation when it's done with
> buildroot :
> 
>   /home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/bin/ccache
> /home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc
> -Wp,-MD,drivers/usb/gadget/legacy/.hid.o.d  -nostdinc -isystem
> /home/trem/Codes/armadeus/armadeus/buildroot/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.7.3/include
> -I./arch/arm/include -Iarch/arm/include/generated  -Iinclude
> -I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi
> -I./include/uapi -Iinclude/generated/uapi -include
> ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef
> -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
> -Werror-implicit-function-declaration -Wno-format-security
> -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
> -funwind-tables -marm -D__LINUX_ARM_ARCH__=5 -march=armv5te
> -mtune=arm9tdmi -msoft-float -Uarm -fno-delete-null-pointer-checks -O2
> --param=allow-store-data-races=0 -Wframe-larger-than=1024
> -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer
> -fno-var-tracking-assignments -g -Wdeclaration-after-statement
> -Wno-pointer-sign -fno-strict-overflow -fconserve-stack
> -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO
> -I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/
> -I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/udc/
> -I/home/trem/Codes/armadeus/armadeus/buildroot/drivers/usb/gadget/function/
> -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hid)"
> -D"KBUILD_MODNAME=KBUILD_STR(g_hid)" -c -o
> drivers/usb/gadget/legacy/hid.o drivers/usb/gadget/legacy/hid.c
> drivers/usb/gadget/epautoconf.c:23:26: erreur fatale: gadget_chips.h :
> Aucun fichier ou dossier de ce type
> 
> This compilation line include :
> ..../buildroot/driver/usb/gadget
> but the real path is :
> ..../buildroot/output/build/linux-3.17-rc1/driver/usb/gadget
> 
> Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
> ---
>  drivers/usb/gadget/Makefile          |    2 +-
>  drivers/usb/gadget/function/Makefile |    4 ++--
>  drivers/usb/gadget/legacy/Makefile   |    6 +++---
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
> index a186afe..9add915 100644
> --- a/drivers/usb/gadget/Makefile
> +++ b/drivers/usb/gadget/Makefile
> @@ -3,7 +3,7 @@
>  #
>  subdir-ccflags-$(CONFIG_USB_GADGET_DEBUG)	:= -DDEBUG
>  subdir-ccflags-$(CONFIG_USB_GADGET_VERBOSE)	+= -DVERBOSE_DEBUG
> -ccflags-y				+= -I$(PWD)/drivers/usb/gadget/udc
> +ccflags-y				+= -Idrivers/usb/gadget/udc

Ick, why are these here at all, shouldn't you just use the proper
relative paths in the .c files for the include files?  That way just
building a .o file individually will work properly, otherwise, it will
not.

And getting rid of those other ccflags would be good to do as well, no
need for them to be in a Makefile.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-18  1:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-17 22:08 [PATCH] usb: gadget: remove $(PWD) in ccflags-y Philippe Reynes
2014-08-18  1:56 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).