This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What is the value of TARGET_C99_FUNCTIONS on Darwin?


On Mar 17, 2007, at 2:22 PM, Dominique Dhumieres wrote:
Following the discussions for PR30969, PR30980, and PR31161,
it appears that TARGET_C99_FUNCTIONS is not set on OSX 10.3.9
nor OSX 10.4.9. Is this in line with the comment

/* Old versions of Mac OS/Darwin don't have C99 functions available. */

in gcc/config/rs6000/darwin.h? and

#undef TARGET_C99_FUNCTIONS
#define TARGET_C99_FUNCTIONS                                    \
  (TARGET_64BIT                                                 \
   || strverscmp (darwin_macosx_version_min, "10.3") >= 0)

The above can be read as:


If TARGET_64BIT is true, then TARGET_C99_FUNCTIONS is true,
otherwise if we're targeting 10.3 or later, then TARGET_C99_FUNCTIONS is true,
otherwise, TARGET_C99_FUNCTIONS is false.


we are targeting means that flag:

-mmacosx-version-min=version
The earliest version of MacOS X that this executable will run on is version. Typ-
ical values of version include 10.1, 10.2, and 10.3.9.


The default for this option is to make choices that seem to be most useful.

though, the exact default for this flag is changing (has change, is going to change).

For example, if you tell it, you are going to generate code for 10.1, then, TARGET_C99_FUNCTIONS is false.

We used to default to 10.1, in later versions, we default it this way:

#define DARWIN_MINVERSION_SPEC                                  \
  "%{m64:%{fgnu-runtime:10.4;                                   \
           ,objective-c|,objc-cpp-output:10.5;                  \
           ,objective-c++|,objective-c++-cpp-output:10.5;       \
           :10.4};                                              \
     shared-libgcc:10.3;                                        \
     :10.1}"

for ppc, and x86 defaults it this way:

/* Determine a minimum version based on compiler options.  */
#define DARWIN_MINVERSION_SPEC                          \
"%{!m64|fgnu-runtime:10.4;                             \
    ,objective-c|,objc-cpp-output:10.5;                 \
    ,objective-c++|,objective-c++-cpp-output:10.5;      \
    :10.4}"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]