public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gcc/configure.ac: fix --enable-fixed-point enablement [PR34422]
@ 2022-06-14 19:51 Eric Gallager
  2022-06-21 18:07 ` Eric Gallager
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Gallager @ 2022-06-14 19:51 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

So, in investigating PR target/34422, I discovered that the gcc
subdirectory's configure script had an instance of AC_ARG_ENABLE with
3rd and 4th its arguments reversed: the one where it warns that the
--enable-fixed-point flag is being ignored is the one where that flag
hasn't even been passed in the first place. The attached patch puts
the warning in the correct argument to the macro in question. (I'm not
including the regeneration of gcc/configure in the patch this time
since that confused people last time.) OK to commit, with an
appropriate ChangeLog?

[-- Attachment #2: patch-gcc_configure.diff --]
[-- Type: application/octet-stream, Size: 985 bytes --]

diff --git a/gcc/configure.ac b/gcc/configure.ac
index 80bdd8ceef9..5661d2382d7 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -941,7 +941,17 @@ point format instead of DPD])
 AC_ARG_ENABLE(fixed-point,
 [AS_HELP_STRING([--enable-fixed-point],
 		[enable fixed-point arithmetic extension to C])],
-[],
+[
+  case $target in
+    arm*-*-* | mips*-*-* | loongarch*-*-*)
+      # (enable_fixed_point already gets set to "yes" by the flag being passed)
+      ;;
+    *)
+      AC_MSG_WARN([fixed-point is not supported for this target, ignoring the --enable-fixed-point flag])
+      enable_fixed_point=no
+      ;;
+  esac
+],
 [
   case $target in
     arm*)
@@ -955,7 +965,8 @@ AC_ARG_ENABLE(fixed-point,
       enable_fixed_point=yes
       ;;
     *)
-      AC_MSG_WARN([fixed-point is not supported for this target, ignored])
+      # (no need to warn in this case, because no flag was given, so nothing was
+      # ignored)
       enable_fixed_point=no
       ;;
   esac

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-22 21:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14 19:51 [PATCH] gcc/configure.ac: fix --enable-fixed-point enablement [PR34422] Eric Gallager
2022-06-21 18:07 ` Eric Gallager
2022-06-22 21:14   ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).