how to avoid building ACPI?
Hi, what's the best way in the Xen build system to avoid building xen/drivers/acpi on non-x86 architectures? Both xen/drivers/Makefile and xen/Rules.mk hardcode something about ACPI.
Signature · 9 lines
Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 3 lines · Hollis Blanchard
Hi, what's the best way in the Xen build system to avoid building xen/drivers/acpi on non-x86 architectures? Both xen/drivers/Makefile and
xen/Rules.mkhardcode something about ACPI.
See what we did in common/Makefile to avoid building certain files on ia64.
-- Keir
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Re: how to avoid building ACPI? [patch]
Quoted 8 lines · Keir Fraser
Quoted 4 lines · Hollis Blanchard
Hi, what's the best way in the Xen build system to avoid building xen/drivers/acpi on non-x86 architectures? Both xen/drivers/Makefile and
xen/Rules.mkhardcode something about ACPI.See what we did in common/Makefile to avoid building certain files on ia64.
How's this? I've verified that x86 still builds.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
===== xen/Rules.mk 1.35 vs edited =====
xen/Rules.mk +4 -2
@@ -32,10 +32,14 @@ OBJS := $(patsubst %.S,%.o,$(S_SRCS)) OBJS += $(patsubst %.c,%.o,$(C_SRCS)) +include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk + # Note that link order matters! ALL_OBJS := $(BASEDIR)/common/common.o ALL_OBJS += $(BASEDIR)/drivers/char/driver.o +ifeq ($(HAS_ACPI),y) ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o +endif ALL_OBJS += $(BASEDIR)/drivers/pci/driver.o ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
@@ -43,8 +47,6 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer test-gcc-flag = $(shell gcc -v --help 2>&1 | grep -q " $(1) " && echo $(1)) - -include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk ifneq ($(debug),y) CFLAGS += -DNDEBUG
===== xen/arch/ia64/Rules.mk 1.1 vs edited =====
xen/arch/ia64/Rules.mk +3 -1
@@ -1,5 +1,7 @@ ######################################## -# x86-specific definitions +# ia64-specific definitions + +HAS_ACPI := y ifeq ($(COMPILE_ARCH),$(TARGET_ARCH)) OBJCOPY = objcopy
===== xen/arch/x86/Rules.mk 1.30 vs edited =====
xen/arch/x86/Rules.mk +2 -0
@@ -1,6 +1,8 @@ ######################################## # x86-specific definitions +HAS_ACPI := y + CC := gcc LD := ld
===== xen/drivers/Makefile 1.11 vs edited =====
xen/drivers/Makefile +9 -6
@@ -1,10 +1,13 @@ +include $(BASEDIR)/Rules.mk + +DIRS := char pci + +ifeq ($(HAS_ACPI),y) +DIRS += acpi +endif default: - $(MAKE) -C char - $(MAKE) -C acpi - $(MAKE) -C pci + for DIR in $(DIRS) ; do $(MAKE) -C $$DIR ; done clean: - $(MAKE) -C char clean - $(MAKE) -C acpi clean - $(MAKE) -C pci clean + for DIR in $(DIRS) ; do $(MAKE) -C $$DIR clean ; done
Re: how to avoid building ACPI? [patch]
Any comments on that patch?
Of course, the Linux way avoids the ifdefs entirely, and would look something like this:
DIRS-y := char pci
DIRS-$(HAS_ACPI) += acpi
default:
for DIR in $(DIRS-y) ; do $(MAKE) -C $$DIR ; doneDo you prefer that?
Signature · 9 lines
Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------- This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click