diff mbox

Fix in ACPICA tools broke cross compilation of tools/power/acpi

Message ID CAHp75VccqXjwXg0s-n7r5-MzhzxmYS9AKpphckn=ytZNSkdyRw@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Andy Shevchenko Nov. 15, 2016, 10:27 a.m. UTC
On Thu, Nov 3, 2016 at 5:04 PM, Zheng, Lv <lv.zheng@intel.com> wrote:
>> On Sun, Oct 30, 2016 at 9:04 AM, Zheng, Lv <lv.zheng@intel.com> wrote:

>> >> > > Please try this patch:
>> >> > > https://patchwork.kernel.org/patch/9392155/
>> >> > > Which makes tools/power/acpi build more robust to survive toolchains that are not generated
>> from
>> >> the
>> >> > current kernel header.
>> >> >
>> >> >
>> >> > Better, but no, it doesn't fully fix the issue.
>> >> >
>> >> >  DESCEND  power/acpi
>> >> >  DESCEND  tools/acpidbg
>> >> > output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -D_LINUX
>> >> > -I../../../include -I..
>> >> > /../../drivers/acpi/acpica -Wall -Wstrict-prototypes
>> >> > -Wdeclaration-after-statement -O1 -g -DDEBUG -DACPI_APPLICATI
>> >> > ON -DACPI_SINGLE_THREAD -DACPI_DEBUGGER -I.
>> >> > -I../../../../../drivers/acpi/acpica -I../../include   -c -o acpidbg.o
>> >> > acpidbg.c
>> >> > acpidbg.c:12:23: fatal error: acpi/acpi.h: No such file or directory
>> >> > #include <acpi/acpi.h>
>> >> >                       ^
>> >

The following fixing the above issue...



But reveals another, the output path is broken:

output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -c -D_LINUX -I
$OUT/include -I $SRC/tools/power/acpi/../../../drivers/acpi/acpica
-Wall -Wst
rict-prototypes -Wdeclaration-after-statement -O1 -g -DDEBUG
-DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGG
ER -I. -o $OUT/tools/acpidbg/acpidbg.o acpidbg.c
Assembler messages:
Fatal error: can't create $OUT/tools/acpidbg/acpidbg.o: No such file
or directory
../../Makefile.rules:26: recipe for target '$OUT/tools/acpidbg/acpidbg.o' failed

$OUT — path to O=
$SRC — path to kernel sources

Comments

Andy Shevchenko Nov. 15, 2016, 2:23 p.m. UTC | #1
On Tue, Nov 15, 2016 at 12:27 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Thu, Nov 3, 2016 at 5:04 PM, Zheng, Lv <lv.zheng@intel.com> wrote:
>>> On Sun, Oct 30, 2016 at 9:04 AM, Zheng, Lv <lv.zheng@intel.com> wrote:
>
>>> >> > > Please try this patch:
>>> >> > > https://patchwork.kernel.org/patch/9392155/
>>> >> > > Which makes tools/power/acpi build more robust to survive toolchains that are not generated
>>> from
>>> >> the
>>> >> > current kernel header.

Okay, I did a totally clean build (latest linux-next kernel and
buildroot) without mention patch and still see the issue described
below:

> But reveals another, the output path is broken:
>
> output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -c -D_LINUX -I
> $OUT/include -I $SRC/tools/power/acpi/../../../drivers/acpi/acpica
> -Wall -Wst
> rict-prototypes -Wdeclaration-after-statement -O1 -g -DDEBUG
> -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGG
> ER -I. -o $OUT/tools/acpidbg/acpidbg.o acpidbg.c
> Assembler messages:
> Fatal error: can't create $OUT/tools/acpidbg/acpidbg.o: No such file
> or directory
> ../../Makefile.rules:26: recipe for target '$OUT/tools/acpidbg/acpidbg.o' failed
>
> $OUT — path to O=
> $SRC — path to kernel sources

From latest run

