Thanks for the new patchset Lily, very excited to have emacs with native compiliation in upstream Guix! (At the very least so I don't have to compile libgccjit and emacs)
For everyone following along at home, please see https://issues.guix.gnu.org/57086 As for the original issue here, I guess the LIBRARY_PATH and ld shadowing is the workaround. I don't know if that is something that can/should be incorporated into the libgccjit package definition or should just be handled by any package using it. Currently, that will just be emacs anyway and hopefully the discussion here is useful to anyone trying to use libgccjit. Thanks again Lily and Andrew for your work here!