diff mbox

[1/2] package: acpica: Add host buildling support

Message ID 20170524203030.8187-2-alistair.francis@xilinx.com
State Accepted
Headers show

Commit Message

Alistair Francis May 24, 2017, 8:30 p.m. UTC
Add support to build the ACPICA package for the host. This is useful for
the iasl command which is required to build some packaged, including Xen
tools

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---
 package/acpica/acpica.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Erico Nunes May 24, 2017, 9:51 p.m. UTC | #1
On Wed, May 24, 2017 at 10:30 PM, Alistair Francis
<alistair.francis@xilinx.com> wrote:
> Add support to build the ACPICA package for the host. This is useful for
> the iasl command which is required to build some packaged, including Xen
> tools
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>

Acked-by: Erico Nunes <nunes.erico@gmail.com>
Thomas Petazzoni May 29, 2017, 9:52 p.m. UTC | #2
Hello,

Commit titles should have prefixes that look like:

	acpica:

or:

	package/acpica:

and not:

	package: acpica:

Yes, that's a silly convention, but conventions are always silly :)

On Wed, 24 May 2017 13:30:29 -0700, Alistair Francis wrote:
> Add support to build the ACPICA package for the host. This is useful for
> the iasl command which is required to build some packaged, including Xen
> tools

This should have reference the autobuilder issue that it helps fixing
(even if it's only part of the fix).

> +define HOST_ACPICA_BUILD_CMDS
> +	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> +		all
> +endef

Weird that you put the host build command before the target build
command, and then the host install command *after* the target install
command. So I've reordered this.

> +
>  define ACPICA_BUILD_CMDS
>  	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
>  		HARDWARE_NAME=$(BR2_ARCH) HOST=_LINUX CC="$(TARGET_CC)" \
> @@ -23,4 +28,11 @@ define ACPICA_INSTALL_TARGET_CMDS
>  		INSTALLFLAGS=-m755 install
>  endef
>  
> +define HOST_ACPICA_INSTALL_CMDS
> +	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> +		DESTDIR="$(HOST_DIR)" \

DESTDIR="$(HOST_DIR)" is wrong, so I've replaced with
PREFIX="$(HOST_DIR)/usr". See
https://stackoverflow.com/questions/11307465/destdir-and-prefix-of-make
for a quick explanation about the difference.

Applied to master with those changes. Thanks!

Thomas
diff mbox

Patch

diff --git a/package/acpica/acpica.mk b/package/acpica/acpica.mk
index 37e4941a6..96d0dad2b 100644
--- a/package/acpica/acpica.mk
+++ b/package/acpica/acpica.mk
@@ -11,6 +11,11 @@  ACPICA_LICENSE = BSD-3-Clause or GPL-2.0
 ACPICA_LICENSE_FILES = source/include/acpi.h
 ACPICA_DEPENDENCIES = host-bison host-flex
 
+define HOST_ACPICA_BUILD_CMDS
+	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+		all
+endef
+
 define ACPICA_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
 		HARDWARE_NAME=$(BR2_ARCH) HOST=_LINUX CC="$(TARGET_CC)" \
@@ -23,4 +28,11 @@  define ACPICA_INSTALL_TARGET_CMDS
 		INSTALLFLAGS=-m755 install
 endef
 
+define HOST_ACPICA_INSTALL_CMDS
+	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+		DESTDIR="$(HOST_DIR)" \
+		INSTALLFLAGS=-m755 install
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))