summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Ports <dan@drkp.net>2021-09-18 16:04:38 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-09-18 16:04:38 +0200
commit5444f607a64c223489f6aa70b1f4bbce1c32ba63 (patch)
tree3578f89c656cc4cada4e39ecbbb4d290ac8b9435 /configure.ac
parent1b623d0fbf5e69910379a8f1e23006419b046e23 (diff)
downloademacs-5444f607a64c223489f6aa70b1f4bbce1c32ba63.tar.gz
Use the newest gcc installed by Macports
* configure.ac: There may be more than one gcc version installed in Macports (bug#50649). Use the newest. Copyright-paperwork-exempt: yes
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1146b581cd7..f151dd551dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3838,9 +3838,13 @@ if test "${with_native_compilation}" != "no"; then
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. (We filter out the gcc4 packages, because they
+ # don't support jit, and they have names like "gcc49" that
+ # sort later than "gcc11".)
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))"