All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] unmodified_drivers: make usbfront build conditional
@ 2014-01-20  9:47 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2014-01-20  9:47 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

Commit 0dcfb88fb8 ("unmodified_drivers: enable build of usbfront
driver") results in the PV drivers to no longer build against older
(pre-2.6.35) Linux versions. That's because usbfront.h includes
headers from drivers/usb/core/, which is generally unavailable when
building out-of-tree modules.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/unmodified_drivers/linux-2.6/usbfront/Kbuild
+++ b/unmodified_drivers/linux-2.6/usbfront/Kbuild
@@ -1,5 +1,7 @@
 include $(M)/overrides.mk
 
-obj-m += xen-usb.o
+obj-m += $(if $(shell grep '^\#include "\.\./\.\./' $(obj)/usbfront.h), \
+	      $(warning usbfront cannot be built), \
+	      xen-usb.o)
 
 xen-usb-objs := usbfront-hcd.o xenbus.o




[-- Attachment #2: pvdrv-usbfront-conditional.patch --]
[-- Type: text/plain, Size: 769 bytes --]

unmodified_drivers: make usbfront build conditional

Commit 0dcfb88fb8 ("unmodified_drivers: enable build of usbfront
driver") results in the PV drivers to no longer build against older
(pre-2.6.35) Linux versions. That's because usbfront.h includes
headers from drivers/usb/core/, which is generally unavailable when
building out-of-tree modules.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/unmodified_drivers/linux-2.6/usbfront/Kbuild
+++ b/unmodified_drivers/linux-2.6/usbfront/Kbuild
@@ -1,5 +1,7 @@
 include $(M)/overrides.mk
 
-obj-m += xen-usb.o
+obj-m += $(if $(shell grep '^\#include "\.\./\.\./' $(obj)/usbfront.h), \
+	      $(warning usbfront cannot be built), \
+	      xen-usb.o)
 
 xen-usb-objs := usbfront-hcd.o xenbus.o

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-20  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20  9:47 [PATCH] unmodified_drivers: make usbfront build conditional Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.