unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50649: [patch] configure: fix libgccjit detection on MacPorts
@ 2021-09-17 23:19 Dan Ports
  2021-09-18 14:04 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Ports @ 2021-09-17 23:19 UTC (permalink / raw)
  To: 50649

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

Tags: patch

The current code in configure checks if a MacPorts gcc port is
installed in order to find libgccjit, but it fails if more than one gcc
port is installed (e.g., both gcc10 and gcc11). 

The attached patch fixes it to return only one version -- specifically,
the latest version (with a bit of ugliness because gcc4x sorts after
gcc11)

Dan

-- 
Dan R. K. Ports                                      https://drkp.net/

[-- Attachment #2: patch-libgccjit-macports.diff --]
[-- Type: text/x-diff, Size: 806 bytes --]

diff --git a/configure.ac b/configure.ac
index 1146b581cd..2ef78985ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3838,9 +3838,11 @@ AC_DEFUN
 
       if test -n "$HAVE_MACPORTS"; then
         # Determine which gcc version has been installed (gcc11, for
-        # instance).
+        # instance). Use the latest version, if more than one is 
+        # available.
         PORT_PACKAGE=$(port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \
-                            awk '{ print $1; }')
+                            awk '{ print $1; }' | grep -v 'gcc4@<:@0-9@:>@' | \
+                            sort -V | tail -n 1)
         if test -n "$PORT_PACKAGE"; then
           MAC_CFLAGS="-I$(dirname $(port contents $PORT_PACKAGE | \
                                            grep libgccjit.h))"

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

* bug#50649: [patch] configure: fix libgccjit detection on MacPorts
  2021-09-17 23:19 bug#50649: [patch] configure: fix libgccjit detection on MacPorts Dan Ports
@ 2021-09-18 14:04 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-18 14:04 UTC (permalink / raw)
  To: Dan Ports; +Cc: 50649

Dan Ports <dan@drkp.net> writes:

> The current code in configure checks if a MacPorts gcc port is
> installed in order to find libgccjit, but it fails if more than one gcc
> port is installed (e.g., both gcc10 and gcc11). 
>
> The attached patch fixes it to return only one version -- specifically,
> the latest version (with a bit of ugliness because gcc4x sorts after
> gcc11)

Thanks; installed in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-09-18 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 23:19 bug#50649: [patch] configure: fix libgccjit detection on MacPorts Dan Ports
2021-09-18 14:04 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).