# HG changeset patch # User Markus Mützel # Date 1651858570 -7200 # Node ID 5f64fb928091060e3efcc0871a62c1c5e46a10d7 # Parent fbb4c524bed1abc6701e5e4dc204d07399c59b9a build-gcc: Avoid library clash when calling msgfmt. * src/build-gcc-1-msgfmt.patch: Don't use libraries from the build tree when calling `msgfmt`. * dist-files.mk: Add patch to list. diff -r fbb4c524bed1 -r 5f64fb928091 dist-files.mk --- a/dist-files.mk Thu May 05 14:15:37 2022 -0400 +++ b/dist-files.mk Fri May 06 19:36:10 2022 +0200 @@ -28,6 +28,7 @@ build-flex-1-fixes.patch \ build-flex.mk \ build-gawk.mk \ + build-gcc-1-msgfmt.patch \ build-gcc.mk \ build-gettext.mk \ build-gperf.mk \ diff -r fbb4c524bed1 -r 5f64fb928091 src/build-gcc-1-msgfmt.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/build-gcc-1-msgfmt.patch Fri May 06 19:36:10 2022 +0200 @@ -0,0 +1,32 @@ +When `msgfmt` is called after libstdc++ was built, and that existing program +was linked against an incompatible version of libstdc++, it must not link to +that new version of libstdc++ but to the library installed on the system. +The path to the new library must not be set in LD_LIBRARY_PATH to avoid an +error. Set LD_LIBRARY_PATH to an empty string to load the libraroes installed +on the build system instead. + +diff -urN gcc-11.3.0/libstdc++-v3/po/Makefile.am.orig gcc-11.3.0/libstdc++-v3/po/Makefile.am +--- gcc-11.3.0/libstdc++-v3/po/Makefile.am.orig 2022-04-21 09:58:57.000000000 +0200 ++++ gcc-11.3.0/libstdc++-v3/po/Makefile.am 2022-05-04 08:47:07.588346500 +0200 +@@ -38,7 +38,7 @@ + EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN) + + .po.mo: +- $(MSGFMT) -o $@ $< ++ LD_LIBRARY_PATH="" $(MSGFMT) -o $@ $< + + all-local: all-local-$(USE_NLS) + all-local-no: + +diff -urN gcc-11.3.0/libstdc++-v3/po/Makefile.in.orig gcc-11.3.0/libstdc++-v3/po/Makefile.in +--- gcc-11.3.0/libstdc++-v3/po/Makefile.in.orig 2022-04-21 09:58:57.000000000 +0200 ++++ gcc-11.3.0/libstdc++-v3/po/Makefile.in 2022-05-04 08:46:57.356251900 +0200 +@@ -553,7 +553,7 @@ + + + .po.mo: +- $(MSGFMT) -o $@ $< ++ LD_LIBRARY_PATH="" $(MSGFMT) -o $@ $< + + all-local: all-local-$(USE_NLS) + all-local-no: