Subject: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew libgccjit 12.1.0

From: Naofumi Yasufuku <[email-masked]>
Date: Wed, 10 Aug 2022 23:42:21 +0900

Dario Gjorgjevski <[email-masked]> writes:

> Naofumi Yasufuku <[email-masked]> writes:
>
>> './configure --with-native-compilation' fails if Homebrew libgccjit is
>> updated to 12.1.0.  Attached configure.ac patch fixes this issue.
>> I think the same patch should be applied to emacs-28 branch.
>
> As an alternative to your patch and the general approach based on
> running `grep` over the output of `brew ls`, one can also use
>
>     % brew ruby -e 'puts "#{:libgccjit.f.lib}/gcc/#{:gcc.f.any_installed_version.major}"'
>     /usr/local/opt/libgccjit/lib/gcc/12
>
> for MAC_LIBS, and
>
>     % brew ruby -e 'puts :libgccjit.f.include'
>     /usr/local/opt/libgccjit/include
>
> for MAC_CFLAGS.  This will work with both versions 11 and 12 of
> Homebrew's `libgccjit`.
>

Great.  That makes sense to me.  I think 'brew ruby' way is clearly
preferable over my attempt.

Regards,
  Naofumi