Mail Archives: djgpp/2012/06/19/12:22:23
On 06/17/2012 03:48 AM, rugxulo AT gmail DOT com wrote:
> Hi,
>
> On Saturday, June 16, 2012 5:18:59 AM UTC-5, Andris Pavenis wrote:
>>
>> I'm getting the following when trying to bootstrap gcc-4.7.1 for DJGPP
>> with Ada compiler enabled:
>>
>> error: "system.ads" has restriction No_Implicit_Dynamic_Code
>> error: but the following files violate this restriction:
>> error: "make.adb"
>> error: "makeutl.adb"
>> error: "prj.adb"
>> error: "prj-env.adb"
>> error: "prj-conf.adb"
>> error: "prj-nmsc.adb"
>> make.exe[3]: *** [b_gnatm.adb] Error 5
>> make.exe[3]: Leaving directory `g:/build.gcc/gcc/ada/tools'
>> make.exe[2]: *** [gnattools-native] Error 2
>> make.exe[2]: Leaving directory `g:/build.gcc/gnattools'
>> make.exe[1]: *** [all-gnattools] Error 2
>> make.exe[1]: Leaving directory `g:/build.gcc'
>> make.exe: *** [bootstrap] Error 2
>>
>> Do anybody know how to fix that? I do not know Ada well enough for that
>> (or more exactly my knowledge about Ada language is close to
>> non-existent). I had the same problem also with gcc-4.7.0. This was the
>> reason why DJGPP port of Ada compiler was left out for GCC-4.7.0.
>
> I don't know Ada either. A quick Google search shows this:
>
> http://gcc.gnu.org/onlinedocs/gnat_rm/No_005fImplicit_005fDynamic_005fCode.html
>
> They seem to want to (mostly) avoid "trampolines" that require executable stack code because DEP under Windows doesn't like that. (Though I doubt DOS has the same concerns.)
>
> Anyways, a comparison of system.ads from GCC 4.1.2 and 4.6.3 shows that the former didn't have such a pragma enabled at all. I would be surprised if just removing that magically fixed it, but you could try it!
>
> "
> pragma Restrictions (No_Implicit_Dynamic_Code);
> -- We want to avoid trampolines in the compiler, so it can be used in systems
> -- which prevent execution of code on the stack, e.g. in windows environments
> -- with DEP (Data Execution Protection) enabled.
> "
Thanks.
Does not really matter for DJGPP. So had to create own copy of system.ads instead of
using generic version.
Andris
- Raw text -