]> Savannah Git Hosting - gnulib.git/commitdiff
dcomp-script: Handle gdc binaries named <host>-gdc.
authorBruno Haible <bruno@clisp.org>
Tue, 1 Apr 2025 08:00:54 +0000 (10:00 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 1 Apr 2025 08:00:54 +0000 (10:00 +0200)
* m4/dcomp.m4 (gt_DCOMP): Look only at the first word of the --version
output and accept a "<host>-" prefix.
* build-aux/dcomp.sh.in: Likewise.

ChangeLog
build-aux/dcomp.sh.in
m4/dcomp.m4

index 7f71a3a2311738107ecb39a09b166d81b3ad98ae..0166a1cdef1b1312e1d99c995db12f9c222e14ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-04-01  Bruno Haible  <bruno@clisp.org>
+
+       dcomp-script: Handle gdc binaries named <host>-gdc.
+       * m4/dcomp.m4 (gt_DCOMP): Look only at the first word of the --version
+       output and accept a "<host>-" prefix.
+       * build-aux/dcomp.sh.in: Likewise.
+
 2025-03-31  Bruno Haible  <bruno@clisp.org>
 
        dcomp-script: New module.
index 5e3af76e8f6c6dfd193456256cd579b52bd2fe3e..52a6123d22504448da87c79fafc177a1a589c84b 100644 (file)
@@ -30,8 +30,8 @@
 #   -Wl,OPTION  (for libtool compatility)
 
 # Find out which implementation we are using.
-case `@DC@ --version | sed -e 1q` in
-  gdc* | egdc*) flavor=gdc ;;
+case `@DC@ --version | sed -e 's/ .*//' -e 1q` in
+  gdc | *-gdc | egdc | *-egdc) flavor=gdc ;;
   LDC*) flavor=ldc ;;
   DMD*) flavor=dmd ;;
   *)
index f5c62d76bdcaf59bcfb4934acd175a4fdf82b7e0..44813388130bc04cf963651e9f996805d7008b36 100644 (file)
@@ -1,5 +1,5 @@
 # dcomp.m4
-# serial 1
+# serial 2
 dnl Copyright (C) 2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -43,9 +43,9 @@ AC_DEFUN([gt_DCOMP],
   AC_MSG_RESULT([$ac_result])
   AC_SUBST([DC])
   if test -z "$DFLAGS" && test -n "$DC"; then
-    case `$DC --version | sed -e 1q` in
-      gdc* | egdc* | LDC*) DFLAGS="-g -O2" ;;
-      *)                   DFLAGS="-g -O" ;;
+    case `$DC --version | sed -e 's/ .*//' -e 1q` in
+      gdc | *-gdc | egdc | *-egdc | LDC*) DFLAGS="-g -O2" ;;
+      *)                                  DFLAGS="-g -O" ;;
     esac
   fi
   AC_SUBST([DFLAGS])