Tuesday 15 May 2012

ada - How to make gnatmake tool compile RTS with project? -



ada - How to make gnatmake tool compile RTS with project? -

is there way create gnatmake tool recompile ada's runtime library ("rts") project i'm building file file? want integrate custom preprocessor adds features ada source code , compiles gcc. i'm passing --gcc=<preprocessor> flag gnatmake utility, figures out dependencies automatically , runs preprocessor of source files. want custom preprocessing done on code in rts well, there way it?

the -a flag tells gnatmake recompile rts files need recompiled.

after little experiment here seems if re-create system.ads (and maybe gnat.ads, interfac.ads .. yes) compiler’s adainclude/ directory source tree (i think you’ll need touch whenever update preprocessor), gnatmake may able want.

$ cp /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/system.ads . $ gnatmake -a int gcc -c int.adb gcc -gnatpg -c -i./ -i- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/s-stalib.adb gcc -gnatpg -c -i./ -i- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/a-except.adb gcc -gnatpg -c -i./ -i- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/s-valint.adb gcc -gnatpg -c system.ads ... gcc -gnatpg -c -i./ -i- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/s-conca4.adb gnatbind -x int.ali gnatlink int.ali

and, after realised hadn’t used -gnata,

$ touch int.adb $ gnatmake -a -gnata int gcc -c -gnata int.adb gcc -gnatpg -c -i./ -gnata -i- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/s-assert.adb gnatbind -x int.ali gnatlink int.ali

(i not want utilize -f here, because it’ll rebuild everything.)

ada gnat

No comments:

Post a Comment