------- Comment #11 from bechir dot zalila at gmail dot com  2007-12-03 14:00 
-------
After a lot of investigation, I succeeded to isolate the problem. The added
-mmacosx-min-version is not done when processing the CC1_SPEC: It is done in
the main function in gcc.c using the GCC_DRIVER_HOST_INITIALIZATION macro.

In gcc.c (function main):

#ifdef GCC_DRIVER_HOST_INITIALIZATION
  /* Perform host dependent initialization when needed.  */
  GCC_DRIVER_HOST_INITIALIZATION;
#endif

For the darwin (ppc + x86): in config/darwin.g:

extern void darwin_default_min_version (int * argc, char *** argv);
#define GCC_DRIVER_HOST_INITIALIZATION \
  darwin_default_min_version (&argc, &argv)
#endif /* CROSS_DIRECTORY_STRUCTURE */

And finally the darwin_default_min_version function defined in
config/darwin-driver.c. This function inserts -mmacosx-version-min
*at the beginning* of argv, just after the command name (argv[1])

I Attached a patchfile (gcc_ada.diff) for the GNAT frontend that solves the
problem


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34289

Reply via email to