Skip to contentSkip to conversation

unmodified_drivers: make usbfront build conditional

PATCH New Jan Beulich 1 participant 1 message Jan 20, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

unmodified_drivers/linux-2.6/usbfront/Kbuild +3 -1
@@ -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

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.

unmodified_drivers/linux-2.6/usbfront/Kbuild +3 -1
@@ -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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel