Skip to contentSkip to conversation

Three unsorted patches

GIT PULL New Stefan Weil 1 participant 4 messages Nov 7, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

The following changes since commit 964668b03d26f0b5baa5e5aff0c966f4fcb76e9e:

Update version for 1.7.0-rc0 release (2013-11-06 21:49:39 -0800)

are available in the git repository at:

git://qemu.weilnetz.de/qemu.git mingw

for you to fetch changes up to 20d155bc902f41c5b354937e730ad85b43614ae9:

linux-user: Fix stat64 syscall for SPARC64 (2013-11-07 07:02:44 +0100)

----------------------------------------------------------------
Stefan Weil (3):
nsis: Improved support for parallel installation of 32 and 64 bit code
configure: Add config.status to recreate the current configuration
linux-user: Fix stat64 syscall for SPARC64

 Makefile                  |    9 ++++++++-
 configure                 |   15 +++++++++++++--
 linux-user/syscall.c      |    6 +++---
 linux-user/syscall_defs.h |   14 ++++++++++++++
 qemu.nsi                  |    6 +++++-
 5 files changed, 43 insertions(+), 7 deletions(-)

[PATCH for 1.7 1/3] nsis: Improved support for parallel installation of 32 [PATCH for 1.7 2/3] configure: Add config.status to recreate the current [PATCH for 1.7 3/3] linux-user: Fix stat64 syscall for SPARC64

Only the first patch falls in my direct maintainership (MinGW related). The 2nd patch is a general improvement of the build environment. The 3rd one is a bug fix.

Regards,
Stefan

#1 lore raw

PATCH 1/3 nsis: Improved support for parallel installation of 32 and 64 bit code

32 and 64 bit variants of QEMU already had different default installation directories, but used a common registry key for saving the choosen directory. This is confusing for users who want to install both variants, so fix it by using different registry keys.

---
 qemu.nsi |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
qemu.nsi +5 -1
index 0dc1f52..cc5fafd 100644
@@ -60,7 +60,11 @@ InstallDir $PROGRAMFILES\qemu
 
 ; Registry key to check for directory (so if you install again, it will
 ; overwrite the old one automatically)
-InstallDirRegKey HKLM "Software\qemu" "Install_Dir"
+!ifdef W64
+InstallDirRegKey HKLM "Software\qemu64" "Install_Dir"
+!else
+InstallDirRegKey HKLM "Software\qemu32" "Install_Dir"
+!endif
 
 ; Request administrator privileges for Windows Vista.
 RequestExecutionLevel admin
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/3 configure: Add config.status to recreate the current configuration

In reply to Stefan Weil

The latest configure invocation was saved in config-host.mak and could be extracted from that file to recreate the configuration.

Now it is saved in a new file config.status which can be directly executed to recreate the configuration. The file name and the comments were copied from GNU autoconf.

Makefile now uses config.status, but also includes transitional code for the old mechanism.

---
 Makefile  |    9 ++++++++-
 configure |   15 +++++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)
Makefile +8 -1
index b15003f..073f18b 100644
@@ -28,7 +28,14 @@ CONFIG_ALL=y
 include $(SRC_PATH)/rules.mak
 config-host.mak: $(SRC_PATH)/configure
 	@echo $@ is out-of-date, running configure
-	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
+	@# TODO: The next lines include code which supports a smooth
+	@# transition from old configurations without config.status.
+	@# This code can be removed after QEMU 1.7.
+	@if test -x config.status; then \
+	    ./config.status; \
+        else \
+	    sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh; \
+	fi
 else
 config-host.mak:
 ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
configure +13 -2
index 9addff1..a1cc5be 100755
@@ -27,6 +27,19 @@ printf " '%s'" "$0" "$@" >> config.log
 echo >> config.log
 echo "#" >> config.log
 
