$NetBSD: patch-gcc_Makefile.in,v 1.1 2024/06/28 18:35:16 wiz Exp $ Ensure libgcc from this GCC is found before others. Note that there must not be a whitespace between $(LINKER_RPATH_FLAG) and the path. Otherwise the flag may be misinterpreted by the linker (e.g. Apple ld). --- gcc/Makefile.in.orig 2017-04-18 18:10:27.000000000 +0000 +++ gcc/Makefile.in @@ -2112,6 +2112,7 @@ prefix.o: $(BASEVER) # Language-independent files. DRIVER_DEFINES = \ + -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@GCC_TARGET_MACHINE@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \ -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \