Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1245208 > unrolled thread

[RFC PATCH] ACPI: Fix build errors due objects compiled unconditionally

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2015-10-13 01:40 +0200
Last post2015-10-13 01:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [RFC PATCH] ACPI: Fix build errors due objects compiled unconditionally Javier Martinez Canillas <javier@osg.samsung.com> - 2015-10-13 01:40 +0200

#1245208 — [RFC PATCH] ACPI: Fix build errors due objects compiled unconditionally

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2015-10-13 01:40 +0200
Subject[RFC PATCH] ACPI: Fix build errors due objects compiled unconditionally
Message-ID<qiURb-5EZ-1@gated-at.bofh.it>
If the CONFIG_ACPI Kconfig symbol is not enabled and a partial build is
attempted (make M=drivers/acpi), compile errors will happen due missing
types and identifiers.

This is because objects are tried to be built unconditionally even when
CONFIG_ACPI is not enabled. This is usually not a problem since arches'
Kconfig sources drivers/acpi/Kconfig directly and also selects ACPI but
the Makefile should conditionally build the objects as well.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---
Hello,

I found this issue while doing other stuff and since I'm not that
familiar with ACPI and was surprised that the obj-y comes from a
very old commit, I marked this patch as RFC.

$SUBJECT fixes the build issue for me though on ARM32 and I build
tested on x86. Build error log: http://hastebin.com/alaneqiper.pl

Patch is on top of next-20151012.

Best regards,
Javier

 drivers/acpi/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index b5e7cd8a9c71..7fa53ddf6794 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -8,13 +8,13 @@ ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
 #
 # ACPI Boot-Time Table Parsing
 #
-obj-y				+= tables.o
+obj-$(CONFIG_ACPI)		+= tables.o
 obj-$(CONFIG_X86)		+= blacklist.o
 
 #
 # ACPI Core Subsystem (Interpreter)
 #
-obj-y				+= acpi.o \
+obj-$(CONFIG_ACPI)		+= acpi.o \
 					acpica/
 
 # All the builtin files are in the "acpi." module_param namespace.
@@ -66,10 +66,10 @@ obj-$(CONFIG_ACPI_FAN)		+= fan.o
 obj-$(CONFIG_ACPI_VIDEO)	+= video.o
 obj-$(CONFIG_ACPI_PCI_SLOT)	+= pci_slot.o
 obj-$(CONFIG_ACPI_PROCESSOR)	+= processor.o
-obj-y				+= container.o
+obj-$(CONFIG_ACPI)		+= container.o
 obj-$(CONFIG_ACPI_THERMAL)	+= thermal.o
 obj-$(CONFIG_ACPI_NFIT)		+= nfit.o
-obj-y				+= acpi_memhotplug.o
+obj-$(CONFIG_ACPI)		+= acpi_memhotplug.o
 obj-$(CONFIG_ACPI_HOTPLUG_IOAPIC) += ioapic.o
 obj-$(CONFIG_ACPI_BATTERY)	+= battery.o
 obj-$(CONFIG_ACPI_SBS)		+= sbshc.o
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web