This is the mail archive of the
mailing list for the GCC project.
Re: libsanitizer merge from upstream r208536
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, Andrew Pinski <pinskia at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Dodji Seketeli <dodji at redhat dot com>, Dmitry Vyukov <dvyukov at google dot com>, Marek Polacek <polacek at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Yuri Gribov <tetra2005 at gmail dot com>
- Date: Thu, 15 May 2014 10:39:45 +0200
- Subject: Re: libsanitizer merge from upstream r208536
- Authentication-results: sourceware.org; auth=none
- References: <CAGQ9bdxH9rh0Cz8LBYZsuHKEFpkVosNkX2qrX10RGwK5hFEEqg at mail dot gmail dot com> <CA+=Sn1m56D1L6mfAcBWya+Pus2py=r0U8GC08MY6RrDhBJvWKw at mail dot gmail dot com> <CAGQ9bdyTjtxbdH9Ey-tyvce1B7eNQmSrvnRv9uTCw8y8L5y-Qw at mail dot gmail dot com> <53745088 dot 2060603 at samsung dot com> <CAGQ9bdzAYvegO+YA_RNOGjiO6NBwkgwCwjko7Pt+k-aNuDJW+Q at mail dot gmail dot com> <537478B6 dot 60101 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, May 15, 2014 at 12:20:06PM +0400, Yury Gribov wrote:
> On 05/15/2014 12:05 PM, Konstantin Serebryany wrote:
> >No. We have to support too many build systems and hence do not want
> >any configure step.
> >All configuration has to be done in the sources.
> Yeah, I see your point. But filling code with magic constants isn't
> very nice either.
> We could make a separate CMake check like GetTargetStructSize or
> something (somewhere in projects/compiler-rt/make/platform/*.mk).
Also, I'd suggest to have a look at glibc or libgomp how a directory system
with easily overridable target specific headers is way better than a maze of
#ifdefs all around the source.
I mean glibc sysdeps/ stuff or libgomp config/ stuff (the latter is far more
limited of course).
So, individual structures/constants/defines (or related groups thereof)
could be split into separate headers, and have target specific set of
-I arguments added by the Makefile/CMake, so that you can have some
defaults, some per-CPU defaults, some OS defaults and some per-CPU OS
defaults. Say, you could have a header file with layout of kernel stat
structure, one for Linux, another one for Darwin, another one for Windows,
and then if say on ppc64-linux it is different, it could supply it's own
file that would override the generic Linux one.