+# Save the configure command line for later reuse.
+cat <<EOD >config.status
+#!/bin/sh
+# Generated by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+EOD
+printf "exec" >>config.status
+printf " '%s'" "$0" "$@" >>config.status
+echo >>config.status
+chmod +x config.status
+
 error_exit() {
     echo
     echo "ERROR: $1"
@@ -3757,8 +3770,6 @@ config_host_mak="config-host.mak"
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
 
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
-printf "# Configured with:" >> $config_host_mak
-printf " '%s'" "$0" "$@" >> $config_host_mak
 echo >> $config_host_mak
 
 echo all: >> $config_host_mak
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 3/3 linux-user: Fix stat64 syscall for SPARC64

In reply to Stefan Weil

Some targets use a stat64 structure for the stat64 syscall while others use a stat structure. SPARC64 used the wrong kind.

Instead of extending the conditional compilation in syscall.c, now a macro TARGET_HAS_STRUCT_STAT64 is defined whenever a target has a target_stat64.

---
 linux-user/syscall.c      |    6 +++---
 linux-user/syscall_defs.h |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 3 deletions(-)
linux-user/syscall.c +3 -3
index 4a14a43..eaaf00d 100644
@@ -4870,10 +4870,10 @@ static inline abi_long host_to_target_stat64(void *cpu_env,
     } else
 #endif
     {
-#if TARGET_ABI_BITS == 64 && !defined(TARGET_ALPHA)
-        struct target_stat *target_st;
-#else
+#if defined(TARGET_HAS_STRUCT_STAT64)
         struct target_stat64 *target_st;
+#else
+        struct target_stat *target_st;
 #endif
 
         if (!lock_user_struct(VERIFY_WRITE, target_st, target_addr, 0))
linux-user/syscall_defs.h +14 -0
index 5f53a28..fe540f6 100644
@@ -1178,6 +1178,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned short	st_dev;
 	unsigned char	__pad0[10];
@@ -1213,6 +1214,7 @@ struct target_stat64 {
 } QEMU_PACKED;
 
 #ifdef TARGET_ARM
+#define TARGET_HAS_STRUCT_STAT64
 struct target_eabi_stat64 {
         unsigned long long st_dev;
         unsigned int    __pad1;
@@ -1262,6 +1264,7 @@ struct target_stat {
 	abi_ulong	__unused4[2];
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned char	__pad0[6];
 	unsigned short	st_dev;
@@ -1317,6 +1320,7 @@ struct target_stat {
 	abi_ulong	__unused4[2];
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned char	__pad0[6];
 	unsigned short	st_dev;
@@ -1384,6 +1388,8 @@ struct target_stat {
 #endif
 };
 
+#if !defined(TARGET_PPC64) || defined(TARGET_ABI32)
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	unsigned long long st_dev;
         unsigned long long st_ino;
@@ -1406,6 +1412,7 @@ struct QEMU_PACKED target_stat64 {
         unsigned int   __unused4;
         unsigned int   __unused5;
 };
+#endif
 
 #elif defined(TARGET_MICROBLAZE)
 
@@ -1431,6 +1438,7 @@ struct target_stat {
 };
 
 /* FIXME: Microblaze no-mmu user-space has a difference stat64 layout...  */
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	uint64_t st_dev;
 #define TARGET_STAT64_HAS_BROKEN_ST_INO 1
@@ -1486,6 +1494,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned long long	st_dev;
 	unsigned char	__pad1[2];
@@ -1594,6 +1603,7 @@ struct target_stat {
  * struct stat of the 64-bit kernel.
  */
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	unsigned int	st_dev;
 	unsigned int	st_pad0[3];	/* Reserved for st_dev expansion  */
@@ -1665,6 +1675,7 @@ struct target_stat {
  * struct stat of the 64-bit kernel.
  */
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
 	abi_ulong	st_dev;
 	abi_ulong	st_pad0[3];	/* Reserved for st_dev expansion  */
@@ -1721,6 +1732,7 @@ struct target_stat {
        unsigned int    st_gen;
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
        abi_ulong    st_dev;
        abi_ulong    st_ino;
@@ -1770,6 +1782,7 @@ struct target_stat {
 /* This matches struct stat64 in glibc2.1, hence the absolutely
  * insane amounts of padding around dev_t's.
  */
+#define TARGET_HAS_STRUCT_STAT64
 struct QEMU_PACKED target_stat64 {
 	unsigned long long	st_dev;
 	unsigned char	__pad0[4];
@@ -1897,6 +1910,7 @@ struct target_stat {
     unsigned int __unused5;
 };
 
+#define TARGET_HAS_STRUCT_STAT64
 struct target_stat64 {
     uint64_t st_dev;
     uint64_t st_ino;
Signature · 1 line
1.7.10.4