On Tue, Aug 29, 2023 at 7:14 PM Daniel P. Berrangé <berra...@redhat.com> wrote: > > On Tue, Aug 29, 2023 at 10:29:25AM +0200, Paolo Bonzini wrote: > > The argument of --host-cc is not obeyed when cross compiling. To avoid > > this issue, place it in a configuration file and pass it to meson > > with --native-file. > > > > While at it, clarify that --host-cc is not obeyed anyway when _not_ > > cross compiling. > > I presume that's refering to this piece of code > > if test -z "${CC}${cross_prefix}"; then > cc="$host_cc" > else > cc="${CC-${cross_prefix}gcc}" > fi > > which is using $host_cc *before* --host-cc is processed, thus > meaning it is always at its default value of 'cc'.
That, plus the fact that --native-file is only used in cross compilation scenarios; when doing a native compilation there's no difference between "native: true" and "native: false" as far as Meson is concerned. > Perhaps the above code snippet should just be changed to > > if test -z "${CC}${cross_prefix}"; then > cc="cc" > else > cc="${CC-${cross_prefix}gcc}" > fi > > to make it clear that we were not intending to honour the > --host-cc value for this code. Since I have to send a v2 anyway for the (un)supported OS message, I'll do the change. Paolo