meson: convert target/s390x/gen-features.h
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 17 Aug 2019 10:55:32 +0000 (14:55 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Aug 2020 10:30:17 +0000 (06:30 -0400)
Needed by linux-user/s390x/cpu_loop.c; this removes the only use of HOST_CC.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile
configure
meson.build
target/meson.build [new file with mode: 0644]
target/s390x/Makefile.objs
target/s390x/cpu_features.h
target/s390x/cpu_models.h
target/s390x/meson.build [new file with mode: 0644]

index 1ee3398c153ac54c941c77f13aeb3f2b8dadc277..698bbdfcd384a048a39a012471659114baea09f5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -124,6 +124,8 @@ CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
 generated-files-y = config-host.h
 
 generated-files-y += module_block.h
+generated-files-y += target/s390x/gen-features.h
+target/s390x/gen-features.h: Makefile.ninja
 
 generated-files-y += .git-submodule-status
 
index e58607a984cf43d5d614e6c21e92bf94465141f0..c20436f8b27dce5601e5d4917bd15612178aa906 100755 (executable)
--- a/configure
+++ b/configure
@@ -7834,7 +7834,6 @@ echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
   echo "IASL=$iasl" >> $config_host_mak
 fi
-echo "HOST_CC=$host_cc" >> $config_host_mak
 echo "CXX=$cxx" >> $config_host_mak
 echo "OBJCC=$objcc" >> $config_host_mak
 echo "AR=$ar" >> $config_host_mak
index ece3be725d7d1b578d5358efa3993fa0fc3cc7fa..c892672628225d0c7d3f3edf564aa055fef2fd5e 100644 (file)
@@ -348,6 +348,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
 
 subdir('io')
 subdir('fsdev')
+subdir('target')
 
 # Other build targets
 if 'CONFIG_GUEST_AGENT' in config_host
diff --git a/target/meson.build b/target/meson.build
new file mode 100644 (file)
index 0000000..e29dd3e
--- /dev/null
@@ -0,0 +1 @@
+subdir('s390x')
index 3e2745594a29817e65a9fbe81c3e4d810a9f9e06..9b9accc5fdf2394da44e65645aa29ab08593820d 100644 (file)
@@ -8,23 +8,3 @@ obj-$(CONFIG_SOFTMMU) += sigp.o
 obj-$(CONFIG_KVM) += kvm.o
 obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
 obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
-
-# build and run feature list generator
-feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
-feat-dst = $(BUILD_DIR)/$(TARGET_DIR)
-ifneq ($(MAKECMDGOALS),clean)
-generated-files-y += $(feat-dst)gen-features.h
-endif
-
-$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp
-       @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(feat-dst)gen-features.h-timestamp: $(feat-dst)gen-features
-       $(call quiet-command,$< >$@,"GEN","$(TARGET_DIR)gen-features.h")
-
-$(feat-dst)gen-features: $(feat-src)gen-features.c
-       $(call quiet-command,$(HOST_CC) $(QEMU_INCLUDES) -o $@ $<,"CC","$(TARGET_DIR)gen-features")
-
-clean-target:
-       rm -f gen-features.h-timestamp
-       rm -f gen-features.h
-       rm -f gen-features
index da695a8346e98d6b54b9efcae4129fd6d33be1d0..2a2947549387bf78b84c23a898c9d08ab4f6db2c 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "qemu/bitmap.h"
 #include "cpu_features_def.h"
-#include "gen-features.h"
+#include "target/s390x/gen-features.h"
 
 /* CPU features are announced via different ways */
 typedef enum {
index 88bd01a61695a060f57204d101fafcd5cdc7e5be..74d1f87e4fd5fca9791abc4bf9e36b3341e5fb63 100644 (file)
@@ -14,7 +14,7 @@
 #define TARGET_S390X_CPU_MODELS_H
 
 #include "cpu_features.h"
-#include "gen-features.h"
+#include "target/s390x/gen-features.h"
 #include "hw/core/cpu.h"
 
 /* static CPU definition */
diff --git a/target/s390x/meson.build b/target/s390x/meson.build
new file mode 100644 (file)
index 0000000..ddf8d20
--- /dev/null
@@ -0,0 +1,9 @@
+gen_features = executable('gen-features', 'gen-features.c', native: true,
+                          build_by_default: false)
+
+gen_features_h = custom_target('gen-features.h',
+                               output: 'gen-features.h',
+                               capture: true,
+                               command: gen_features)
+
+specific_ss.add(gen_features_h)