commit: fc3edfcd1cc277a3457c0d17041f74452b4d3465 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Mon Dec 26 10:14:34 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Dec 28 19:11:59 2022 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=fc3edfcd
Read LIBDIR with portageq from EROOT instead of hardcoding the / value We fall back to the hardcoded / value if that fails. Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> Closes: https://github.com/gentoo/gcc-config/pull/1 Signed-off-by: Sam James <sam <AT> gentoo.org> gcc-config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc-config b/gcc-config index 236c433..a44fced 100755 --- a/gcc-config +++ b/gcc-config @@ -41,7 +41,10 @@ fi PV="@PV@" [[ ${PV} == @*@ ]] && PV="git" -GENTOO_LIBDIR="@GENTOO_LIBDIR@" + +ABI=$(portageq envvar DEFAULT_ABI 2>/dev/null) +GENTOO_LIBDIR=$(portageq envvar LIBDIR_"${ABI}" 2>/dev/null) +[[ $? != 0 || -z ${GENTOO_LIBDIR} ]] && GENTOO_LIBDIR="@GENTOO_LIBDIR@" [[ ${GENTOO_LIBDIR} == @*@ ]] && GENTOO_LIBDIR="lib" usage() {