[gccsdk] GCC 4.7.4 Rel 1 Dev 2014-01-08: Text file execute permission bit

John Tytgat John.Tytgat at aaug.net
Sat Mar 8 08:11:39 PST 2014


In message <531B1AE9.9010503 at gmx.com>
          Duncan Moore <duncan.moore at gmx.com> wrote:

> GCCSDK GCC 4.7.4 Release 1 Development 4.7.4 2014-01-08
> http://www.riscos.info/downloads/gccsdk/testing/4.7.4/gccsdk-gcc-bin-4.7.4-Rel1dev.zip
> SharedUnixLibrary 1.12
> VirtualRPC-Adjust RISCOS 4.39
> 
> The execute permission bit for Text files has changed to be the same as 
> for other filetypes. So the program below under gcc 4.1.2 gives:
> 
> Obey xxx
> Text ---
> 
> and under gcc 4.7.4 gives:
> 
> Obey xxx
> Text xxx
> 
> Was this change intentional? And will it stay like this, or be reverted 
> to the 4.1.2 behaviour? (It affects some of my regression tests).

Not intentional.  Setting the execute permission bit is done in
common/attrib.c and the S_IEXEC bit is derived from RISC OS file attribute
bit 2, this since r1302 (roughly 9 years ago).  I presume this change is
the result of the cleanups done for 4.7.x developments.

I'm not sure using RISC OS file attribute bit 2 is for determinig
execute permission bit is good.  It is (was) used for BBC ADFS and
privately for SJ Research file systems and further marked as possibly to
be used for future expansion (if PRM 2-13 is to be believed).

I think it would be better to derive this from RISC OS filetype, i.e.
test on Obey, Absolute, ELF, Module, Utility (any others ?).

Opinions ?

John.
-- 
John Tytgat, in his comfy chair at home
John.Tytgat at aaug.net




More information about the gcc mailing list