diff mbox series

[v2,21/23] target/arm: Do not build TCG objects when TCG is off

Message ID 20190615154352.26824-22-philmd@redhat.com
State New
Headers show
Series Support disabling TCG on ARM | expand

Commit Message

Philippe Mathieu-Daudé June 15, 2019, 3:43 p.m. UTC
From: Samuel Ortiz <sameo@linux.intel.com>

We can now safely turn all TCG dependent build off when CONFIG_TCG is
off. This allows building ARM binaries with --disable-tcg.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Robert Bradford <robert.bradford@intel.com>
[PMD: Rebased]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---

We can also use:

  ifeq ($(CONFIG_TCG),y)
  ...
  endif

But long single line with macros from rules.mak are way easier to
rebase. Now that this series is stable, I could change to ifeq if
required.

 target/arm/Makefile.objs | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Alex Bennée June 17, 2019, 2:49 p.m. UTC | #1
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> From: Samuel Ortiz <sameo@linux.intel.com>
>
> We can now safely turn all TCG dependent build off when CONFIG_TCG is
> off. This allows building ARM binaries with --disable-tcg.
>
> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Robert Bradford <robert.bradford@intel.com>
> [PMD: Rebased]
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>
> We can also use:
>
>   ifeq ($(CONFIG_TCG),y)
>   ...
>   endif
>
> But long single line with macros from rules.mak are way easier to
> rebase. Now that this series is stable, I could change to ifeq if
> required.

Given you spent that time re-ordering stuff to keep it together I think
ifeq for blocks would be better. Some commentary in the Makefile.objs so
people know where to put their new files would also help.

>
>  target/arm/Makefile.objs | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs
> index 5f3f965cc6..b8aa9c032a 100644
> --- a/target/arm/Makefile.objs
> +++ b/target/arm/Makefile.objs
> @@ -3,7 +3,7 @@ obj-y += cpu.o helper.o gdbstub.o
>  obj-$(TARGET_AARCH64) += cpu64.o gdbstub64.o
>
>  obj-$(CONFIG_SOFTMMU) += machine.o arch_dump.o monitor.o arm-powerctl.o
> -obj-$(CONFIG_SOFTMMU) += psci.o
> +obj-$(call land,$(CONFIG_TCG),$(CONFIG_SOFTMMU)) += psci.o
>
>  obj-$(CONFIG_KVM) += kvm.o
>  obj-$(call land,$(CONFIG_KVM),$(call lnot,$(TARGET_AARCH64))) += kvm32.o
> @@ -31,12 +31,12 @@ target/arm/translate-sve.o: target/arm/decode-sve.inc.c
>  target/arm/translate.o: target/arm/decode-vfp.inc.c
>  target/arm/translate.o: target/arm/decode-vfp-uncond.inc.c
>
> -obj-y += translate.o op_helper.o
> -obj-y += crypto_helper.o
> -obj-y += iwmmxt_helper.o vec_helper.o
> -obj-y += neon_helper.o vfp_helper.o
> -obj-$(call lor,$(CONFIG_USER_ONLY),$(CONFIG_ARM_V7M)) += v7m_helper.o
> +obj-$(CONFIG_TCG) += translate.o op_helper.o
> +obj-$(CONFIG_TCG) += crypto_helper.o
> +obj-$(CONFIG_TCG) += iwmmxt_helper.o vec_helper.o
> +obj-$(CONFIG_TCG) += neon_helper.o vfp_helper.o
> +obj-$(call lor,$(CONFIG_USER_ONLY),$(call land,$(CONFIG_TCG),$(CONFIG_ARM_V7M))) += v7m_helper.o
>
> -obj-$(TARGET_AARCH64) += translate-a64.o helper-a64.o
> -obj-$(TARGET_AARCH64) += translate-sve.o sve_helper.o
> -obj-$(TARGET_AARCH64) += pauth_helper.o
> +obj-$(call land,$(CONFIG_TCG),$(TARGET_AARCH64)) += translate-a64.o helper-a64.o
> +obj-$(call land,$(CONFIG_TCG),$(TARGET_AARCH64)) += translate-sve.o sve_helper.o
> +obj-$(call land,$(CONFIG_TCG),$(TARGET_AARCH64)) += pauth_helper.o


--
Alex Bennée
diff mbox series

Patch

diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs
index 5f3f965cc6..b8aa9c032a 100644
--- a/target/arm/Makefile.objs
+++ b/target/arm/Makefile.objs
@@ -3,7 +3,7 @@  obj-y += cpu.o helper.o gdbstub.o
 obj-$(TARGET_AARCH64) += cpu64.o gdbstub64.o
 
 obj-$(CONFIG_SOFTMMU) += machine.o arch_dump.o monitor.o arm-powerctl.o
-obj-$(CONFIG_SOFTMMU) += psci.o
+obj-$(call land,$(CONFIG_TCG),$(CONFIG_SOFTMMU)) += psci.o
 
 obj-$(CONFIG_KVM) += kvm.o
 obj-$(call land,$(CONFIG_KVM),$(call lnot,$(TARGET_AARCH64))) += kvm32.o
@@ -31,12 +31,12 @@  target/arm/translate-sve.o: target/arm/decode-sve.inc.c
 target/arm/translate.o: target/arm/decode-vfp.inc.c
 target/arm/translate.o: target/arm/decode-vfp-uncond.inc.c
 
-obj-y += translate.o op_helper.o
-obj-y += crypto_helper.o
-obj-y += iwmmxt_helper.o vec_helper.o
-obj-y += neon_helper.o vfp_helper.o
-obj-$(call lor,$(CONFIG_USER_ONLY),$(CONFIG_ARM_V7M)) += v7m_helper.o
+obj-$(CONFIG_TCG) += translate.o op_helper.o
+obj-$(CONFIG_TCG) += crypto_helper.o
+obj-$(CONFIG_TCG) += iwmmxt_helper.o vec_helper.o
+obj-$(CONFIG_TCG) += neon_helper.o vfp_helper.o
+obj-$(call lor,$(CONFIG_USER_ONLY),$(call land,$(CONFIG_TCG),$(CONFIG_ARM_V7M))) += v7m_helper.o
 
-obj-$(TARGET_AARCH64) += translate-a64.o helper-a64.o
-obj-$(TARGET_AARCH64) += translate-sve.o sve_helper.o
-obj-$(TARGET_AARCH64) += pauth_helper.o
+obj-$(call land,$(CONFIG_TCG),$(TARGET_AARCH64)) += translate-a64.o helper-a64.o
+obj-$(call land,$(CONFIG_TCG),$(TARGET_AARCH64)) += translate-sve.o sve_helper.o
+obj-$(call land,$(CONFIG_TCG),$(TARGET_AARCH64)) += pauth_helper.o