commit: d689573d4e6f4a21922de047db82e8a716f6c633
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 14 08:02:08 2021 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jan 14 08:02:08 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=d689573d
eclass/toolchain.eclass: set DYLD_LIBRARY_PATH for Darwin9 libstdc++
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
eclass/toolchain.eclass | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index e5d4dd6ca9..6e7411559a 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2080,6 +2080,19 @@ create_gcc_env_entry() {
GCC_SPECS="${gcc_specs_file}"
MULTIOSDIRS="${mosdirs}"
EOF
+
+ # crude hack, but necessary :(
+ # Darwin9's libstdc++ is incompatible with later GCC's libstdc++
+ # causing ugly malloc warnings about non-aligned pointers, but in
+ # cmake's case, also crashes, unfortunately. See also:
+ # https://trac.macports.org/ticket/59832
+ # our only way out here is to set DYLD_LIBRARY_PATH to replace the
+ # libstdc++ used by the Frameworks that cmake links in
+ if [[ ${CHOST} == *-darwin9 ]] ; then
+ cat <<-EOF >> ${gcc_envd_file}
+ DYLD_LIBRARY_PATH="${LIBPATH}"
+ EOF
+ fi
}
create_revdep_rebuild_entry() {