This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: compiler standards (and/or min gcc version) supported withinstalled headers ?
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andreas Jaeger <aj at suse dot com>
- Cc: Carlos O'Donell <carlos at systemhalted dot org>, <libc-alpha at sourceware dot org>
- Date: Thu, 3 Jan 2013 15:58:06 +0000
- Subject: Re: compiler standards (and/or min gcc version) supported withinstalled headers ?
- References: <201212282357.52390.vapier@gentoo.org> <50E53F6C.2070805@suse.com><50E5989B.3070108@systemhalted.org> <50E59CD8.7050709@suse.com>
On Thu, 3 Jan 2013, Andreas Jaeger wrote:
> > Thus for example we could get rid of the GCC 2.91 check for __builtin_memset
> > in sysdeps/unix/sysv/linux/bits/sched.h and clean that up.
>
> That raises a separate question - shall we assume that non-GCC compilers have
> __builtin_memset as well?
>
> Otherwise the cleanup would be to change the got to use
> GLIBC_HAVE_BUILTIN_MEMSET - and define that for GCC.
Defining __GLIBC_HAVE_BUILTIN_MEMSET seems logically right. (You can't
just define __builtin_memset to memset because string.h may not be
included. So you don't really clean much up in this case because you
still have both cases in the code - and given that there's still a GCC
conditional somewhere, there doesn't really seem to be much advantage in
the test being __GNUC__ instead of __GNUC_PREREQ (2, 91).)
--
Joseph S. Myers
joseph@codesourcery.com