commit:     e003cbcab41e39e82bfcf6bd3bb055c1a2bf2986
Author:     Horodniceanu Andrei <a.horodniceanu <AT> protonmail <DOT> com>
AuthorDate: Mon Sep  4 17:10:24 2023 +0000
Commit:     Marco Leise <marco.leise <AT> gmx <DOT> de>
CommitDate: Mon Sep  4 17:13:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=e003cbca

dmd.eclass: respect CC

Signed-off-by: Horodniceanu Andrei <a.horodniceanu <AT> protonmail.com>

 eclass/dmd.eclass | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/eclass/dmd.eclass b/eclass/dmd.eclass
index ad99b43..16f926a 100644
--- a/eclass/dmd.eclass
+++ b/eclass/dmd.eclass
@@ -194,11 +194,18 @@ dmd_src_compile() {
        fi
 
        compile_libraries() {
+               local mymakeargs=(
+                       DMD="../$(dmd_gen_exe_dir)/dmd"
+                       MODEL="${MODEL}"
+                       PIC=1
+                       CC="$(tc-getCC)"
+               )
+
                einfo 'Building druntime...'
-               emake -C druntime -f posix.mak DMD="../$(dmd_gen_exe_dir)/dmd" 
MODEL=${MODEL} PIC=1 MANIFEST=
+               emake -C druntime -f posix.mak "${mymakeargs[@]}" MANIFEST=
 
                einfo 'Building Phobos 2...'
-               emake -C phobos -f posix.mak DMD="../$(dmd_gen_exe_dir)/dmd" 
MODEL=${MODEL} PIC=1 CUSTOM_DRUNTIME=1
+               emake -C phobos -f posix.mak "${mymakeargs[@]}" 
CUSTOM_DRUNTIME=1
        }
 
        dmd_foreach_abi compile_libraries

Reply via email to