output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -c -D_LINUX -I
$OUT/include -I $SRC/tools/power/acpi/../../../drivers/acpi/acpica
-Wall -Wst
rict-prototypes -Wdeclaration-after-statement -O1 -g -DDEBUG
-DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGG
ER -I. -o $OUT/tools/acpidbg/acpidbg.o acpidbg.c

Of course it fails since proper folder name should be
'tools/power/acpi/tools' instead of 'tools'.
Lv Zheng Nov. 16, 2016, 9:28 a.m. UTC | #2
Hi, Andy

> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Andy

> Shevchenko

> Subject: Re: Fix in ACPICA tools broke cross compilation of tools/power/acpi

> 

> On Tue, Nov 15, 2016 at 12:27 PM, Andy Shevchenko

> <andy.shevchenko@gmail.com> wrote:

> > On Thu, Nov 3, 2016 at 5:04 PM, Zheng, Lv <lv.zheng@intel.com> wrote:

> >>> On Sun, Oct 30, 2016 at 9:04 AM, Zheng, Lv <lv.zheng@intel.com> wrote:

> >

> >>> >> > > Please try this patch:

> >>> >> > > https://patchwork.kernel.org/patch/9392155/

> >>> >> > > Which makes tools/power/acpi build more robust to survive toolchains that are not generated

> >>> from

> >>> >> the

> >>> >> > current kernel header.

> 

> Okay, I did a totally clean build (latest linux-next kernel and

> buildroot) without mention patch and still see the issue described

> below:

> 

> > But reveals another, the output path is broken:

> >

> > output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -c -D_LINUX -I

> > $OUT/include -I $SRC/tools/power/acpi/../../../drivers/acpi/acpica

> > -Wall -Wst

> > rict-prototypes -Wdeclaration-after-statement -O1 -g -DDEBUG

> > -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGG

> > ER -I. -o $OUT/tools/acpidbg/acpidbg.o acpidbg.c

> > Assembler messages:

> > Fatal error: can't create $OUT/tools/acpidbg/acpidbg.o: No such file

> > or directory

> > ../../Makefile.rules:26: recipe for target '$OUT/tools/acpidbg/acpidbg.o' failed

> >

> > $OUT — path to O=

> > $SRC — path to kernel sources

> 

> From latest run

> 

> output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -c -D_LINUX -I

> $OUT/include -I $SRC/tools/power/acpi/../../../drivers/acpi/acpica

> -Wall -Wst

> rict-prototypes -Wdeclaration-after-statement -O1 -g -DDEBUG

> -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGG

> ER -I. -o $OUT/tools/acpidbg/acpidbg.o acpidbg.c

> 

> Of course it fails since proper folder name should be

> 'tools/power/acpi/tools' instead of 'tools'.


Fixed in v4.
It's my mistake.
Thanks for pointing it out.

Best regards
Lv
> 

> --

> With Best Regards,

> Andy Shevchenko

> --

> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in

> the body of a message to majordomo@vger.kernel.org

> More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/tools/power/acpi/Makefile.rules
+++ b/tools/power/acpi/Makefile.rules
@@ -10,13 +10,13 @@ 

objdir := $(OUTPUT)tools/$(TOOL)/
toolobjs := $(addprefix $(objdir),$(TOOL_OBJS))
-$(OUTPUT)$(TOOL): $(KERNEL_INCLUDE) $(toolobjs) FORCE
+$(OUTPUT)$(TOOL): $(KERNEL_INCLUDE)/acpi $(toolobjs) FORCE
       $(ECHO) "  LD      " $(subst $(OUTPUT),,$@)
       $(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(toolobjs) -L$(OUTPUT) -o $@
       $(ECHO) "  STRIP   " $(subst $(OUTPUT),,$@)
       $(QUIET) $(STRIPCMD) $@

-$(KERNEL_INCLUDE):
+$(KERNEL_INCLUDE)/acpi:
       $(ECHO) "  MKDIR   " $(subst $(OUTPUT),,$@)
       $(QUIET) mkdir -p $(KERNEL_INCLUDE)
       $(ECHO) "  CP      " $(subst $(OUTPUT),,$@)