Re: [libav-devel] [PATCH] configure: use -O1 with MSVC by default
LGTM On Wed, Dec 14, 2016 at 9:22 AM, Martin Storsjöwrote: > On Tue, 13 Dec 2016, Steve Lhomme wrote: > >> From: Steve Lhomme >> >> Otherwise some ARM and other unsupported CPU/OS is linked with -O0 >> --- >> configure | 1 + >> 1 file changed, 1 insertion(+) > > > I find the commit message quite hard to understand and easily misleading. > Would this make more sense? > > ---8<--- > configure: Use -O1 with MSVC for --disable-optimizations > > Without any optimization flags, MSVC does no dead code elimination (DCE) at > all, even for the most trivial cases. DCE is a prerequisite for building > libav correctly, otherwise there are undefined references to functions for > other architectures and disabled components. > > -O1 is the minimal optimization flags for MSVC that does include DCE. > ---8<--- > > // Martin > > ___ > libav-devel mailing list > libav-devel@libav.org > https://lists.libav.org/mailman/listinfo/libav-devel ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: use -O1 with MSVC by default
On Tue, 13 Dec 2016, Steve Lhomme wrote: From: Steve LhommeOtherwise some ARM and other unsupported CPU/OS is linked with -O0 --- configure | 1 + 1 file changed, 1 insertion(+) I find the commit message quite hard to understand and easily misleading. Would this make more sense? ---8<--- configure: Use -O1 with MSVC for --disable-optimizations Without any optimization flags, MSVC does no dead code elimination (DCE) at all, even for the most trivial cases. DCE is a prerequisite for building libav correctly, otherwise there are undefined references to functions for other architectures and disabled components. -O1 is the minimal optimization flags for MSVC that does include DCE. ---8<--- // Martin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: use -O1 with MSVC by default
On Tue, Dec 13, 2016 at 5:17 PM, Diego Biurrunwrote: > On Tue, Dec 13, 2016 at 04:23:02PM +0100, Steve Lhomme wrote: >> On Tue, Dec 13, 2016 at 3:33 PM, Hendrik Leppkes wrote: >> > On Tue, Dec 13, 2016 at 2:24 PM, Steve Lhomme wrote: >> >> From: Steve Lhomme >> >> >> >> Otherwise some ARM and other unsupported CPU/OS is linked with -O0 >> >> --- a/configure >> >> +++ b/configure >> >> @@ -3278,6 +3278,7 @@ probe_cc(){ >> >> _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' >> >> _cflags_speed="-O2" >> >> _cflags_size="-O1" >> >> +_cflags_noopt="-O1" >> > >> > noopt should only be used with --disable-optimizations, why are you >> > building with that if thats not what you actually want? >> >> That's what I used indeed. But it didn't link because it would try to >> use all kinds of stuff that are compiled but to be dropped by the >> linker. If you have another suggestion for this not to happen... > > You mean DCE (dead code elimination) does not work? We do indeed > require DCE to build.. That's the thing, yes. It doesn't work with -O0. > Diego > ___ > libav-devel mailing list > libav-devel@libav.org > https://lists.libav.org/mailman/listinfo/libav-devel ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: use -O1 with MSVC by default
On Tue, Dec 13, 2016 at 04:23:02PM +0100, Steve Lhomme wrote: > On Tue, Dec 13, 2016 at 3:33 PM, Hendrik Leppkeswrote: > > On Tue, Dec 13, 2016 at 2:24 PM, Steve Lhomme wrote: > >> From: Steve Lhomme > >> > >> Otherwise some ARM and other unsupported CPU/OS is linked with -O0 > >> --- a/configure > >> +++ b/configure > >> @@ -3278,6 +3278,7 @@ probe_cc(){ > >> _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' > >> _cflags_speed="-O2" > >> _cflags_size="-O1" > >> +_cflags_noopt="-O1" > > > > noopt should only be used with --disable-optimizations, why are you > > building with that if thats not what you actually want? > > That's what I used indeed. But it didn't link because it would try to > use all kinds of stuff that are compiled but to be dropped by the > linker. If you have another suggestion for this not to happen... You mean DCE (dead code elimination) does not work? We do indeed require DCE to build.. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: use -O1 with MSVC by default
On Tue, Dec 13, 2016 at 10:23 AM, Steve Lhommewrote: > On Tue, Dec 13, 2016 at 3:33 PM, Hendrik Leppkes wrote: >> On Tue, Dec 13, 2016 at 2:24 PM, Steve Lhomme wrote: >>> From: Steve Lhomme >>> >>> Otherwise some ARM and other unsupported CPU/OS is linked with -O0 >>> --- >>> configure | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/configure b/configure >>> index 6d809f7..251b7c4 100755 >>> --- a/configure >>> +++ b/configure >>> @@ -3278,6 +3278,7 @@ probe_cc(){ >>> _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' >>> _cflags_speed="-O2" >>> _cflags_size="-O1" >>> +_cflags_noopt="-O1" >> >> noopt should only be used with --disable-optimizations, why are you >> building with that if thats not what you actually want? > > That's what I used indeed. But it didn't link because it would try to > use all kinds of stuff that are compiled but to be dropped by the > linker. If you have another suggestion for this not to happen... > Should -O0 be used for noopt? -- Vittorio ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: use -O1 with MSVC by default
On Tue, Dec 13, 2016 at 3:33 PM, Hendrik Leppkeswrote: > On Tue, Dec 13, 2016 at 2:24 PM, Steve Lhomme wrote: >> From: Steve Lhomme >> >> Otherwise some ARM and other unsupported CPU/OS is linked with -O0 >> --- >> configure | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/configure b/configure >> index 6d809f7..251b7c4 100755 >> --- a/configure >> +++ b/configure >> @@ -3278,6 +3278,7 @@ probe_cc(){ >> _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' >> _cflags_speed="-O2" >> _cflags_size="-O1" >> +_cflags_noopt="-O1" > > noopt should only be used with --disable-optimizations, why are you > building with that if thats not what you actually want? That's what I used indeed. But it didn't link because it would try to use all kinds of stuff that are compiled but to be dropped by the linker. If you have another suggestion for this not to happen... > - Hendrik > ___ > libav-devel mailing list > libav-devel@libav.org > https://lists.libav.org/mailman/listinfo/libav-devel ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: use -O1 with MSVC by default
On Tue, Dec 13, 2016 at 2:24 PM, Steve Lhommewrote: > From: Steve Lhomme > > Otherwise some ARM and other unsupported CPU/OS is linked with -O0 > --- > configure | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/configure b/configure > index 6d809f7..251b7c4 100755 > --- a/configure > +++ b/configure > @@ -3278,6 +3278,7 @@ probe_cc(){ > _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' > _cflags_speed="-O2" > _cflags_size="-O1" > +_cflags_noopt="-O1" noopt should only be used with --disable-optimizations, why are you building with that if thats not what you actually want? - Hendrik ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] configure: use -O1 with MSVC by default
From: Steve LhommeOtherwise some ARM and other unsupported CPU/OS is linked with -O0 --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 6d809f7..251b7c4 100755 --- a/configure +++ b/configure @@ -3278,6 +3278,7 @@ probe_cc(){ _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' _cflags_speed="-O2" _cflags_size="-O1" +_cflags_noopt="-O1" if $_cc -nologo- 2>&1 | grep -q Linker; then _ld_o='-out:$@' else -- 2.10.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel