@@ -113,6 +113,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
@@ -7785,7 +7785,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
@@ -344,6 +344,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
subdir('io')
subdir('fsdev')
+subdir('target')
# Other build targets
if 'CONFIG_GUEST_AGENT' in config_host
new file mode 100644
@@ -0,0 +1 @@
+subdir('s390x')
@@ -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
@@ -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 {
@@ -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 */
new file mode 100644
@@ -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)