This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: arc profiling broken (Was: [4.1 patch] relocate profile data file)
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: "Lu, Hongjiu" <hongjiu dot lu at intel dot com>
- Cc: Nathan Sidwell <nathan at codesourcery dot com>, "Zagorodnev, Grigory" <grigory dot zagorodnev at intel dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 05 Jul 2005 13:25:24 +0100
- Subject: Re: arc profiling broken (Was: [4.1 patch] relocate profile data file)
- References: <CBDB88BFD06F7F408399DBCF8776B3DC0487DE3E@scsmsx403.amr.corp.intel.com>
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.