On Mon, May 13, 2019 at 12:14:37PM +0200, Martin Liška wrote: > On 5/10/19 11:21 AM, Jakub Jelinek wrote: > > On Fri, May 10, 2019 at 11:04:12AM +0200, Martin Liška wrote: > >> --- a/gcc/config/i386/i386.h > >> +++ b/gcc/config/i386/i386.h > >> @@ -1906,6 +1906,9 @@ typedef struct ix86_args { > >> > >> #define CLEAR_RATIO(speed) ((speed) ? MIN (6, ix86_cost->move_ratio) : 2) > >> > >> +/* C library provides fast implementation of mempcpy function. */ > >> +#define TARGET_HAS_FAST_MEMPCPY_ROUTINE 1 > >> + > > > > 1) we shouldn't be adding further target macros, but target hooks > > Done. > > > 2) I don't think this is a property of the x86 target, but of x86 glibc, > > so you should set it on x86 glibc only (i.e. i?86/x86_64 linux and hurd > > when using glibc, not newlib, nor bionic/android, nor uclibc, nor musl) > > I've implemented the in i386.c with DEFAULT_LIBC == LIBC_GLIBC. Hope it's > correct?
No, that would be correct only in the rare SINGLE_LIBC configurations. Either you can do #ifdef OPTION_GLIBC return OPTION_GLIBC; #else return false; #endif or define something in config/linux.h (or .[ch]) that you can then use in i386.c. Jakub