[PATCH] configure: Symlink binaries using .exe suffix with MinGW

Philippe Mathieu-Daudé posted 1 patch 2 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211109144504.1541206-1-philmd@redhat.com
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] configure: Symlink binaries using .exe suffix with MinGW
Posted by Philippe Mathieu-Daudé 2 years, 6 months ago
When using the MinGW toolchain, we use the .exe suffix for the
executable name. We also need to use it for the symlinks in the
build directory.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 48c21775f3a..31e8f586dc7 100755
--- a/configure
+++ b/configure
@@ -3786,7 +3786,7 @@ fi
 
 for target in $target_list; do
     target_dir="$target"
-    target_name=$(echo $target | cut -d '-' -f 1)
+    target_name=$(echo $target | cut -d '-' -f 1)$EXESUF
     mkdir -p $target_dir
     case $target in
         *-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;;
-- 
2.31.1

Re: [PATCH] configure: Symlink binaries using .exe suffix with MinGW
Posted by Stefan Weil 2 years, 6 months ago
Am 09.11.21 um 15:45 schrieb Philippe Mathieu-Daudé:

> When using the MinGW toolchain, we use the .exe suffix for the
> executable name. We also need to use it for the symlinks in the
> build directory.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 48c21775f3a..31e8f586dc7 100755
> --- a/configure
> +++ b/configure
> @@ -3786,7 +3786,7 @@ fi
>   
>   for target in $target_list; do
>       target_dir="$target"
> -    target_name=$(echo $target | cut -d '-' -f 1)
> +    target_name=$(echo $target | cut -d '-' -f 1)$EXESUF
>       mkdir -p $target_dir
>       case $target in
>           *-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;;


I never missed those links, and so I did not notice that they were 
broken. But fixing them is reasonable of course, thank you.

Reviewed-by: Stefan Weil <sw@weilnetz.de>



Re: [PATCH] configure: Symlink binaries using .exe suffix with MinGW
Posted by Paolo Bonzini 2 years, 6 months ago
On 11/9/21 15:45, Philippe Mathieu-Daudé wrote:
> When using the MinGW toolchain, we use the .exe suffix for the
> executable name. We also need to use it for the symlinks in the
> build directory.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

but perhaps we can get rid of the symlinks instead?...

Paolo

> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 48c21775f3a..31e8f586dc7 100755
> --- a/configure
> +++ b/configure
> @@ -3786,7 +3786,7 @@ fi
>   
>   for target in $target_list; do
>       target_dir="$target"
> -    target_name=$(echo $target | cut -d '-' -f 1)
> +    target_name=$(echo $target | cut -d '-' -f 1)$EXESUF
>       mkdir -p $target_dir
>       case $target in
>           *-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;;
> 


Re: [PATCH] configure: Symlink binaries using .exe suffix with MinGW
Posted by Philippe Mathieu-Daudé 2 years, 5 months ago
Hi Laurent,

This patch is reviewed/acked, can it go via your trivial tree?

On 11/9/21 15:45, Philippe Mathieu-Daudé wrote:
> When using the MinGW toolchain, we use the .exe suffix for the
> executable name. We also need to use it for the symlinks in the
> build directory.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 48c21775f3a..31e8f586dc7 100755
> --- a/configure
> +++ b/configure
> @@ -3786,7 +3786,7 @@ fi
>  
>  for target in $target_list; do
>      target_dir="$target"
> -    target_name=$(echo $target | cut -d '-' -f 1)
> +    target_name=$(echo $target | cut -d '-' -f 1)$EXESUF
>      mkdir -p $target_dir
>      case $target in
>          *-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;;
> 


Re: [PATCH] configure: Symlink binaries using .exe suffix with MinGW
Posted by Laurent Vivier 2 years, 4 months ago
Le 09/11/2021 à 15:45, Philippe Mathieu-Daudé a écrit :
> When using the MinGW toolchain, we use the .exe suffix for the
> executable name. We also need to use it for the symlinks in the
> build directory.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 48c21775f3a..31e8f586dc7 100755
> --- a/configure
> +++ b/configure
> @@ -3786,7 +3786,7 @@ fi
>   
>   for target in $target_list; do
>       target_dir="$target"
> -    target_name=$(echo $target | cut -d '-' -f 1)
> +    target_name=$(echo $target | cut -d '-' -f 1)$EXESUF
>       mkdir -p $target_dir
>       case $target in
>           *-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;;
> 

Applied to my trivial-patches branch.

Thanks,
Laurent