[vlc-devel] [PATCH 2/2] contrib: mfx: don't force a level optimization even on non optimized builds

Martin Storsjö martin at martin.st
Thu Mar 29 22:01:23 CEST 2018


On Thu, 29 Mar 2018, Steve Lhomme wrote:

> No other contrib need it and we use the same compiler for them.
> ---
> contrib/src/mfx/rules.mak | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/src/mfx/rules.mak b/contrib/src/mfx/rules.mak
> index a5b1fdaa61..f3b1287db5 100644
> --- a/contrib/src/mfx/rules.mak
> +++ b/contrib/src/mfx/rules.mak
> @@ -23,6 +23,6 @@ mfx: mfx-$(MFX_GITHASH).tar.xz .sum-mfx
> 	$(MOVE)
> 
> .mfx: mfx
> -	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) CXXFLAGS="$(CXXFLAGS) -std=c++98 -O2"
> +	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) CXXFLAGS="$(CXXFLAGS) -std=c++98"

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.

An alternative way of adding extra options would be to inject them via the 
CXX variable instead, to let autotools add the default -O2 just like it 
otherwise does.

// Martin


More information about the vlc-devel mailing list