This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ada: Avoid Systematic recompilation of up-to-date objects under Darwin
On Dec 5, 2007 6:05 PM, Arnaud Charlet <charlet@adacore.com> wrote:
>
> I'd suggest instead to modify e.g. gcc.c and/or config/darwin.h. IIUC Darwin
> uses a special hook, namely REAL_LIBGCC_SPEC, which very likely triggers the
> problem in the first place.
The problem is triggered by the fact that the arguments given to the
main function of gcc.c are modified by:
extern void darwin_default_min_version (int * argc, char *** argv);
(in config/darwin.h and config/darwin-driver.c)
This function is called through the GCC_DRIVER_HOST_INITIALIZATION
macro call in gcc.c and reallocates argv to insert mmacosx-version-min
So, all the %{!mmacosx-version-min...} in the specs of darwin*.h are
useless because the -mmacosx-version-min option is inserted by
darwin_default_min_version if not given by the user. And this is done
before the processing of any spec :-(
I do not know whether it is absolutely necessary that the
mmacosx-version-min comes at the very beginning of the command line.
If not, the definitions of CC1_SPEC in config/i386/darwin.h and
config/rs6000/darwin.h ensure the insertion of this option and the Ada
side would not have a problem since the processing of CC1_SPEC comes
in %1 which comes after -gnatez. In this case a simple fix of the
problem is to revert change 125537.
Reguards,
--
Bechir