From 8ed46b7646de7166aa8bbd3b5d29a4947316c900 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Wed, 7 Apr 2021 19:02:56 +0100 Subject: Remove hardcoded gcc version * configure.ac: Use 'find' to find the brew installed libgccjit libs instead of a hardcoded path. --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 698e8affb51..3892eaed64b 100644 --- a/configure.ac +++ b/configure.ac @@ -3806,8 +3806,10 @@ if test "${with_native_compilation}" != "no"; then if test -n "$BREW"; then BREW_LIBGCCJIT_PREFIX=`$BREW --prefix --installed libgccjit 2>/dev/null` if test "$BREW_LIBGCCJIT_PREFIX"; then + brew_libdir=`find ${BREW_LIBGCCJIT_PREFIX}/ -name \*.so \ + | sed -e '1!d;s|/[[^/]]*\.so$||'` CFLAGS="$CFLAGS -I${BREW_LIBGCCJIT_PREFIX}/include" - LDFLAGS="$LDFLAGS -L${BREW_LIBGCCJIT_PREFIX}/lib/gcc/10 -I${BREW_LIBGCCJIT_PREFIX}/include" + LDFLAGS="$LDFLAGS -L${brew_libdir} -I${BREW_LIBGCCJIT_PREFIX}/include" fi fi -- cgit v1.2.1