[PATCH] ada: Avoid Systematic recompilation of up-to-date objects under Darwin

Eric Botcazou ebotcazou@adacore.com
Fri Nov 7 15:33:00 GMT 2008


> The patchfile below solves the problem of systematic recompilation of
> Ada files when
> giving "-s" to gnatmake under darwin (ppc and x86). More details on
> this problem are
> described in bug report 34289.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34289
>
> ---------------------------------------------------------------
> 2007-12-03  Bechir Zalila  <bechir.zalila@gmail.com>
>
>         * switch-c.adb (Scan_Front_End_Switches): New switch -gnatea.
> Should always be the first switch to the gcc driver. Enable switch storing
> so that switches automatically added by the gcc driver at the beginning of
> the switch list are not put in the ALI file.
>
> 	* make.adb: (Compile_Sources.Compile): Add switch -gnatea as the first
> 	option.
> 	(Display): Never display -gnatea
>
> 	* lib.adb: (Switch_Storing_Enabled): initialized to False
> 	(Enable_Switch_Storing): New procedure. Set Switch_Storing_Enabled
> 	to True.
>
> 	* lib.ads: (Enable_Switch_Storing): New procedure.
>
> 	* lang-specs.h: surround the non-(g*&m*) switches we want to register
> 	by -gnatea and -gnatez

This is mostly OK, but initializing Switch_Storing_Enabled to False is quite 
problematic since no switches are recorded if you don't use gnatmake.

Here's a revision version, tested on i586-suse-linux, applied on the mainline.


2008-11-07  Bechir Zalila  <bechir.zalila@gmail.com>
            Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/34289
        * lib.ads: (Enable_Switch_Storing): Declare.
        * lib.adb: (Enable_Switch_Storing): New procedure.
        * switch-c.adb (Scan_Front_End_Switches): Add support for -gnatea.
        * make.adb: (Compile_Sources.Compile): Add -gnatea as first option.
        (Display): Never display -gnatea
        * gcc-interface/lang-specs.h: If -gnatea is present, pass -gnatez.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr34289.diff
Type: text/x-diff
Size: 4318 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20081107/50956b0e/attachment.bin>


More information about the Gcc-patches mailing list