Hi Iain, >>> I’m not quite sure what you’re proposing here (probably missing something >>> obvious). >> >> At the moment, gcc/testsuite/lib/target-supports.exp >> (add_options_for_c99_runtime) adds -mmacosx-version-min=10.3 to the >> testcase flags on powerpc-*-darwin*. Since, as Joseph mentioned, gcc >> now defaults to -std=gnu11 (which implies a C99 runtime), this (or >> something similar) would always be needed now (unless someone forces, >> say, -std=c90) and should be handled in the Darwin/PowerPC driver code, >> not just the testsuite. > > The driver has the following rules: > > * if the user puts -mmacosx-version-min= on the command line that trumps all > > * else we pick a default using the following priority. > 1. MACOSX_DEPLOYMENT_TARGET env var. > 2. (native) > - what the kernel returns for the system version. > (cross) > - what was set at configure time for DEF_MIN_OSX_VERSION (which will > be >= 10.3.9 as things stand) > > So, of course, if we were hosted on 10.2.8 - that would create a problem > (2, native) > but if the system doesn’t have c99 support, that’s a problem anyway. > > Otherwise, deliberate mis-configuration or passing -mmacosx-version-min= in > RUNTESTFLAGS … but we don’t need to support that.
Right: users should be allowed to shoot themselves ;-) > Therefore, I suspect that the addition of the "-mmacosx-version-min=10.3” > is not > necessary and is a hang-over from older toolchains. I know now what's going on... > Perhaps, we could have a target_supports_c99 (maybe we already do), since > it’s > feasible that some embedded platforms might also want that exclusion - that > would > cover earlier Darwin “automagically” assuming folks remember to apply it. We do, and it's unsurprisingly called c99_runtime, too: in this as in a few other cases where a specific feature may need additional options to enable it, we have dg-add-options <option keyword> corresponding to the <effective target keyword>. What's happening for c99_runtime, as can be seen in lib/target-supports.exp (check_effective_target_c99_runtime) is that it checks gcc.dg/builtins-config.h for a definition of HAVE_C99_RUNTIME. In the Darwin/PowerPC case, that isn't defined before 10.3, skipping the affected tests. However, if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ isn't defined, builtins-config.h #error's out. Fortunately, gcc on Darwin always passes -mmacosx-version-min now, so there's no need to explicitly pass it in add_options_for_c99_runtime and that proc together with all calls to dg-add-options c99_runtime can go unless something really unexpected comes up during Solaris testing. > In any event, there’s no need to hold up fixing this issue, > If there’s any fallout from it on powerpc-darwin9, I should pick it up > quite quickly, since > it’s tested regularly. Amazing, 14 years after the end of OS updates. And I thought I were dealing with software versions right from the museum ;-) Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University