[FFmpeg-devel] [PATCH]Disable inline_asm_direct_symbol_refs for lto
Michael Niedermayer
michaelni at gmx.at
Sun May 4 06:56:01 CEST 2014
On Sun, May 04, 2014 at 02:31:31PM +1000, Matt Oliver wrote:
> On 4 May 2014 10:48, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> > On Sat, May 03, 2014 at 09:01:55AM +0200, Carl Eugen Hoyos wrote:
> > > Hi!
> > >
> > > Attached patch fixes compilation with --enable-lto and a recent gcc if
> > h264
> > > and hevc are disabled.
> > > Fixes a part of ticket #2941.
> > >
> > > Please comment, Carl Eugen
> >
> > > configure | 1 +
> > > 1 file changed, 1 insertion(+)
> > > 1ebcb9b8e502ad00eb2d28513e36aa092d887fe9 patchltogcc.diff
> > > diff --git a/configure b/configure
> > > index dd7ac79..5b34d1f 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -4904,6 +4904,7 @@ if enabled lto; then
> > > test "$cc_type" != "$ld_type" && die "LTO requires same compiler
> > and linker"
> > > check_cflags -flto
> > > check_ldflags -flto $cpuflags
> > > + disable inline_asm_direct_symbol_refs
> > > fi
> >
> > why is inline_asm_direct_symbol_refs not disabled automatically ?
> > is ths inline_asm_direct_symbol_refs test run after adding the lto
> > flags ?
> >
>
> inline_asm_direct_symbol_refs is tested before lto is added as currently
> lto is added very late in the sequence. The problem is that lto moves alot
> of optimization work to link time so the current checks for
> inline_asm_direct_symbol_refs are compilation checks which would have to be
> extended to also check linking. However pretty much every other test is
> also doing just a compilation test and with lto already enabled some of
> these may incorrectly pass when they shouldnt as they wont fail until a
> link test is done. So moving lto earlier in the configure script may brake
> a significant number of existing tests.
>
> So the other way would be to extend the inline_asm_direct_symbol_refs so
> that it checks and adds the lto explicitly to just its test but the way
> Carl suggested is probably cleaner.
hmm agree, carls patch LGTM
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140504/0047881c/attachment.asc>
More information about the ffmpeg-devel
mailing list