<html><head></head><body>It's a gross hack because it's making a special case of some variables.<br><br>Your argument is that the variables can be set... sure that's precise why they don't need to be unexported.<br><br><div class="gmail_quote">Le 2 octobre 2019 11:55:56 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">I don't understand why this is a hack.<br>Variables are already set in HOSTVARS.<br><br>For me, it's always better to keep the minimal number of exported variables. It's way easier to debug in that case.<br><br>On Tue, Oct 1, 2019, at 13:36, Steve Lhomme wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">On 2019-09-30 17:50, Marvin Scholz wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">I am proposing this patch again, I know that I did a while ago and<br>some people had some concerns about this.<br>But without this patch cross compilation of contribs effectively<br>fails unless the build system can run the cross compiled binaries,<br>as the cross compilation flags are incorrectly used for the build<br>compiler too. Even though we do not build native tools in the<br>affected contribs, meson does check if the compiler works and<br>of course considers this not to be the case when the build machine<br>compiler can not create binaries that run on the build machine.<br><br>Without this patch effectively cross compilation of contribs for iOS<br>and probably Android is broken.<br></blockquote>It also fixes my build with clang where I have "-gcodeview" in the <br>CFLAGS but the native gcc doesn't understand it.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">Regarding the concern that it might break some contribs that do not<br>correctly use the HOSTVARS to prepends the env variables to the<br>command, I did not found any that would be affected by this.<br><br>I compiled the contribs with this patch applied, for iOS and<br>Windows without errors. This patch does not affect non-cross<br>compilation at all.<br><br>On 30 Sep 2019, at 17:43, Marvin Scholz wrote:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> Meson always interprets these env variables for the build compiler,<br> even when cross-compiling, therefore we need to unset them,<br> they are anyway included in HOSTVARS already for other build systems.<hr>  contrib/src/main.mak | 13 +++++++++++++<br>  1 file changed, 13 insertions(+)<br><br> diff --git a/contrib/src/main.mak b/contrib/src/main.mak<br> index 7eef7b85b6..b07b9a0855 100644<br> --- a/contrib/src/main.mak<br> +++ b/contrib/src/main.mak<br> @@ -314,6 +314,19 @@ MESON_HOST_FLAGS := \<br>      LDFLAGS="$(LDFLAGS)"<br>  ifdef HAVE_CROSS_COMPILE<br>  HOSTVARS_MESON := PATH="$(PREFIX)/bin:$(PATH)"<br> +# For cross-compilation with meson, we need to unset compiler and flags<br> +# env variables as meson will always use them for the BUILD machine <br> compiler!<br> +unexport CC<br> +unexport CXX<br> +unexport LD<br> +unexport AR<br> +unexport CCAS<br> +unexport RANLIB<br> +unexport STRIP<br> +unexport CPPFLAGS<br> +unexport CFLAGS<br> +unexport CXXFLAGS<br> +unexport LDFLAGS<br>  else<br>  HOSTVARS_MESON := $(HOSTTOOLS) $(MESON_HOST_FLAGS)<br>  endif<br> -- <br> 2.20.1 (Apple Git-117)<br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>