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


Groups > linux.kernel > #1287952

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

From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject Re: [PATCH] ACPI: Fix build errors due objects compiled unconditionally
Date 2015-12-09 23:50 +0100
Message-ID <qDVIC-621-9@gated-at.bofh.it> (permalink)
References <qwXPc-1Rb-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday, November 20, 2015 02:35:02 PM Javier Martinez Canillas wrote:
> If the CONFIG_ACPI Kconfig symbol is not enabled and a partial build is
> attempted, compile errors will happen due missing types and identifiers.
> 
> This can be easily reproduced with the following commands:
> 
> $ export CROSS_COMPILE="arm-linux-gnueabihf-" ARCH=arm
> $ make allmodconfig
> $ make M=drivers/acpi/
>   CC      drivers/acpi//tables.o
> drivers/acpi//tables.c:235:3: warning: 'struct acpi_subtable_proc' declared inside parameter list
>    unsigned int max_entries)
>    ^
> drivers/acpi//tables.c:235:3: warning: its scope is only this definition or declaration, which is probably not what you want
> drivers/acpi//tables.c: In function 'acpi_parse_entries_array':
> drivers/acpi//tables.c:269:4: error: invalid use of undefined type 'struct acpi_subtable_proc'
> ...
> scripts/Makefile.build:258: recipe for target 'drivers/acpi//tables.o' failed
> make[1]: *** [drivers/acpi//tables.o] Error 1
> Makefile:1401: recipe for target '_module_drivers/acpi/' failed
> make: *** [_module_drivers/acpi/] Error 2
> 
> 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 to prevent
> these build errors.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

OK, I think this shouldn't hurt anyone.

Queued up for 4.5, thanks!

Rafael

--
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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] ACPI: Fix build errors due objects compiled unconditionally "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-12-09 23:50 +0100

csiph-web