<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Le 30/03/2018 à 10:36, Martin Storsjö a écrit :<br>
<blockquote type="cite"
cite="mid:alpine.DEB.2.20.1803301128410.20294@cone.martin.st">On
Fri, 30 Mar 2018, Steve Lhomme wrote:
<br>
<br>
<blockquote type="cite">Le 29/03/2018 à 22:01, Martin Storsjö a
écrit :
<br>
<blockquote type="cite">On Thu, 29 Mar 2018, Steve Lhomme wrote:
<br>
<br>
<blockquote type="cite">No other contrib need it and we use
the same compiler for them.
<br>
---
<br>
contrib/src/mfx/rules.mak | 2 +-
<br>
1 file changed, 1 insertion(+), 1 deletion(-)
<br>
<br>
diff --git a/contrib/src/mfx/rules.mak
b/contrib/src/mfx/rules.mak
<br>
index a5b1fdaa61..f3b1287db5 100644
<br>
--- a/contrib/src/mfx/rules.mak
<br>
+++ b/contrib/src/mfx/rules.mak
<br>
@@ -23,6 +23,6 @@ mfx: mfx-$(MFX_GITHASH).tar.xz .sum-mfx
<br>
$(MOVE)
<br>
<br>
.mfx: mfx
<br>
- cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
CXXFLAGS="$(CXXFLAGS) -std=c++98 -O2"
<br>
+ cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
CXXFLAGS="$(CXXFLAGS) -std=c++98"
<br>
</blockquote>
<br>
The reason for this is, if you don't override configure's
CXXFLAGS, it will implicitly contain -O2. If you do override
it, it will clear all the defaults and you'll end up with a
build with no optimization flags whatsoever, and you need to
manually add the -O2 that would otherwise have been there.
<br>
</blockquote>
<br>
I think if it's placed after the env CXXFLAGS it will override
whatever value was set before. It may depend on the compiler
though.
<br>
</blockquote>
<br>
There's no difference between if I do "./configure CXXFLAGS=-foo"
or "CXXFLAGS=-foo ./configure" or "export CXXFLAGS=-foo;
./configure", both of them will override things that you had in
$CXXFLAGS from before - this has nothing to do with the compiler.
<br>
<br>
</blockquote>
<br>
I meant between "$(CXXFLAGS) -O2" and "-O2 $(CXXFLAGS)". We always
do the former, so I assume the order matters. Otherwise some flag
overriding may not work anyway.<br>
<br>
<blockquote type="cite"
cite="mid:alpine.DEB.2.20.1803301128410.20294@cone.martin.st">
<blockquote type="cite">In any case it's not a good idea to
discard the env flags. For example you may lose the forced
_WIN32_WINNT version and WINAPI_FAMILY when building on Windows.
<br>
</blockquote>
<br>
So yes, in that aspect, it will override whatever was set before -
I wasn't aware that it was commonly used in the contribs build
system to set CFLAGS/CXXFLAGS globally. Now I see that this is
done, and the default flags there include -g -O2 as well.
<br>
<br>
In any case, this change isn't needed any longer since I fixed
libmfx to build with clang in C++11 mode and got rid of overriding
the flags.
<br>
<br>
// Martin<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a class="moz-txt-link-freetext" href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre>
</blockquote>
<br>
</body>
</html>