arc profiling broken (Was: [4.1 patch] relocate profile data file)

Joern RENNECKE joern.rennecke@st.com
Tue Jul 5 12:26:00 GMT 2005


Lu, Hongjiu wrote:

>Newlib can have access/mkdir, depending on targets. --with-newlib
>doesn't mean access/mkdir aren't available. Since access/mkdir are OS
>features, can config.gcc define TARGET_POSIX_IO, depending on the target
>OS? We can assume *-elf/coff/aout don't have TARGET_POSIX_IO. We can add
>more targets to it later.
>  
>
Yes, we can work it all out in config.gcc.  I'm not sure that makes 
sense, though.
We could work out every single macro in config.gcc, and do away with all
the target config header files, but we'd get a huge mess of spaghetti code.
Is there any reason why TARGET_POSIX_IO would be better set in config.gcc,
rather than the target config files?
We have config files that are generic for a number of OSes, so we don't 
actually
have to write significantly more code than if we put it in config.gcc.  
It might
actually be less, since we don't need to have new code to select on the 
OS and
other features.
As said before, I think replacing the definitions of TARGET_HAS_SETLKW
with definitions of TARGET_POSIX_IO provides a perfect starting point.

One thing we could do to avoid #ifndef clumps in the target files, where
we want a configure option to be able to override a target setting, is 
to have
a variant macro set in the target files, and then have defaults.h use 
that target
selection if and only if there is no overriding setting from config.gcc.



More information about the Gcc-patches mailing list