<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">Hello,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I would say that we aren't against
taking in variables on the configure command line for setting
executables to use in the build, as that's a well established
standard way of doing just that with Autoconf. The built in
Autoconf macros for CC and similar executables pick up such
variables, so at least in principle I'm not against the idea of
being able to do so for the linker. I may have opinions, and I'm
sure Magnus would have too, on the particulars of how this is
implemented. Unfortunately, I can't comment on this particular
implementation proposal until it's submitted in a PR with the OCA
signed.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">/Erik<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 1/22/25 3:19 AM, Julian Waters
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAP2b4GML2Mi_5HKp7HtysQOwD484YPSQ6B=LoMFQi_Fz2EJ63A@mail.gmail.com">
<div dir="ltr">
<div>Hi!</div>
<div><br>
</div>
I believe it's not a hard requirement that special variables
can't be used, just that it's strongly discouraged in favour of
configure options. I'm not sure if we support linker
combinations other than the one the compiler comes with, the
extent of my knowledge is that I think Oracle uses gold for gcc,
but regardless you'd have to ask Magnus for that. But the issue
is still that different linkers might need to be treated
differently by the build system, and it might not yet be
prepared to use linkers like mold instead of lld
<div><br>
</div>
<div>best regards,</div>
<div>Julian</div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">On Wed, Jan 22, 2025 at
5:54 PM Bingwu Zhang <<a href="mailto:xtex@envs.net" moz-do-not-send="true" class="moz-txt-link-freetext">xtex@envs.net</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
<br>
The patch I mentioned in last message will first try to
resolve the full, <br>
absolute path of lld, and use --ld-path to pass the path to
Clang. It should <br>
have the same effect as passing -fuse-ld=lld. If it failed to
do so, it will <br>
fallback to use -fuse-ld=lld to let Clang pick up the proper
linker.<br>
<br>
btw it seems that CC and CXX is picked by the build system
[1]. Why don't we <br>
just pick up the variable?<br>
<br>
I will later change it to use a configure option. How about
--with-linker-path?<br>
<br>
Thanks! :)<br>
<br>
[1] <a href="https://github.com/magicus/jdk/blob/" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/magicus/jdk/blob/</a><br>
a62a870150cf199f16277b478af2f5d937255b3c/make/autoconf/toolchain.m4#L430<br>
<br>
-- <br>
Bingwu Zhang<br>
xtex @ Wed, 22 Jan 2025 09:45:35 +0000<br>
<br>
<br>
<br>
</blockquote>
</div>
</blockquote>
</body>
</html>