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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Andy

> From: Andy Shevchenko [mailto:andy.shevchenko@xxxxxxxxx]
> Subject: Re: Fix in ACPICA tools broke cross compilation of tools/power/acpi
> 
> On Tue, Nov 15, 2016 at 4:23 PM, Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
> > On Tue, Nov 15, 2016 at 12:27 PM, Andy Shevchenko
> > <andy.shevchenko@xxxxxxxxx> wrote:
> >> On Thu, Nov 3, 2016 at 5:04 PM, Zheng, Lv <lv.zheng@xxxxxxxxx> wrote:
> >>>> On Sun, Oct 30, 2016 at 9:04 AM, Zheng, Lv <lv.zheng@xxxxxxxxx> wrote:
> 
> >> 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'.
> 
> The below + several runs (need to serialize makefile, by default it
> races install vs. build)  helped eventually.

I changed dependency in v4.
Please check if it works now.

Thanks and best regards
Lv

> 
> --- a/tools/power/acpi/Makefile.rules
> +++ b/tools/power/acpi/Makefile.rules
> @@ -8,9 +8,9 @@
> # as published by the Free Software Foundation; version 2
> # of the License.
> 
> -objdir := $(OUTPUT)tools/$(TOOL)/
> +objdir := $(OUTPUT)tools/power/acpi/tools/$(TOOL)/
> toolobjs := $(addprefix $(objdir),$(TOOL_OBJS))
> -$(OUTPUT)$(TOOL): $(KERNEL_INCLUDE) $(toolobjs) FORCE
> +$(objdir)$(TOOL): $(KERNEL_INCLUDE) $(toolobjs) FORCE
>        $(ECHO) "  LD      " $(subst $(OUTPUT),,$@)
>        $(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(toolobjs) -L$(OUTPUT) -o $@
>        $(ECHO) "  STRIP   " $(subst $(OUTPUT),,$@)
> @@ -26,21 +26,21 @@ $(objdir)%.o: %.c
>        $(ECHO) "  CC      " $(subst $(OUTPUT),,$@)
>        $(QUIET) $(CC) -c $(CFLAGS) -o $@ $<
> 
> -all: $(OUTPUT)$(TOOL)
> +all: $(objdir)$(TOOL)
> clean:
>        $(ECHO) "  RMOBJ   " $(subst $(OUTPUT),,$(objdir))
>        $(QUIET) find $(objdir) \( -not -type d \)\
>                 -and \( -name '*~' -o -name '*.[oas]' \)\
>                 -type f -print | xargs rm -f
>        $(ECHO) "  RM      " $(TOOL)
> -       $(QUIET) rm -f $(OUTPUT)$(TOOL)
> +       $(QUIET) rm -f $(objdir)$(TOOL)
>        $(ECHO) "  RMINC   " $(subst $(OUTPUT),,$(KERNEL_INCLUDE))
>        $(QUIET) rm -rf $(KERNEL_INCLUDE)
> 
> install-tools:
>        $(ECHO) "  INST    " $(TOOL)
>        $(QUIET) $(INSTALL) -d $(DESTDIR)$(sbindir)
> -       $(QUIET) $(INSTALL_PROGRAM) $(OUTPUT)$(TOOL) $(DESTDIR)$(sbindir)
> +       $(QUIET) $(INSTALL_PROGRAM) $(objdir)$(TOOL) $(DESTDIR)$(sbindir)
> uninstall-tools:
>        $(ECHO) "  UNINST  " $(TOOL)
>        $(QUIET) rm -f $(DESTDIR)$(sbindir)/$(TOOL)
> 
> 
> --
> With Best Regards,
> Andy Shevchenko
��.n��������+%������w��{.n�����{�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux