[FFmpeg-devel] [RFC] make sure $TMPE is executable

Måns Rullgård mans
Thu Sep 10 19:28:51 CEST 2009


Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> On Thu, Sep 10, 2009 at 02:29:56PM +0100, M?ns Rullg?rd wrote:
>> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
>> 
>> > Hello,
>> > it seems that "GNU gold (GNU Binutils 2.19.1) 1.7" has a strange bug
>> 
>> What's that?
>
> The "new", supposedly much better and faster (IIRC ELF-only?) linker...
> Or to put it simpler, that's what you get when you do experiments and
> set in Gentoo the "gold" use flag for binutils (and no Gentoo flaming,
> I knew what I was getting myself into, allowing people to shoot
> themselves in the foot is not generally a bit thing, if nothing else
> it helps evolution along - though mostly I was hoping that maybe then
> compiling C++ programs would no longer be about 10 times slower than
> plain C).

So apart form this little quirk, is it any better?  Not that I'm
concerned about linking times myself.

>> > Or like this:
>> > Index: configure
>> > ===================================================================
>> > --- configure   (revision 19808)
>> > +++ configure   (working copy)
>> > @@ -1489,6 +1489,7 @@
>> >
>> >  tmpfile TMPC  .c
>> >  tmpfile TMPE  $EXESUF
>> > +chmod +x $TMPE
>> >  tmpfile TMPH  .h
>> >  tmpfile TMPO  .o
>> >  tmpfile TMPS  .S
>> 
>> I prefer this, but with the chmod done after all the tmpfile calls.
>> It looks nicer that way.
>
> So, should I apply this even if it is a hack?
> Index: configure
> ===================================================================
> --- configure   (revision 19808)
> +++ configure   (working copy)
> @@ -1493,6 +1493,7 @@
>  tmpfile TMPO  .o
>  tmpfile TMPS  .S
>  tmpfile TMPSH .sh
> +chmod +x $TMPE
>
>  unset -f mktemp

Ping me tomorrow if I haven't replied or committed something.

>> On a related note, I find myself questioning the practice of executing
>> test files in the first place.  This obviously doesn't work when
>> cross-compiling, and we do support that.  Is there no other way to do
>> those tests that doesn't require executing files?
>
> Uh, that is the test that checks if we are cross-compiling/compiler
> sanity check... :-)

I see the smiley ;-)

> The only other check_exec IIRC is because ICC silently generates
> broken code when ebp clobber is used, I can't think of a good way to
> check that differently, even though I admit this might cause a
> slight performance degradation when cross-compiling for x86 with
> gcc.

This rings a bell.  Wasn't there something about it behaving
differently in main() than in other functions?  I'll have to dig up
that old thread again.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list