Skip to contentSkip to conversation

configure: Symlink binaries using .exe suffix with MinGW

PATCH Applied Philippe Mathieu-Daudé 4 participants 5 messages Nov 9, 2021 – Dec 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Symlink binaries using .exe suffix with MinGW

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.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 48c21775f3a..31e8f586dc7 100755
@@ -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" ;;
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw

Am 09.11.21 um 15:45 schrieb Philippe Mathieu-Daudé:

Quoted 14 lines

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.

---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 48c21775f3a..31e8f586dc7 100755

configure fi · line 3792

Quoted 8 lines
configure +1 -1
@@ -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.

Acked-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 5 lines · 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.

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

Paolo

Quoted 18 lines
---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 48c21775f3a..31e8f586dc7 100755
@@ -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" ;;
#3 lore raw
In reply to Philippe Mathieu-Daudé

Hi Laurent,

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

Quoted 23 lines · 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.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 48c21775f3a..31e8f586dc7 100755
@@ -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" ;;
#4 lore raw
In reply to Philippe Mathieu-Daudé

Le 09/11/2021 à 15:45, Philippe Mathieu-Daudé a écrit :

Quoted 15 lines

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.

---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 48c21775f3a..31e8f586dc7 100755

configure fi · line 3792

Quoted 8 lines
configure +1 -1
@@ -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