On Sat, Jan 22, 2022 at 07:03:48PM +0100, Jakub Jelinek via Gcc-patches wrote:
> On Sat, Jan 22, 2022 at 01:16:38PM +0100, Jakub Jelinek via Gcc-patches wrote:
> > Actually, I suspect we either need something like following patch,
> > or need to change gcc/config/{linux,rs6000/linux{,64},alpha/linux}.h
> > so that next to those OPTION_GLIBC etc. macros it also defines versions
> > of those macros with opts argument.
> 
> And here is a larger but perhaps cleaner patch that matches how e.g.
> options.h defines TARGET_WHATEVER_P(opts) options and then TARGET_WHATEVER
> too.
> 
> Only compile tested on x86_64-linux so far.

Bootstrapped/regtested on x86_64-linux and i686-linux now, ok for trunk?

> 2022-01-22  Jakub Jelinek  <ja...@redhat.com>
> 
>       * config/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P,
>       OPTION_BIONIC_P, OPTION_MUSL_P): Define.
>       (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine
>       using OPTION_*_P macros.
>       * config/alpha/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P,
>       OPTION_BIONIC_P, OPTION_MUSL_P): Define.
>       (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine
>       using OPTION_*_P macros.
>       * config/rs6000/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P,
>       OPTION_BIONIC_P, OPTION_MUSL_P): Define.
>       (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine
>       using OPTION_*_P macros.
>       * config/rs6000/linux64.h (OPTION_GLIBC_P, OPTION_UCLIBC_P,
>       OPTION_BIONIC_P, OPTION_MUSL_P): Define.
>       (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine
>       using OPTION_*_P macros.
>       * config/fuchsia.h (OPTION_MUSL_P): Redefine.
>       * config/glibc-stdint.h (OPTION_MUSL_P): Define if not defined.
>       * common/config/s390/s390-common.cc (s390_supports_split_stack): Re-add
>       ATTRIBUTE_UNUSED to opts parameter.  If OPTION_GLIBC_P is defined, use
>       OPTION_GLIBC_P (opts) as condition, otherwise assume if (false).
>       * common/config/i386/i386-common.cc (ix86_supports_split_stack): If
>       OPTION_GLIBC_P is defined use !OPTION_GLIBC_P (opts) as condition,
>       otherwise assume if (true).

        Jakub

Reply via email to