------- Comment #3 from bechir dot zalila at gmail dot com 2007-11-30 09:19 ------- In gcc/config/i386/darwin.h, we can see:
#define CC1_SPEC "%(cc1_cpu) \ %{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}} \ %{!mmacosx-version-min=*:-mmacosx-version-min=%(darwin_minversion)} \ %{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}" which cintains the addition of -mmacosx-version-min=... if it is not given, In gcc/ada/lang-spec.h we can see the following: %{O*} %{W*} %{w} %{p} %{pg:-p} %{a} %{f*} %{d*} %{g*&m*} " #if defined(TARGET_VXWORKS_RTP) "%{fRTS=rtp:-mrtp} " #endif #if CONFIG_DUAL_EXCEPTIONS "%{fRTS=sjlj:-fsjlj} " #endif "%1 %{!S:%{o*:%w%*-gnatO}} \ The %1 (processing of CC1_SPEC) comes after the %{g*&m*} which should result in adding the -mmacosx-version-min=... after all options that begins with -g* and especially -gnatez, and it should not be added in the .ali file. For some reason, the -mmacosx-version-min=... is added before all options that begins with -g... I replaced %{g*&m*} by %{g*} %{m*} in lang-specs.h and this solved the problem. However, I don't know whether its is very important to conserve the order among -g* and -m* switches when passing them to gnat1. The change 83658 did not say why: * lang-specs.h: Keep -g and -m switches in the same order, and as the last switches. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34289